You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
| 2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
| 2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
| 2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
| 2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
| 2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
| 2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
| 2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
| 2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
| 2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
| 2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
| 2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
| 2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
| 2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
1
(3) |
2
(9) |
3
(4) |
|
4
(1) |
5
|
6
(5) |
7
(8) |
8
(11) |
9
(15) |
10
(5) |
|
11
(2) |
12
|
13
(7) |
14
(4) |
15
(13) |
16
(6) |
17
(1) |
|
18
|
19
(16) |
20
(10) |
21
(13) |
22
(13) |
23
(3) |
24
(1) |
|
25
(3) |
26
(4) |
27
(1) |
28
(6) |
29
(6) |
30
(1) |
31
|
|
From: John H. <jdh...@ac...> - 2004-07-13 21:53:07
|
OK, made some headway here.
When profiling for performace, I often turn off the GUI so my numbers
aren't influenced by the user interface
> /usr/local/lib/python/profile.py plotmap.py -dAgg > prof.out
Here are the profile results sorted by cumulative time for your script
- only the most expensive functions are shown
7.590 proj.py:43(__call__)
7.080 os.py:611(popen2)
7.050 popen2.py:31(__init__)
7.050 popen2.py:143(popen2)
2.610 matlab.py:1305(savefig)
On my system, over half the time is spent running your popen process.
Can't help you with this one :-). To get better numbers and focus on
matplotlib, I cached the xy points that the popen process is
generating to a pickled list.
You're using pcolor to generate the colormap. pcolor uses
collections, which is already pretty fast (agg implements collection
drawing in extension code, no python loops needed to make a pcolor).
However, you can get better performace still from imshow with the data
limits set. This will approximately double the performance of the
image part of the map. I had to make some changes to matplotlib (see
below) because image origin wasn't playing nicely with image extent -
this also fixes Andrew's bug.
For the line part of the map, I extended the
matplotlib.collections.LineCollection class to handle a sequence of
lines, where each line is defined by a list of tuples (x0,y0), (x1,
y1), ... Thus all of your lines are handled by a single object,
rather than having 1800+ separate line objects created in plot.
Again, no python loops required.
In the current form, the code takes about 1.15s to run on my machine
and is about 30x faster than the original code you posted which
includes the data loading part. Nonetheless, the matplotlib part is
much faster too, as you'll see when you interact with the data.
I'm including a link to a matplotlib snapshot below which includes the
required changes. As a bonus, you can try out the new navigation
toolbar (in progress, only works w/ gtk and gtkagg). It includes a
view limits stack, hand pan, and zoom to rectangle. Much nicer for
map navigation. And with the changes, you can actually interact with
your data with reasonable performance. I need to add some more
features to the toolbar, but give it a test drive and let me know if
you have suggestions. Set 'toolbar: toolbar2' in matplotlibrc
Thanks much for the fink package - I'll continue to point OS X users
to your site!
JDH
### matplotlib shapshot:
http://nitace.bsd.uchicago.edu:8080/files/share/matplotlib-0.60.3a.tar.gz
### Here is a link to the xy point data:
http://nitace.bsd.uchicago.edu:8080/files/share/xypts.pickled
### Here is the code snippet I used to generate it
xypts = []
for line in wcl:
splitline = line.split()
if splitline[0] == '#':
segnum = segnum + 1
if segnum > 1:
# convert lon,lat to map coordinates x,y
xys = zip(*proj(Numeric.array(lons),Numeric.array(lats)))
xypts.append( xys)
pickle.dump(xypts, file('xypts.pickled', 'w') )
### Here is the modified plotmap script which uses imshow and line
### collections
import time
from matplotlib.matlab import *
from matplotlib.collections import LineCollection
from proj import Proj
import Numeric, cPickle
# set the default params for imshow
rc('image', origin='lower', cmap='jet')
ax = subplot(111)
nx = 349; ny = 277
dx = 32463.41; dy = 32463.41
xmax = (nx-1)*dx; ymax = (ny-1)*dy # size of domain to plot
datin = open('topodata.pickle','rb')
C = cPickle.load(datin)
# use imshow rather than pcolor for speed
im = ax.imshow(C, interpolation='nearest',
extent=(0, xmax, 0, ymax))
xypts = cPickle.load(file('xypts.pickled', 'r') )
# all args are sequences, length 1 in case of linewidths and
# antialiased
collection = LineCollection(segments = xypts,
colors = ( (0,0,0,1), ), # black
linewidths = (1.5,),
antialiaseds = (0,), # turn off aa for speed
)
ax.add_collection(collection)
# you have to manually update the datalim; this is a bit ugly so I'll
# work on the interface
xs = [ x for thisline in xypts for x,y in thisline ]
ys = [ y for thisline in xypts for x,y in thisline ]
minx, maxx = min(xs), max(xs)
miny, maxy = min(ys), max(ys)
ax.update_datalim( ((minx, miny), (maxx, maxy)))
axis([0, xmax, 0, ymax])
ax.set_xticks([]) # no ticks
ax.set_yticks([])
title('40 km Topography - Lambert Conformal Conic Projection')
#savefig('test4')
show()
|
|
From: John H. <jdh...@ac...> - 2004-07-13 14:44:59
|
>>>>> "Andrew" == Andrew Straw <str...@as...> writes:
Andrew> OK, I discovered a rather easy demonstration of what looks
Andrew> to be a OK, (possibly the same) bug (adding 'ylim' to the
Andrew> image_origin demo):
from matplotlib.matlab import *
x = arange(100.0); x.shape = 10,10
subplot(211)
title('blue should be up')
imshow(x, origin='upper', interpolation='nearest')
set(gca(),'ylim',(0,23))
subplot(212)
title('blue should be down')
imshow(x, origin='lower', interpolation='nearest')
set(gca(),'ylim',(0,23))
#savefig('image_origin2')
show()
I agree it looks like a bug. Just to make sure we are on the same
page: what do you thing the correct behavior should be here? Do you
think subplot (211) is correct?
The question is: how should image origin interact with the axes
ylimits? In this example, should both images fill the space from 0-10
on the y axes, regardless of the ylimit setting? In the origin upper
case, should the blue strip be at 10 and the red strip at zero? In
the origin lower case, should the blue be at zero and the red at 10?
Inquiring minds want to know.
Thanks,
JDH
|
|
From: Jeff W. <js...@fa...> - 2004-07-13 13:50:57
|
On Tue, 13 Jul 2004, John Hunter wrote: > > I am having trouble running this - proj.py is making the system call > 'stdin,stdout=os.popen2(cmd,mode='b')' where cmd is > > proj +R=63712000 +lon_0=-107 +proj=lcc +lat_1=50 +lat_2=50 -b > > but I don't have proj on my system. Am I missing something? Is this > a tool I can easily install? John: Yes, it's easy to install. You can grab it from http://proj.maptools.org. A simple ./configure; make; make install worked for me. > > Also, while I have your ear, what version of matplotlib are you > working with and what backend do you typically use? I have 0.60.2 and usually use the default gtkagg backend. I work mostly on OS X (I'm actually the fink package maintainer). > > Nice map, by the way! > Thanks - very nice software! -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/CDC1 FAX : (303)497-6449 325 Broadway Web : http://www.cdc.noaa.gov/~jsw Boulder, CO, USA 80305-3328 Office: Skaggs Research Cntr 1D-124 |
|
From: John H. <jdh...@ac...> - 2004-07-13 13:29:44
|
>>>>> "Jeff" == Jeff Whitaker <js...@fa...> writes:
Jeff> Hi:
Jeff> I've hacked together some scripts that let me plot data on
Jeff> top of world maps with different map projections in
Jeff> matplotlib. It's quite slow, but it works! There's an
Jeff> example at
Jeff> http://www.cdc.noaa.gov/people/jeffrey.s.whitaker/plotmap.py
Jeff> (the plot should look like
Jeff> http://www.cdc.noaa.gov/people/jeffrey.s.whitaker/plotmap.png).
Jeff> To run the example you'll need the data files
Jeff> http://www.cdc.noaa.gov/people/jeffrey.s.whitaker/wcl.txt
Jeff> (world coastlines) and
Jeff> http://www.cdc.noaa.gov/people/jeffrey.s.whitaker/topodata.pickle
Jeff> (data to plot), as well as a module I wrote to compute
Jeff> cartographic transformations using proj4
Jeff> http://www.cdc.noaa.gov/people/jeffrey.s.whitaker/python/proj.py.
Jeff> If anyone knows of a faster way to do this, I'd love to hear
Jeff> about it.
I am having trouble running this - proj.py is making the system call
'stdin,stdout=os.popen2(cmd,mode='b')' where cmd is
proj +R=63712000 +lon_0=-107 +proj=lcc +lat_1=50 +lat_2=50 -b
but I don't have proj on my system. Am I missing something? Is this
a tool I can easily install?
Also, while I have your ear, what version of matplotlib are you
working with and what backend do you typically use?
Nice map, by the way!
JDH
|
|
From: Jeff W. <js...@fa...> - 2004-07-13 12:00:28
|
Hi: I've hacked together some scripts that let me plot data on top of world maps with different map projections in matplotlib. It's quite slow, but it works! There's an example at http://www.cdc.noaa.gov/people/jeffrey.s.whitaker/plotmap.py (the plot should look like http://www.cdc.noaa.gov/people/jeffrey.s.whitaker/plotmap.png). To run the example you'll need the data files http://www.cdc.noaa.gov/people/jeffrey.s.whitaker/wcl.txt (world coastlines) and http://www.cdc.noaa.gov/people/jeffrey.s.whitaker/topodata.pickle (data to plot), as well as a module I wrote to compute cartographic transformations using proj4 http://www.cdc.noaa.gov/people/jeffrey.s.whitaker/python/proj.py. If anyone knows of a faster way to do this, I'd love to hear about it. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/CDC1 FAX : (303)497-6449 325 Broadway Web : http://www.cdc.noaa.gov/~jsw Boulder, CO, USA 80305-3328 Office: Skaggs Research Cntr 1D-124 |
|
From: Andrew S. <str...@as...> - 2004-07-13 01:07:16
|
John Hunter wrote:
>
> Andrew> John+Perry+whoever: the only matplotlib bug I found this
> Andrew> time is worked around by the line
>
> >> rcParams['image.origin'] = 'upper' # 'lower': nav toolbar
> >> problem -ADS
>
> Andrew> We should fix that at some point.
>
>What was the bug? I didn't notice any problems with lower.
>
>
OK, I discovered a rather easy demonstration of what looks to be a
(possibly the same) bug (adding 'ylim' to the image_origin demo):
from matplotlib.matlab import *
x = arange(100.0); x.shape = 10,10
subplot(211)
title('blue should be up')
imshow(x, origin='upper', interpolation='nearest')
set(gca(),'ylim',(0,23))
subplot(212)
title('blue should be down')
imshow(x, origin='lower', interpolation='nearest')
set(gca(),'ylim',(0,23))
#savefig('image_origin2')
show()
|
|
From: Andrew S. <as...@ca...> - 2004-07-11 01:12:03
|
John Hunter wrote: > Andrew> John+Perry+whoever: the only matplotlib bug I found this > Andrew> time is worked around by the line > > >> rcParams['image.origin'] = 'upper' # 'lower': nav toolbar > >> problem -ADS > > Andrew> We should fix that at some point. > >What was the bug? I didn't notice any problems with lower. > > Try vertically zooming and panning with the matplotlib toolbar -- you'll see that the overlay points move opposite from the data. Maybe it's my head that's on wrong, though. :) >Updates are in CVS - thanks for the submission. > > Thanks for the suggestions. You'll make a respectable (matplotlib) programmer out of me yet! Cheers! Andrew |
|
From: Brian S. <bs...@ad...> - 2004-07-11 00:00:46
|
> -----Original Message----- > From: John Hunter [mailto:jdh...@ac...] > Sent: Saturday, July 10, 2004 9:28 AM > To: bs...@ad... > Cc: mat...@li... > Subject: Re: [Matplotlib-users] not showing navigation controls > > > >>>>> "Brian" == Brian Sturk <bs...@ad...> writes: > > Brian> Is it possible to hide this in a plot? I checked the FAQ, > Brian> the archived messages, and the class lib docs and couldn't > Brian> seem to find a way to. ~brian > > Which backend are you using? > > JDH I believe I was using the default (seemed like Tkinter). I will end up using this with wxPython if I can. thanks for responding... ~brian -- .--------------------------------------------------,--------. | Brian Sturk - http://users.adelphia.net/~bsturk \ C/C++ | |-------------------------. bsturk<AT>adelphia.net | Python | | http://www.telengard.com `------------------------`-------| | Telengard Technologies Inc. - NT/*nix UI & device drivers | `-----------------------------------------------------------' |
|
From: John H. <jdh...@ac...> - 2004-07-10 20:10:39
|
>>>>> "Andrew" == Andrew Straw <str...@as...> writes:
Andrew> Hi All, I've added a new example, embedding_in_wx3, to
Andrew> CVS. From the docstring:
Coincidentally, I was also working on a different embedding_in_wx3
which shows how to use a custom toolbar, in response to another
question off list. I changed the name submitted that as
embedding_in_wx4 :-)
Andrew> John+Perry+whoever: the only matplotlib bug I found this
Andrew> time is worked around by the line
>> rcParams['image.origin'] = 'upper' # 'lower': nav toolbar
>> problem -ADS
Andrew> We should fix that at some point.
What was the bug? I didn't notice any problems with lower.
BTW, the recommended way to set rc params in now with the rc command.
This was initially defined in matplotlib.matlab but I just moved it to
matplotlib.__init__.py to make it accessible to application
developers. You can do
matplotlib.rc('image', origin='lower')
and set multiple image params with multiple kwargs.
self.toolbar.update() # Not sure why this is needed - ADS
This updates the Axes menu on the toolbar, which is needed if the
number of axes have changed. Since the number of axes/subplots can
change after the figure/toolbar was created, this tells the toolbar to
update it's axes menu.
Another comment: try not to use x.resize in matplotlib examples,
because of the Numeric bug (did you get the emails Todd and I
exchanged regarding this?). Numeric segfaulted for me when I
initially ran your example with the .resize command.
Note that matplotlib.mlab has the meshgrid command for building mesh
arrays from 2 1D vectors. I replaced your code with
x = numerix.arange(120.0)*2*numerix.pi/60.0
y = numerix.arange(100.0)*2*numerix.pi/50.0
self.x, self.y = meshgrid(x, y)
z = numerix.sin(self.x) + numerix.cos(self.y)
Finally, there seems to be a figure size problem on linux: when I run
your example the figure window is too small and the image wraps.
Updates are in CVS - thanks for the submission.
JDH
|
|
From: Andrew S. <str...@as...> - 2004-07-10 18:43:57
|
Hi All, I've added a new example, embedding_in_wx3, to CVS. From the docstring: > This is yet another example of using matplotlib with wx. Hopefully > this is pretty full-featured: > > - both matplotlib toolbar and WX buttons manipulate plot > - full wxApp framework, including widget interaction > - XRC (XML wxWidgets resource) file to create GUI (made with XRCed) > > This was derived from embedding_in_wx and dynamic_image_wxagg. > > Thanks to matplotlib and wx teams for creating such great software! John+Perry+whoever: the only matplotlib bug I found this time is worked around by the line > rcParams['image.origin'] = 'upper' # 'lower': nav toolbar problem -ADS We should fix that at some point. Cheers! Andrew |
|
From: John H. <jdh...@ac...> - 2004-07-10 13:52:55
|
>>>>> "Brian" == Brian Sturk <bs...@ad...> writes:
Brian> Is it possible to hide this in a plot? I checked the FAQ,
Brian> the archived messages, and the class lib docs and couldn't
Brian> seem to find a way to. ~brian
Which backend are you using?
JDH
|
|
From: Andrew S. <str...@as...> - 2004-07-10 06:31:30
|
John Hunter wrote: >>>>>>"John" == John Hunter <jdh...@ac...> writes: >>>>>> >>>>>> > > John> Haven't had a chance to test your example yet but hopefully > John> I can take a look tomorrow. I haven't done much memory leak > John> testing against the _image module yet so this will be a good > John> opportunity. I very recently rewrote _image.cpp using cxx. > John> I trust you have a fresh CVS checkout? > >Hi Andrew - found and fixed the memory leak. Can't really call it a >leak - more like a "memory gusher". This was in the agg (and image) > > That makes a HUGE difference -- great! >I made a number of comments in your example to point out places where >you probably should be using matplotlib a little differently. > > OK, I see I have a lot of learning to do! It's a lot cleaner now, but I left comments in for "common pitfalls to avoid when embedding in wx" enthusiasts. >Please add it to CVS. > > Done. >I liked the example so much I made an analogous one dynamic_image_gtk. > > Cool! The GTK demo is nice because of the simplicity allowed by not embedding in a foreign GUI, but mainly using the matplotlib interface. >It's faster than wxagg (13FPS vs 4FPS on my system) which is not >surprising since gtkagg has extension code to transfer agg to the GUI >canvas, > It's even less surprising given that the wxagg app is driven by a timer callback set to run at 5 FPS! :) >and doesn't flicker. Very nice! I would really like to get >that wxagg flicker problem figured out, and the extension code >added... Did I hear you volunteering to be the wxagg maintainer :-)? > > Well, I'll hopefully have a chance to poke around in wxagg once in a while, but "maintainer" may be a bit grandiose for my time availability in the forseeable futurue... Cheers! Andrew |
|
From: Brian S. <bs...@ad...> - 2004-07-10 02:10:27
|
Is it possible to hide this in a plot? I checked the FAQ, the archived messages, and the class lib docs and couldn't seem to find a way to. ~brian |
|
From: John H. <jdh...@ac...> - 2004-07-09 22:16:59
|
>>>>> "esatel" == esatel <eli...@pa...> writes:
esatel> Hi. Am a new user, running Enthought Python23 on Windows
esatel> XP. I am trying to run the simple_plot and subplot_demo.py
esatel> examples. I am getting the error message below regardless
esatel> of which backend I use. Am I doing something wrong in the
esatel> configuration? Thanks Eli
No. we're doing something wrong.
There was a bug in the font manager in the 0.60.1 release. matplotlib
searches your computer for fonts and stores the results in a cache
table on the filesystem. Regular users of matplotlib (like me!) have
a cache table already built and so did not find the bug in prerelease
tests. New users (like you) will experience the bug when you first
load matplotlib.
I've uploaded a 0.60.2 matplotlib release to the sourceforge site that
fixes the bug. This includes the src distributions and the windows
distribution for Numeric (which should work fine with the enthought
edition of python). The numarray/matplotlib builds for win32 will be
up as soon as we can get them done.
Sorry for the trouble,
JDH
|
|
From: esatel <eli...@pa...> - 2004-07-09 21:27:43
|
Hi. Am a new user, running Enthought Python23 on Windows XP. I am trying to
run the simple_plot and subplot_demo.py examples. I am getting the error
message below regardless of which backend I use. Am I doing something wrong
in the configuration?
Thanks
Eli
C:\Python23\Lib\site-packages\matplotlib>python subplot_demo.py
Traceback (most recent call last):
File "subplot_demo.py", line 1, in ?
from matplotlib.matlab import *
File "C:\Python23\Lib\site-packages\matplotlib\matlab.py", line 142, in ?
from axes import Axes
File "C:\Python23\Lib\site-packages\matplotlib\axes.py", line 10, in ?
from axis import XTick, YTick, XAxis, YAxis
File "C:\Python23\Lib\site-packages\matplotlib\axis.py", line 20, in ?
from font_manager import FontProperties
File "C:\Python23\Lib\site-packages\matplotlib\font_manager.py", line
918, in ?
fontManager = FontManager()
File "C:\Python23\Lib\site-packages\matplotlib\font_manager.py", line
763, in __init__
self.ttfdict = createFontDict(self.ttffiles)
File "C:\Python23\Lib\site-packages\matplotlib\font_manager.py", line
410, in createFontDict
prop = ttfFontProperty(font)
File "C:\Python23\Lib\site-packages\matplotlib\font_manager.py", line
224, in ttfFontProperty
sfnt2 = font.get_sfnt_name(2)
AttributeError: get_sfnt_name
|
|
From: Jared W. <wah...@um...> - 2004-07-09 19:51:09
|
For a start, you can replace 'PS' with 'SVG' in pstest.py in the
examples. Otherwise, any of the examples that don't have mathtext or
images should work. Just add
import matplotlib
matplotlib.use('SVG')
at the beginning and then
savefig('myfilename')
at the end.
jared
On Fri, 2004-07-09 at 06:59, Flavio Codeco Coelho wrote:
> So...
>=20
> can we type=20
>=20
> matplotlib.use('SVG')=20
>=20
> and start playing with it or what?
>=20
> what about some examples?;)
>=20
>=20
>=20
>=20
> Fl=C3=A1vio Code=C3=A7o Coelho,
> PhD
>=20
> Programa de Computa=C3=A7=C3=A3o
> Cient=C3=ADfica
>=20
> Funda=C3=A7=C3=A3o Oswaldo Cruz
>=20
> Rio de Janeiro --
> Brasil
>=20
>=20
>=20
>=20
>=20
>=20
> ______________________________________________________________________
|
|
From: Peter G. <pgr...@ge...> - 2004-07-09 18:20:59
|
John Hunter wrote: >I hesitate to call this a bug. I have been hard at work on the >matplotlib.mind_reading module but it is incomplete. > > c'mon John... it's about time you this thing done! ); -- Peter Groszkowski Gemini Observatory Tel: +1 808 974-2509 670 N. A'ohoku Place Fax: +1 808 935-9235 Hilo, Hawai'i 96720, USA |
|
From: Andrew B. <be...@da...> - 2004-07-09 17:36:14
|
Hi - By passing the list of lines, the problem is solved, thanks! It is the case though that the intelligent guess does fail when you do an 'errorbar plot' sequence but not when you do a 'plot errorbar' sequence. In this first case, the legend associated with the 'plot' is always a straight black line no matter what the requested format. Thanks for the help, /\ ps. am using matplotlib-0.60.1 |
|
From: John H. <jdh...@ac...> - 2004-07-09 12:02:27
|
becker> however the legend is incorrect/incomplete if i change the order the
becker> plots are done
> sp = matlib.subplot(111)
> ctio = sp.errorbar(jd, f, yerr=df, fmt='bo', ecolor='k', capsize=1)
> mlfit = sp.plot(mljd, mlflux, 'r-')
> snfit = sp.plot(mljd, mlflux, 'g-')
> sp.legend( ('ML fit', 'SN fit', 'CTIO'), loc='upper right')
I hesitate to call this a bug. I have been hard at work on the
matplotlib.mind_reading module but it is incomplete. That is,
matplotlib does not know what you want the legend to look like, you
have to tell it.
It does try to make an intelligent guess if you don't tell it, and it
guesses by assuming the order the labels you give is the same as the
order of the plot commands. If you want otherwise, you need to pass
it an explicit list of line or patch handles. Something like
# errorbar returns two values, the plot line and the list of
# errorbar lines
ctio, errlines = sp.errorbar(jd, f, yerr=df, fmt='bo', ecolor='k', capsize=1)
# note the comma in the return value. plot returns *a list of
# lines*. Since you have a length one list, I'm extracting the
# first element of the list using tuple unpacking
mlfit, = sp.plot(mljd, mlflux, 'r-')
snfit, = sp.plot(mljd, mlflux, 'g-')
# by passing a list of lines, you can control the order
sp.legend( (mlfit, snfit, ctio), ('ML fit', 'SN fit', 'CTIO'), loc='upper right')
See http://matplotlib.sf.net/examples/legend_demo2.py for an example;
all the examples can also be found in the examples subdirectory of the
matplotlib src distribution, *.tar.gz or *.zip.
Hope this helps,
JDH
|
|
From: John H. <jdh...@ac...> - 2004-07-09 11:53:08
|
>>>>> "Jeffrey" == Jeffrey Jones <Jef...@gs...> writes:
Jeffrey> I am preparing to install matplotlib on a Mac OS X system
Jeffrey> (10.3.4). The installation page says I need to install
Jeffrey> freetype2.
Jeffrey> I already have Apple's X11 and X11sdk. I noticed that
Jeffrey> /usr/X11R6/lib contains libfreetype.a and
Jeffrey> libfreetype.dylib (the latter is a pointer to
Jeffrey> libfreetype.6.3.dylib).
Jeffrey> Is this what I need? If so, how do I tell matplotlib to
Jeffrey> use it?
In setuptext.py, there is a dictionary called basedirs, whose keys are
your sys.platform and values are a list of base dirs to search for
includes. libraries etc. That is how you set it.
Jeffrey> Also, if this is the same thing, any idea what "6.3"
Jeffrey> means in libfreetype.6.3.dylib? The tar file I got from
Jeffrey> the freetype web site is named freetype-2.1.9.tar, so it
Jeffrey> doesn't appear to make sense as a version number.
I think you'll have the greatest chance of success if you compile
zlib, libpng and freetype2 from src and install them to /usr/local,
and then make sure /usr/local is in your basedirs path, preferably
before any fink stuff. If you do that, and make sure you have a
working X11 and GUI backend installed (if you want a GUI, you'll need
a working Tkinter, pygtk or wxpython), then your install should go
fairly smoothly).
There have been a number of posts on the users and development mailing
lists posting build notes for OS X. Unfortunately, the sourceforge
mailing list search capability is about the worst I've ever seen.
Here's one link -
http://sourceforge.net/mailarchive/message.php?msg_id=8799801.
I have an darwin laptop and managed to get every backend installed,
including gtkagg. I had to install all the gtk components from src,
piece-by-piece. I initially used fink but kept getting stuck at
various points (gtk, scipy) and eventually gave up and went old
school, doing everything from src. If you are a fink user and don't
need the latest features, I believe there is a matplotlib fink
package; google for matplotlib fink.
Good luck, please post your compile notes with success and complaints
otherwise.
JDH
|
|
From: John H. <jdh...@ac...> - 2004-07-09 11:42:08
|
>>>>> "danny" == danny shevitz <dan...@ya...> writes:
danny> Howdy, Is there an easy way to turn off the minor gridlines
danny> in a (semi)log plot? I just want the ones that are at the
danny> powers of ten.
Not currently.
Technically, there are not major and minor ticks for the default log
tick locator and formatter, there are only major ticks and the decades
are labeled. It is on my list of things to do to break these into
major and minor ticks. At that point it will be fairly easy to turn
on and off the grids separately for the major and minor ticks.
If you want to look into this, the relevant code is LogLocator and
LogFormatter in matplotlib.ticker.py. It should be fairly easy to
modify this code to support major and minor ticks separately.
JDH
|
|
From: <cf...@th...> - 2004-07-09 07:16:38
|
It's bothered me a little that I couldn't build an rpm of matplotlib, so I resolved to work it out this time. These are the issues I had: setup.py imports gtk while checking backend compatablity. This fails because the gtk module won't load if the DISPLAY variable is not set. The trouble lies in /usr/lib/rpm/redhat/macros on my system, and commenting out the unset DISPLAY lines does the trick. That whole section of the file is identified as slightly superfluous by the comments, if I'm reading them right. I'm not very handy with rpm macros. A known distutils issue causes the procedure to complain all the way at the end, about there being the wrong number of files in the rpm. There are three ways to fix it that I found: 1) Ignore it. The rpm is built, but not copied into the dist directory. Get it from build/bdist.linux-i686/rpm/RPMS, or as appropriate for your platform. 2) Apply a distutils patch: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=731328&group_id=5470. I haven't actually tried it. 3) Add this line to your ~/.rpmmacros: %debug_package %{nil}. You will get a much larger rpm. It looks like the binaries have debugging information included. Chris Fuller |
|
From: John H. <jdh...@ac...> - 2004-07-09 02:34:59
|
What's new in matplotlib-0.60.1 * figure images (pixel-by-pixel, not resampled) with the figimage command. Multiple figure images (ie mosaics) with alpha blending are supported. See http://matplotlib.sf.net/examples/figimage_demo.py * multiple axes images with imshow using alpha blending. See http://matplotlib.sf.net/screenshots.html#layer_images * unified color limit and color mapping arguments to pcolor, scatter, imshow and figimage. Interactive control of colormap and color scaling with new matplotlib.matlab commands jet, gray and clim. New matplotlib rc parameters for default image params. image origin can be upper or lower - see http://matplotlib.sf.net/examples/image_origin.py * colorbar - http://matplotlib.sf.net/matplotlib.matlab.html#-colorbar - now works with imshow, pcolor, and scatter * new 'draw' command to redraw the figure - use this in place of multiple calls to show. This is equivalent to doing get_current_fig_manager().canvas.draw(), but takes less typing :-) * support for py2exe - see http://matplotlib.sf.net/py2exe_examples.zip * New finance demo shows off many of the features of matplotlib - see screenshot at http://matplotlib.sf.net/screenshots.html#finance_work2 * new matplotlib.matlab command 'rc' for dynamic control of rc parameters. See http://matplotlib.sf.net/matplotlib.matlab.html#-rc and example http://matplotlib.sf.net/examples/customize_rc.py * Andrew Straw submitted a dynamic_image example. The wx version is still in progress and has some flicker problems, but the gtk version is pretty cool - http://matplotlib.sf.net/examples/dynamic_image_gtkagg.py * Bug fixes: dynamic_demo_wx, figure legends, memory leaks, axis scaling bug related to singleton plots, mathtext bug for '6', some numarray bug workarounds See http://matplotlib.sf.net/CHANGELOG for details Downloads at http://sourceforge.net/projects/matplotlib Enjoy! JDH |
|
From: Peter G. <pgr...@ge...> - 2004-07-09 01:26:41
|
You can always do this by adding: SetEnv PYTHONPATH /locations/of/packages/want/to/import/ to your apache config file. -- Peter Groszkowski Gemini Observatory Tel: +1 808 974-2509 670 N. A'ohoku Place Fax: +1 808 935-9235 Hilo, Hawai'i 96720, USA Rodrigo Caballero wrote: > I did some python CGI scripting at one point, and I needed to do > something like > > os.environ['MATPLOTLIBDATA'] = '/where/matplotlib/lives' > > before the matplotlib import ... hope that helps, > > rodrigo > > --- > > Rodrigo Caballero Augi (http://geosci.uchicago.edu/~rca) > Research Associate > Department of the Geophysical Sciences, University of Chicago > 5734 South Ellis Avenue, Chicago, IL 60637, USA. > > > On Thursday, July 8, 2004, at 06:26 PM, Jonathan Hanson wrote: > >> I'm having issues importing matplotlib into my python script, but >> only when runing under PHP. >> >> The line: >> from matplotlib import * >> >> causes my .py script to return an error code "1" when being called >> from inside a PHP script. However, the script runs just fine when >> called from the command line. >> >> If i comment out the above line and all the matplotlib-related >> commands in my script, it will run just fine (but without plots of >> course). But the include command alone is enough to cause an error 1 >> return. >> >> I have been through every documentation source I can find, I've tried >> every variation of import i can think of, and I've come up with a big >> fat 0. I've tried something like: >> sys.path.append("/usr/lib/python2.3/site-packages/matplotlib") >> after the sys import and before the matplotlib import thinking there >> was a path issue with the apache user, and got jack squat out of that. >> >> Has anyone else had issues calling python scripts from inside PHP? >> All my other imports below: >> # Module Imports >> from optparse import OptionParser >> import sys >> #from matplotlib import * >> from os import listdir >> from string import split >> from array import array >> from time import time#, ctime >> >> work just fine. I've been on this for 3 solid days, someone either >> shoot me or help me! Thanks. >> >> >> ------------------------------------------------------- >> This SF.Net email sponsored by Black Hat Briefings & Training. >> Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital >> self defense, top technical experts, no vendor pitches, unmatched >> networking opportunities. Visit www.blackhat.com >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital > self defense, top technical experts, no vendor pitches, unmatched > networking opportunities. Visit www.blackhat.com > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Andrew B. <be...@da...> - 2004-07-09 01:18:09
|
hi - the following works ok...
> sp = matlib.subplot(111)
> mlfit = sp.plot(mljd, mlflux, 'r-')
> snfit = sp.plot(mljd, mlflux, 'g-')
> ctio = sp.errorbar(jd, f, yerr=df, fmt='bo', ecolor='k', capsize=1)
> sp.legend( ('ML fit', 'SN fit', 'CTIO'), loc='upper right')
however the legend is incorrect/incomplete if i change the order the
plots are done
> sp = matlib.subplot(111)
> ctio = sp.errorbar(jd, f, yerr=df, fmt='bo', ecolor='k', capsize=1)
> mlfit = sp.plot(mljd, mlflux, 'r-')
> snfit = sp.plot(mljd, mlflux, 'g-')
> sp.legend( ('ML fit', 'SN fit', 'CTIO'), loc='upper right')
thanks,
andy
|