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
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
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
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
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
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
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
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
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
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
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
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'
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
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
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_
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
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)
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('
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
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
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'
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
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
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 =
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
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
/
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.
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:
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 "
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
--
27;output.eps')
savefig('output.png')
--
----------
Michael Hearne
[EMAIL PROTECTED]
(303) 273-8620
USGS National Earthquake Information Center
1711 Illinois St. Golden
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
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
--
-------
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
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
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
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
: 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
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'})
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
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
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
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
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
----------
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
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.
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]]}
---
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
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
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
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
2,markersize=5)
map.drawmapboundary(color='k',linewidth=2.0)
savefig('maptest.eps')
close('all')
---
--
Michael Hearne
[EMAIL PROTECTED]
(303) 273
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,
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 <
.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()
---
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
t output?
Thanks,
Mike
----------
Michael Hearne
[EMAIL PROTECTED]
(303) 273-8620
USGS National Earthquake Information Center
1711 Illinois St. Golden CO 80401
Senior Software
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
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
d(10,10),cmap=my_cmap)
colorbar()
savefig('colormap.png')
--
Michael Hearne
[EMAIL PROTECTED]
(303) 273-8620
USGS National Earthquake Information Center
1711 Illin
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
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
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
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
64 matches
Mail list logo