Re: [Matplotlib-users] Basemap continent colors

2010-05-12 Thread Michael Hearne
ke On May 11, 2010, at 2:22 PM, Jeff Whitaker wrote: > On 5/11/10 8:02 AM, Michael Hearne wrote: >> Jeff - Thanks. Is there an easy way you know of to detect when there are no >> continent boundaries? I'm making these maps automatically, and so will not >> have the

Re: [Matplotlib-users] Basemap continent colors

2010-05-11 Thread Michael Hearne
2:21 PM, Michael Hearne wrote: >> I have found a (possible) bug in Basemap - when using >> basemap.fillcontinents(), I see the chosen continent color only when the map >> I create includes some ocean. If I am in the interior of a continent (I've >> tested with North Amer

[Matplotlib-users] Basemap continent colors

2010-05-10 Thread Michael Hearne
I have found a (possible) bug in Basemap - when using basemap.fillcontinents(), I see the chosen continent color only when the map I create includes some ocean. If I am in the interior of a continent (I've tested with North America and Asia), the continent color is white. A code sample is bel

Re: [Matplotlib-users] imshow smoothing

2009-09-22 Thread Michael Hearne
Great! Thanks, Mike On Sep 22, 2009, at 2:38 PM, Gary Ruben wrote: > Yes. Use interpolation='nearest' instead. > > Gary R. > > Michael Hearne wrote: >> Running the test script below gives me the image I have attached, >> which looks like it has been smoot

[Matplotlib-users] Building matplotlib on os x

2009-08-11 Thread Michael Hearne
Hello - I am attempting to build matplotlib from source on os X, and getting an error about a shared library being the wrong architecture. The confusing thing is that the call to g++ has two settings for arch: "g++ -arch i386 -arch ppc..." The error I get is: "ld: in /Developer/SDKs/MacOSX10

[Matplotlib-users] bug in PDFs

2009-06-12 Thread Michael Hearne
All: I am using PDF files generated from matplotlib, and a PDF parser from ReportLab, Inc. Their tool encountered a bug in the PDF specification. The company's email to me follows: ...matplotlib is violating the PDF specification. There is a structure near the end of the file shown belo

[Matplotlib-users] drawing un-filled text with matplotlib

2009-06-11 Thread Michael Hearne
I apologize if I am using the wrong terminology for this, but I am trying to reproduce the "un-filled" text effect in the attached image with matplotlib. Is this possible? Thanks, Mike <> -- Crystal Reports - New

[Matplotlib-users] compound conditions with pylab.find

2009-04-01 Thread Michael Hearne
Is it possible to use multiple conditionals with the pylab.find() function? For example, in Matlab, I can do the following: x = rand(1,10); i = find(x > 0.5 & x < 0.9); %returns the indices between 0.5 and 0.9 In Python: (ipython -pylab) x = rand(1,10) None of the following approaches work: #i

Re: [Matplotlib-users] Basemap data installation

2009-03-30 Thread Michael Hearne
Jeff - Copying the rest of the files solved the problem. Thanks! --Mike Jeff Whitaker wrote: > Michael Hearne wrote: >> I am experimenting with the Enthought Python Distribution (EPD) on >> MacOS 10.5, which includes BaseMap version 0.99.1. I have existing >> modul

[Matplotlib-users] Basemap data installation

2009-03-30 Thread Michael Hearne
I am experimenting with the Enthought Python Distribution (EPD) on MacOS 10.5, which includes BaseMap version 0.99.1. I have existing modules that use the 'full' resolution data. These modules are currently failing with the error message below. I have tried copying what looked like the full r

Re: [Matplotlib-users] installing matplotlib

2009-03-20 Thread Michael Hearne
investigating > on distutils and/or gcc lists. > > Cheers, > Mike > > > > Michael Hearne wrote: >> I tried setting CXX=/usr/bin/g++ in my .bashrc, but I still get the >> same error. Is there some file in the matplotlib distribution that I >> need to e

Re: [Matplotlib-users] installing matplotlib

2009-03-20 Thread Michael Hearne
I tried setting CXX=/usr/bin/g++ in my .bashrc, but I still get the same error. Is there some file in the matplotlib distribution that I need to edit with this information? --Mike Michael Hearne wrote: > I can't using gcc, but I can using g++, which is installed. I guess > I'

Re: [Matplotlib-users] installing matplotlib

2009-03-20 Thread Michael Hearne
I can't using gcc, but I can using g++, which is installed. I guess I'll just set the CXX variable to the path for g++. I don't know enough about gcc to understand why the two aren't linked together... Thanks for the help, Mike Michael Droettboom wrote: > Micha

[Matplotlib-users] installing matplotlib

2009-03-20 Thread Michael Hearne
Two questions: 1) I'm trying to upgrade an installation of matplotlib I have on a RHEL5 system. When trying: /usr/local/bin/python setup.py build I get the error message: "gcc: src/ft2font.cpp: C++ compiler not installed on this system error: command 'gcc' failed with exit status 1" I do in fa

Re: [Matplotlib-users] setting thickness of axis frame

2009-02-04 Thread Michael Hearne
Forgot the attachment... Michael Hearne wrote: Chris - Thanks for your reply. Unfortunately, it didn't seem to have any effect on the frame I created. I notice with matplotlib 0.98.5.1, I get a warning with get_frame(), telling me to use the patch object of the axes instead of get_

Re: [Matplotlib-users] setting thickness of axis frame

2009-02-04 Thread Michael Hearne
Chris - Thanks for your reply. Unfortunately, it didn't seem to have any effect on the frame I created. I notice with matplotlib 0.98.5.1, I get a warning with get_frame(), telling me to use the patch object of the axes instead of get_frame(). So, when I use this with an axes created for a Bas

[Matplotlib-users] setting thickness of axis frame

2009-02-03 Thread Michael Hearne
The Axes object has a method for turning on the frame: set_frame_on(). How do I set the thickness of the frame that appears? Thanks, Mike Hearne -- Create and Deploy Rich Internet Apps outside the browser with Adobe(R)

[Matplotlib-users] plotting a circle in log space

2009-01-23 Thread Michael Hearne
I have discovered, from the mailing list, the easy way to draw a circle in linear space: cx = 700 cy = 700 r = 1000 xmin = cx - r xmax = cx + r ymin = cy - r ymax = cy + r cir = Circle( (cx,cx), radius=r,facecolor='w',edgecolor='b') a = gca() a.add_patch(cir) axis([xmin,xmax,ymin,ymax]) axis('

[Matplotlib-users] fontdict keyword argument to text() function

2009-01-12 Thread Michael Hearne
Will fontdict continue to be a valid keyword argument for the text() function? It seems to work now (in version 0.98.5.1), but the help on this page: http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.text is ambiguous, as it lists two keyword arguments at the top ("fontd

Re: [Matplotlib-users] clabel return values

2009-01-06 Thread Michael Hearne
x,ly,ltext, fontproperties=fp, > rotation=lrot,va=va, ha=ha) > > You may simply use update_from() method. > > Anyhow, I'm not sure if you can put dorpshadow effect this way. > Changing font weight usually changes the overall size of each glyph. > > Regard

[Matplotlib-users] clabel return values

2009-01-06 Thread Michael Hearne
Is the list of return values from the clabel() function supposed to represent the position and orientation of the contour labels? I have a script below where I try to re-draw the contour labels using the Text objects in the list returned from clabel(), and they do not line up in my output. I'

[Matplotlib-users] getting text size _before_ plotting

2009-01-05 Thread Michael Hearne
All: I'm trying to make a map (using Basemap), and plot names of cities on that map. I'd like to avoid "collisions" of city names (where the bounding boxes of the text objects would overlap), but I'm having trouble figuring out how I can do this without actually drawing the text on the figure

Re: [Matplotlib-users] making continuous color images with custom colormaps

2008-12-30 Thread Michael Hearne
Looking at Eric's documentation, I now understand that my cdict will not work. I retract my question for now until I can figure out how to make a cdict that looks like what I want. Thanks. Eric Firing wrote: > Michael Hearne wrote: >> I am posting yet another question about colo

[Matplotlib-users] making continuous color images with custom colormaps

2008-12-30 Thread Michael Hearne
I am posting yet another question about colormaps, as I am having trouble grasping the fundamentals of the way the color model works in Matplotlib. There are many examples on-line of very nice looking continuous color images, such as the one that would be produced by using this code: /delta =

[Matplotlib-users] GMT-like color maps

2008-12-16 Thread Michael Hearne
I'm trying to replicate the color-mapping behavior of the GMT package with matplotlib/basemap and the imshow() function, and have run into a problem. Using GMT you can assign colors to ranges of Z values, so that (for example), Z values between 0 and 50 are given a color interpolated between

Re: [Matplotlib-users] error installing matplotlib from egg

2008-12-16 Thread Michael Hearne
ile__ matplotlib.pyparsing: module MAY be using inspect.stack matplotlib.backends.backend_cocoaagg: module references __file__ matplotlib.config.cutils: module references __file__ Removing matplotlib 0.98.5.1 from easy-install.pth file Adding matplotlib 0.98.5.1 to easy-install.pth file Installed /

[Matplotlib-users] error installing matplotlib from egg

2008-12-15 Thread Michael Hearne
I get the following output when trying to install the latest version of matplotlib from an egg. I'm running Mac OS X 10.5.5. sudo easy_install matplotlib-0.98.5-py2.5-macosx-10.3.egg Processing matplotlib-0.98.5-py2.5-macosx-10.3.egg removing '/Library/Python/2.5/site-packages/matplotlib-0.98.

Re: [Matplotlib-users] building matplotib on linux

2008-09-23 Thread Michael Hearne
d freetype-devel, the build errors went away. The Tk errors vanished on their own. I don't know why I have so much trouble building and installing software... Thanks, Mike Hearne John Hunter wrote: > On Tue, Sep 23, 2008 at 10:28 AM, Michael Hearne <[EMAIL PROTECTED]> wrote:

Re: [Matplotlib-users] building matplotib on linux

2008-09-23 Thread Michael Hearne
I installed the freetype-devel libraries and this problem went away. --Mike Michael Hearne wrote: > All: I am trying to build matplotlib 0.98.3 on a Red Hat Enterprise 5 > linux box. I have Tkinter support compiled into my > /usr/local/bin/python installation (at least "

[Matplotlib-users] building matplotib on linux

2008-09-22 Thread Michael Hearne
planation = add_tk_flags(module) File "/home/mhearne/build/matplotlib-0.98.3/setupext.py", line 1101, in add_tk_flags module.libraries.extend(['tk' + tk_ver, 'tcl' + tk_ver]) UnboundLocalError: local variable 'tk_ver' referenced before assignment --

[Matplotlib-users] bug in savefig?

2008-09-11 Thread Michael Hearne
27;output.eps') savefig('output.png') -- ---------- Michael Hearne [EMAIL PROTECTED] (303) 273-8620 USGS National Earthquake Information Center 1711 Illinois St. Golden

Re: [Matplotlib-users] which basemap with matpotlib 0.91.2

2008-08-11 Thread Michael Hearne
dencies to install on two Red Hat Enterprise Linux systems: I punted both of them over to an outside contractor, who was able to compile scipy on one system, but not the other. And he specializes in that kind of stuff. --Mike Jeff Whitaker wrote: > Michael Hearne wrote: >> I&#

[Matplotlib-users] which basemap with matpotlib 0.91.2

2008-08-11 Thread Michael Hearne
search basemap" yields no results, so I assume there isn't an Ubuntu package for that. And if someone tells me I need to compile a newer scipy (and it's #$%^&! dependencies) from source, I'll scream. Thanks, Mike -- -------

Re: [Matplotlib-users] bug: fewer colors in encapsulated postscript versions than PNG

2008-06-27 Thread Michael Hearne
eps file with mine, that seems > the most likely culprit of the bug. Can you update to 0.98.1 or later > (or the current SVN head?). Does that resolve this issue? > > Cheers, > Mike > > Michael Hearne wrote: >> Matplotlib versions: >> >> In [2]: matplot

[Matplotlib-users] bug: fewer colors in encapsulated postscript versions than PNG

2008-06-27 Thread Michael Hearne
e PNG file, at least on a Mac OSX machine. Is there a work-around for this? I haven't tested to see if it is limited to contour plots, or to Mac installations... Thanks, Mike -- ------ Michael Hearne [EMAIL PROTECTED] (303) 273-8620 USG

[Matplotlib-users] Errors building matplotlib on RHEL5

2008-06-25 Thread Michael Hearne
trol where RPM's get installed? --Mike -- ------ Michael Hearne [EMAIL PROTECTED] (303) 273-8620 USGS National Earthquake Information Center 1711 Illinois St. Golden CO 80401 Senior Software Engineer S

Re: [Matplotlib-users] bounding box functionality with text() function

2008-06-11 Thread Michael Hearne
layout cache. The solution I implemented was > to simply add the renderer id to the property tuple used for caching. > Fixed in svn r5470. > > JDH > -- -- Michael Hearne [EMAIL PROTECTED] (303) 273-8620 USGS

[Matplotlib-users] [Fwd: bounding box functionality with text() function]

2008-06-11 Thread Michael Hearne
: Mon, 09 Jun 2008 14:35:24 -0600 From: Michael Hearne <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: MatPlotLib Users I'm having a problem with the bbox keyword to the text() function. The code below, for me, results in one postscript file that looks fine, but the PNG fi

[Matplotlib-users] bounding box functionality with text() function

2008-06-09 Thread Michael Hearne
fontsize':9} words = ['Hi','Goodbye','What''s this','Aloha','So long, farewell'] for i in range(0,len(x)): tx = x[i] ty = y[i] word = words[i] text(tx,ty,word,fontdict2,bbox={'facecolor':'w'})

[Matplotlib-users] Installing matplotlib

2008-05-01 Thread Michael Hearne
Jeff (or anyone) - I recently reinstalled all of my numpy/scipy related packages, including matplotlib, from a Mac OS X installer called the SciPy SuperPack. (http://macinscience.org/?page_id=6) All of the packages he includes work really well. However, after I used easy_install to grab Base

Re: [Matplotlib-users] plot_date and legend

2008-05-01 Thread Michael Hearne
Contents of matplotlib.__version__" '0.98pre' My Matplotlib is from the SciPy SuperPack for Mac OS X from http://macinscience.org/?page_id=6 On May 1, 2008, at 3:32 PM, Michael Hearne wrote: > I'm noticing strange behavior with the legend function when used in > c

[Matplotlib-users] plot_date and legend

2008-05-01 Thread Michael Hearne
and if so, do you know what the problem is? --Mike ---------- Michael Hearne [EMAIL PROTECTED] (303) 273-8620 USGS National Earthquake Information Center 1711 Illinois St. Golden CO 80

[Matplotlib-users] problems installing matplotlib on RHEL5 with easy_install

2008-04-23 Thread Michael Hearne
e happy to provide more detailed error messages, or do some basic tests. Thanks, Mike -- Michael Hearne [EMAIL PROTECTED] (303) 273-8620 USGS National Earthquake Infor

Re: [Matplotlib-users] How to close the figure after show it?

2008-03-20 Thread Michael Hearne
Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users ----------

[Matplotlib-users] fill() function

2008-03-13 Thread Michael Hearne
fill(array([0.25,0.75,0.75,0.25,0.25]),array ([0.75,0.75,0.25,0.25,0.75]),color='#FF') ax.fill(array([0.25,0.75,0.75,0.25,0.25]),array ([0.75,0.75,0.25,0.25,0.75]),color=(1,0,0)) Thanks, Mike Hearne ---------- Michael Hearne [EMAIL PROTE

[Matplotlib-users] axis.fill()

2008-03-13 Thread Michael Hearne
l(array([0.25,0.75,0.75,0.25,0.25]),array ([0.75,0.75,0.25,0.25,0.75]),color=(1,0,0)) How can I specify an non-predefined color for the fill() function? I am using matplotlib version 0.90.1, I think. I don't know the best way to get my matplotlib version information.

[Matplotlib-users] LinearSegmentedColormap

2008-03-12 Thread Michael Hearne
99, 0.498039215803, 0.498039215803], [0.0099977648, 0.372549027205, 0.372549027205], [0.01999553, 0.247058823705, 0.247058823705], [0.1000149, 0.121568627656, 0.121568627656], [0.2000298, 0.0, 0.0], [1.0, 0.0, 0.0]]} ---

Re: [Matplotlib-users] basemap scalebar

2008-03-04 Thread Michael Hearne
height of the bar and the text offset be relative to the length of it? I suppose if the height becomes a problem, people could use the yoffset keyword... --Mike On Mar 4, 2008, at 6:05 AM, Jeff Whitaker wrote: Michael Hearne wrote: Jeff - That would replicate the "simple" scale-ba

Re: [Matplotlib-users] basemap scalebar

2008-03-03 Thread Michael Hearne
lat_1=50.,lon_0=-107.) # draw coastlines and political boundaries. m.drawcoastlines() m.fillcontinents() # draw parallels and meridians. # label on left, right and bottom of map. m.drawparallels(arange(0.,80,20.),labels=[1,1,0,1]) m.drawmeridians(arange(10.,360.,30.),labels=[1,1,0,1]) # draw a line

[Matplotlib-users] basemap scalebar

2008-03-03 Thread Michael Hearne
Does the capability exist in basemap to create a scale bar on the map? If not, is this planned for the future? For reference, see the -L option in GMT's psbasemap, pscoast, etc. Thanks, -- Michael Hearne [EMAIL PROTECTED] (303

Re: [Matplotlib-users] preventing extra whitespace around figure

2008-02-29 Thread Michael Hearne
forge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users ------ Michael Hearne [EMAIL PROTECTED] (303) 273-8620 USGS National Earthquake Information Center 1711 Illinois St. Golden CO 80401 Senior Software Engineer S

[Matplotlib-users] preventing extra whitespace around figure

2008-02-28 Thread Michael Hearne
2,markersize=5) map.drawmapboundary(color='k',linewidth=2.0) savefig('maptest.eps') close('all') --- -- Michael Hearne [EMAIL PROTECTED] (303) 273

[Matplotlib-users] Preventing overlapping text on axes

2008-02-27 Thread Michael Hearne
All: I'm using the text() function to place city labels on a map with Basemap. However, many of these cities are so close together that the labels overlap when they're placed on the map. Is there some way to determine the bounding box for a given text object _before_ placing it on the map,

Re: [Matplotlib-users] labeling contours with roman numerals

2007-12-14 Thread Michael Hearne
ng was posted a little while back (by someone else): class FormatFaker(object): def __init__(self, str): self.str = str def __mod__(self, stuff): return self.str A=arange(100).reshape(10,10) CS=contour(A,[50,]) CS.clabel(fmt=FormatFaker('Some String')) From: Michael Hearne <

Re: [Matplotlib-users] transparent background for encapsulated postscript output

2007-12-14 Thread Michael Hearne
.add_axes([0.1,0.425,0.15,0.15]) m2 = Basemap(projection='ortho',lon_0=-105,lat_0=40,ax=ax2) m2.drawmapboundary(fill_color='aqua') m2.drawcoastlines(linewidth=0.1) m2.fillcontinents(color='coral',lake_color='aqua') pylab.show() ---

Re: [Matplotlib-users] transparent background for encapsulated postscript output

2007-12-14 Thread Michael Hearne
12:49 PM, Jeff Whitaker wrote: Michael Hearne wrote: Jeff - Darn it. So is there a way to embed an axis _inside_ another, possibly with a transparent background? --Mike Mike: Not quite sure why you need to have it transparent - you definitely can't have that with postscri

[Matplotlib-users] transparent background for encapsulated postscript output

2007-12-14 Thread Michael Hearne
t output? Thanks, Mike ---------- Michael Hearne [EMAIL PROTECTED] (303) 273-8620 USGS National Earthquake Information Center 1711 Illinois St. Golden CO 80401 Senior Software

[Matplotlib-users] labeling contours with roman numerals

2007-12-13 Thread Michael Hearne
Does a LineCollection generated by contour() have a property that holds the labels? I would like to label my contour lines with roman numerals, and cannot figure out how to get clabel to do that. Thanks, Mike -- Michael Hearne [EMAIL

[Matplotlib-users] setting figure extent to only include extent of Axes

2007-12-12 Thread Michael Hearne
n automated system and I'd prefer not to have to bomb out to a shell for something like that. Thanks, Mike ---------- Michael Hearne [EMAIL PROTECTED] (303) 273-8620 USGS National Earthquake Information Center 1711 Illinois St. Golden CO 80401

[Matplotlib-users] converting GMT color palettes to pylab colormaps

2007-12-05 Thread Michael Hearne
d(10,10),cmap=my_cmap) colorbar() savefig('colormap.png') -- Michael Hearne [EMAIL PROTECTED] (303) 273-8620 USGS National Earthquake Information Center 1711 Illin

Re: [Matplotlib-users] Basemap questions

2007-11-02 Thread Michael Hearne
If I set xoffset=-0.01*5.91, I get -0.05. This is not noticeably different than the default. Is the problem that my dataset is not projected? --Mike On Nov 2, 2007, at 1:33 PM, Jeff Whitaker wrote: Michael Hearne wrote: Jeff - I looked at that example file, and I think there's a big

Re: [Matplotlib-users] Basemap questions

2007-11-02 Thread Michael Hearne
goal is to get the labels inside the edge of the map (I tried negative numbers to accomplish this, to no effect.) On a positive note, I _can_ make solid lines! Thanks for all of your help, Mike On Nov 2, 2007, at 11:47 AM, Jeff Whitaker wrote: Michael Hearne wrote: I have two questions: 1) Th

Re: [Matplotlib-users] Basemap questions

2007-11-02 Thread Michael Hearne
how to _get_ it. Do I have to download/build ogr first, then install the python bindings? --Mike On Nov 2, 2007, at 10:06 AM, Pierre GM wrote: On Friday 02 November 2007 11:51:55 Michael Hearne wrote: 2) Has anyone figured out a way to make an _ocean_ mask? I need my map to look like this

[Matplotlib-users] Basemap questions

2007-11-02 Thread Michael Hearne
I have two questions: 1) The fillcontinents() method has a zorder keyword parameter. Is this supposed to work with imshow()? I have the latest tarball from the website, and I can't get my image to paint on top of the continents. 2) Has anyone figured out a way to make an _ocean_ mask? I