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
(12) |
2
(15) |
3
(4) |
|
4
|
5
(1) |
6
(13) |
7
(8) |
8
(16) |
9
(10) |
10
(6) |
|
11
(11) |
12
(20) |
13
(8) |
14
(12) |
15
(10) |
16
(12) |
17
(6) |
|
18
(7) |
19
(18) |
20
(5) |
21
(9) |
22
|
23
(6) |
24
(3) |
|
25
|
26
(2) |
27
(26) |
28
(11) |
29
(9) |
30
(21) |
|
|
From: Eric F. <ef...@ha...> - 2006-06-10 07:01:46
|
Thanks. There were in fact several points of incompatibility with Numeric and numarray. (Normally I would have checked this, but I slipped up.) I have changed quiver.py and numerix to solve the immediate problem, and to slightly reduce the incidence of such problems in the future. The real solution, of course, will be a complete transition to numpy. Regarding griddata: I downloaded it a few minutes ago, built it, and tested it with numpy, and it worked fine, at least with the test.py that comes with the package. Looking very quickly at the code, I don't see anything specific to any numeric package; it is using the buffer interface at the C level and matplotlib.numerix at the python level. Perhaps the author, Jeff Whitaker, can shed more light on this question. Eric hu...@ya... wrote: > Hi, > > just to tell that the new quiver2 sample are not working with numarray. > > /usr/lib/python2.4/site-packages/matplotlib/quiver.py", line 237, in > _make_verts > scale = nx.amax(a) * math.sqrt(len(a)) # crude auto-scaling > AttributeError: 'module' object has no attribute 'amax' > > > I think that we will have soon a big problem with the scientific soft in > python. Some of them will use numpy, Numeric or numarray and they will be > totally incompatible. Theorically numpy was to do the reunification but a > transition period must exist. The module Numerix was doing it for matplotlib > but it's beginning to have more and more incompatibility. > The quiver problem is not the only one. I used a lot the griddata module to > interpolate some irregulary spaced data, it was working very fine but it's > not working with numpy and I don't have the skill to change it unfortunatly. > > I want to thank you for all the work done for matplotlib, the critics are only > to avoid people to be distressed because one day all their softs won't work > due to numpy/numarray/Numeric incompatibility and stop to use python. > > Regards, > > N. > > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Tom D. <tom...@al...> - 2006-06-09 23:11:12
|
FigureCanvasAgg seems to make fonts appear much larger that FigureCanvasWxAgg. I am trying to get plots generated interactively in a wx window to appear the same as those that I generate in a no display batch script that outputs .png files. I use FigureCanvasWxAgg for the former and FigureCanvasAgg for the latter. Is there a reason why the same font size would appear much larger in FigureCanvasAgg than FigureCanvasWxAgg. Is there another, better, way to achieve uniformity accross png outputs and wx on screen display? It doesn't look like one can use the FigureCanvasAgg for wx embedding or the FigureCanvasWxAgg for png generation because the former will not accept a parent window and the latter requires one. If anyone has any ideas I would greatly appreciate suggestions. --Tom |
|
From: Christopher B. <Chr...@no...> - 2006-06-09 22:30:23
|
hu...@ya... wrote:
> I think that we will have soon a big problem with the scientific soft in
> python. Some of them will use numpy, Numeric or numarray and they will be
> totally incompatible.
I understand and to some extent share, your frustration, but the problem
already existed with Numeric and numarray. Transitioning to numpy is the
solution -- not the problem.
> Theorically numpy was to do the reunification but a
> transition period must exist.
Yes, it must, and that's where we are now. It is a bit tricky, but once
numpy reached 1.0 (soon, I think and hope!), we can all start using it
and these problems will fade away....
> I want to thank you for all the work done for matplotlib, the critics are only
> to avoid people to be distressed because one day all their softs won't work
> due to numpy/numarray/Numeric incompatibility and stop to use python.
well, anyone using Numeric (or numarray), can just keep on using it for
a god while. So something that works now should work for a while into
the future.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
|
|
From: Fernando P. <fpe...@gm...> - 2006-06-09 21:15:29
|
On 6/9/06, Darren Dale <dd...@co...> wrote:
> I cant reproduce this. Are you sure it's a problem with matplotlib? It looks
> like its a problem with shutil and os.utime, not mpl. Are you sure you have
> write privileges for the file and the directory? Could another (k)ubuntu
> Dapper user please give this a try?
>
> On Friday 09 June 2006 11:42, massimo sandal wrote:
> > I have just reproduced it by doing an histogram in an interactive
> > ipython --pylab session and then exporting as 'figure.eps'.
> >
> > Just:
> > a=[...] <--numbers to histogram
> > hist(a)
> > savefig('hist001.eps')
> >
> > gives:
> >
> > exceptions.OSError Traceback (most
> > recent call last)
> >
> > /users/Massimo/synuclein/<ipython console>
> >
> > /usr/lib/python2.4/site-packages/matplotlib/pylab.py in savefig(*args,
> > **kwargs)
> > 809 def savefig(*args, **kwargs):
> > 810 fig = gcf()
> > --> 811 return fig.savefig(*args, **kwargs)
> > 812 if Figure.savefig.__doc__ is not None:
> > 813 savefig.__doc__ = _shift_string(Figure.savefig.__doc__)
> >
> > /usr/lib/python2.4/site-packages/matplotlib/figure.py in savefig(self,
> > *args, **kwargs)
> > 658 kwargs[key] = rcParams['savefig.%s'%key]
> > 659
> > --> 660 self.canvas.print_figure(*args, **kwargs)
> > 661
> > 662 def colorbar(self, mappable, cax=None, **kw):
> >
> > /usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py
> > in print_figure(self, filename, dpi, facecolor, edgecolor, orientation,
> > **kwargs)
> > 110 try:
> > 111 agg.print_figure(filename, dpi, facecolor,
> > edgecolor,
> > --> 112 orientation, **kwargs)
> > 113 except IOError, msg:
> > 114 error_msg_gtk('Failed to save\nError message:
> > %s'%(msg,), self)
> >
> > /usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py in
> > print_figure(self, filename, dpi, facecolor, edgecolor, orientation,
> > **kwargs)
> > 482 ps = self.switch_backends(FigureCanvasPS)
> > 483 ps.print_figure(filename, dpi, facecolor,
> > edgecolor,
> > --> 484 orientation, **kwargs)
> > 485 else:
> > 486 raise IOError('Do not know know to handle
> > extension *%s' % ext)
> >
> > /usr/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py in
> > print_figure(self, outfile, dpi, facecolor, edgecolor, orientation,
> > papertype)
> > 1121 fh = file(tmpfile)
> > 1122 print >>outfile, fh.read()
> > -> 1123 else: shutil.move(tmpfile, outfile)
> > 1124
> > 1125 def _print_figure_tex(self, outfile, dpi, facecolor,
> > edgecolor, orientation,
> >
> > /usr/lib/python2.4/shutil.py in move(src, dst)
> > 191 rmtree(src)
> > 192 else:
> > --> 193 copy2(src,dst)
> > 194 os.unlink(src)
> > 195
> >
> > /usr/lib/python2.4/shutil.py in copy2(src, dst)
> > 91 dst = os.path.join(dst, os.path.basename(src))
> > 92 copyfile(src, dst)
> > ---> 93 copystat(src, dst)
> > 94
> > 95
> >
> > /usr/lib/python2.4/shutil.py in copystat(src, dst)
> > 66 mode = stat.S_IMODE(st.st_mode)
> > 67 if hasattr(os, 'utime'):
> > ---> 68 os.utime(dst, (st.st_atime, st.st_mtime))
> > 69 if hasattr(os, 'chmod'):
> > 70 os.chmod(dst, mode)
> >
> > OSError: [Errno 1] Operation not permitted: 'hist001.eps'
> >
> > MPL is 0.87.3 compiled from source on gnu/linux Kubuntu 6.06
> > Thanks,
Massimo, I'm away from my ubuntu machine right now, so I can't test
this. In the meantime, try in ipython
xmode verbose
before running your code. This will generate a more detailed
traceback, which might give us some clues.
Cheers,
f
|
|
From: <hu...@ya...> - 2006-06-09 19:20:49
|
Hi,
just to tell that the new quiver2 sample are not working with numarray.
/usr/lib/python2.4/site-packages/matplotlib/quiver.py", line 237, in
_make_verts
scale = nx.amax(a) * math.sqrt(len(a)) # crude auto-scaling
AttributeError: 'module' object has no attribute 'amax'
I think that we will have soon a big problem with the scientific soft in
python. Some of them will use numpy, Numeric or numarray and they will be
totally incompatible. Theorically numpy was to do the reunification but a
transition period must exist. The module Numerix was doing it for matplotlib
but it's beginning to have more and more incompatibility.
The quiver problem is not the only one. I used a lot the griddata module to
interpolate some irregulary spaced data, it was working very fine but it's
not working with numpy and I don't have the skill to change it unfortunatly.
I want to thank you for all the work done for matplotlib, the critics are only
to avoid people to be distressed because one day all their softs won't work
due to numpy/numarray/Numeric incompatibility and stop to use python.
Regards,
N.
|
|
From: Eric F. <ef...@ha...> - 2006-06-09 17:37:56
|
Nikolai Hlubek wrote: > Hi everyone > > First of all I'd like to thank you for all your work > since many bugs which I found to be quite annoying have been > fixed in the latest version. > > But I ran into trouble with the new colorbar. As you can see in the > attached picture horizontal lines are drawn. > > The plot was generated with the following python code: > > from pylab import * > from RandomArray import * > > z=random((200,100)) > imshow(z, interpolation='nearest', cmap=cm.hot) > colorbar(drawedges=False) > colorbar(drawedges=True) > show() Nikolai, Your example code has two calls to colorbar, but your sample png file has only the result of the second. If I do this: from pylab import * from RandomArray import * z=random((200,100)) imshow(z, interpolation='nearest', cmap=cm.hot) colorbar(drawedges=False) show() I don't get the lines when the Agg backend is making the png. You don't even need the drawedges kwarg; the default is False. What backends are you using? Some backends still need work to make them support this behavior. Agg, ps, and svg should be fine. Eric |
|
From: Darren D. <dd...@co...> - 2006-06-09 16:03:17
|
I cant reproduce this. Are you sure it's a problem with matplotlib? It looks
like its a problem with shutil and os.utime, not mpl. Are you sure you have
write privileges for the file and the directory? Could another (k)ubuntu
Dapper user please give this a try?
On Friday 09 June 2006 11:42, massimo sandal wrote:
> Darren Dale ha scritto:
> >> I noticed the following error when in my application I try to export the
> >> plot in EPS format. The odd thing is that the export actually works and
> >> produces a good eps file, but nevertheless...
> >>
> >> File "hooke.py", line 354, in ExportImage #that's my wxpython+MPL app
> >> self.figure.savefig(filename)
> >> File "/usr/lib/python2.4/site-packages/matplotlib/figure.py", line
> >> 660, in savefig
> >> self.canvas.print_figure(*args, **kwargs)
> >> File
> >> "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py",
> >> line 1123, in print_figure
> >> else: shutil.move(tmpfile, outfile)
> >> File "/usr/lib/python2.4/shutil.py", line 193, in move
> >> copy2(src,dst)
> >> File "/usr/lib/python2.4/shutil.py", line 93, in copy2
> >> copystat(src, dst)
> >> File "/usr/lib/python2.4/shutil.py", line 68, in copystat
> >> os.utime(dst, (st.st_atime, st.st_mtime))
> >> OSError: [Errno 1] Operation not permitted: 'figura001.eps'
> >
> > please submit a short script that reproduces the problem.
>
> I have just reproduced it by doing an histogram in an interactive
> ipython --pylab session and then exporting as 'figure.eps'.
>
> Just:
> a=[...] <--numbers to histogram
> hist(a)
> savefig('hist001.eps')
>
> gives:
>
> exceptions.OSError Traceback (most
> recent call last)
>
> /users/Massimo/synuclein/<ipython console>
>
> /usr/lib/python2.4/site-packages/matplotlib/pylab.py in savefig(*args,
> **kwargs)
> 809 def savefig(*args, **kwargs):
> 810 fig = gcf()
> --> 811 return fig.savefig(*args, **kwargs)
> 812 if Figure.savefig.__doc__ is not None:
> 813 savefig.__doc__ = _shift_string(Figure.savefig.__doc__)
>
> /usr/lib/python2.4/site-packages/matplotlib/figure.py in savefig(self,
> *args, **kwargs)
> 658 kwargs[key] = rcParams['savefig.%s'%key]
> 659
> --> 660 self.canvas.print_figure(*args, **kwargs)
> 661
> 662 def colorbar(self, mappable, cax=None, **kw):
>
> /usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py
> in print_figure(self, filename, dpi, facecolor, edgecolor, orientation,
> **kwargs)
> 110 try:
> 111 agg.print_figure(filename, dpi, facecolor,
> edgecolor,
> --> 112 orientation, **kwargs)
> 113 except IOError, msg:
> 114 error_msg_gtk('Failed to save\nError message:
> %s'%(msg,), self)
>
> /usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py in
> print_figure(self, filename, dpi, facecolor, edgecolor, orientation,
> **kwargs)
> 482 ps = self.switch_backends(FigureCanvasPS)
> 483 ps.print_figure(filename, dpi, facecolor,
> edgecolor,
> --> 484 orientation, **kwargs)
> 485 else:
> 486 raise IOError('Do not know know to handle
> extension *%s' % ext)
>
> /usr/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py in
> print_figure(self, outfile, dpi, facecolor, edgecolor, orientation,
> papertype)
> 1121 fh = file(tmpfile)
> 1122 print >>outfile, fh.read()
> -> 1123 else: shutil.move(tmpfile, outfile)
> 1124
> 1125 def _print_figure_tex(self, outfile, dpi, facecolor,
> edgecolor, orientation,
>
> /usr/lib/python2.4/shutil.py in move(src, dst)
> 191 rmtree(src)
> 192 else:
> --> 193 copy2(src,dst)
> 194 os.unlink(src)
> 195
>
> /usr/lib/python2.4/shutil.py in copy2(src, dst)
> 91 dst = os.path.join(dst, os.path.basename(src))
> 92 copyfile(src, dst)
> ---> 93 copystat(src, dst)
> 94
> 95
>
> /usr/lib/python2.4/shutil.py in copystat(src, dst)
> 66 mode = stat.S_IMODE(st.st_mode)
> 67 if hasattr(os, 'utime'):
> ---> 68 os.utime(dst, (st.st_atime, st.st_mtime))
> 69 if hasattr(os, 'chmod'):
> 70 os.chmod(dst, mode)
>
> OSError: [Errno 1] Operation not permitted: 'hist001.eps'
>
> MPL is 0.87.3 compiled from source on gnu/linux Kubuntu 6.06
> Thanks,
> m.
--
Darren S. Dale, Ph.D.
Cornell High Energy Synchrotron Source
Cornell University
200L Wilson Lab
Rt. 366 & Pine Tree Road
Ithaca, NY 14853
dd...@co...
office: (607) 255-9894
fax: (607) 255-9001
|
|
From: massimo s. <mas...@un...> - 2006-06-09 15:43:14
|
Darren Dale ha scritto:
>> I noticed the following error when in my application I try to export the
>> plot in EPS format. The odd thing is that the export actually works and
>> produces a good eps file, but nevertheless...
>>
>> File "hooke.py", line 354, in ExportImage #that's my wxpython+MPL app
>> self.figure.savefig(filename)
>> File "/usr/lib/python2.4/site-packages/matplotlib/figure.py", line
>> 660, in savefig
>> self.canvas.print_figure(*args, **kwargs)
>> File
>> "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py",
>> line 1123, in print_figure
>> else: shutil.move(tmpfile, outfile)
>> File "/usr/lib/python2.4/shutil.py", line 193, in move
>> copy2(src,dst)
>> File "/usr/lib/python2.4/shutil.py", line 93, in copy2
>> copystat(src, dst)
>> File "/usr/lib/python2.4/shutil.py", line 68, in copystat
>> os.utime(dst, (st.st_atime, st.st_mtime))
>> OSError: [Errno 1] Operation not permitted: 'figura001.eps'
>
> please submit a short script that reproduces the problem.
I have just reproduced it by doing an histogram in an interactive
ipython --pylab session and then exporting as 'figure.eps'.
Just:
a=[...] <--numbers to histogram
hist(a)
savefig('hist001.eps')
gives:
exceptions.OSError Traceback (most
recent call last)
/users/Massimo/synuclein/<ipython console>
/usr/lib/python2.4/site-packages/matplotlib/pylab.py in savefig(*args,
**kwargs)
809 def savefig(*args, **kwargs):
810 fig = gcf()
--> 811 return fig.savefig(*args, **kwargs)
812 if Figure.savefig.__doc__ is not None:
813 savefig.__doc__ = _shift_string(Figure.savefig.__doc__)
/usr/lib/python2.4/site-packages/matplotlib/figure.py in savefig(self,
*args, **kwargs)
658 kwargs[key] = rcParams['savefig.%s'%key]
659
--> 660 self.canvas.print_figure(*args, **kwargs)
661
662 def colorbar(self, mappable, cax=None, **kw):
/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py
in print_figure(self, filename, dpi, facecolor, edgecolor, orientation,
**kwargs)
110 try:
111 agg.print_figure(filename, dpi, facecolor,
edgecolor,
--> 112 orientation, **kwargs)
113 except IOError, msg:
114 error_msg_gtk('Failed to save\nError message:
%s'%(msg,), self)
/usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py in
print_figure(self, filename, dpi, facecolor, edgecolor, orientation,
**kwargs)
482 ps = self.switch_backends(FigureCanvasPS)
483 ps.print_figure(filename, dpi, facecolor,
edgecolor,
--> 484 orientation, **kwargs)
485 else:
486 raise IOError('Do not know know to handle
extension *%s' % ext)
/usr/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py in
print_figure(self, outfile, dpi, facecolor, edgecolor, orientation,
papertype)
1121 fh = file(tmpfile)
1122 print >>outfile, fh.read()
-> 1123 else: shutil.move(tmpfile, outfile)
1124
1125 def _print_figure_tex(self, outfile, dpi, facecolor,
edgecolor, orientation,
/usr/lib/python2.4/shutil.py in move(src, dst)
191 rmtree(src)
192 else:
--> 193 copy2(src,dst)
194 os.unlink(src)
195
/usr/lib/python2.4/shutil.py in copy2(src, dst)
91 dst = os.path.join(dst, os.path.basename(src))
92 copyfile(src, dst)
---> 93 copystat(src, dst)
94
95
/usr/lib/python2.4/shutil.py in copystat(src, dst)
66 mode = stat.S_IMODE(st.st_mode)
67 if hasattr(os, 'utime'):
---> 68 os.utime(dst, (st.st_atime, st.st_mtime))
69 if hasattr(os, 'chmod'):
70 os.chmod(dst, mode)
OSError: [Errno 1] Operation not permitted: 'hist001.eps'
MPL is 0.87.3 compiled from source on gnu/linux Kubuntu 6.06
Thanks,
m.
--
Massimo Sandal
University of Bologna
Department of Biochemistry "G.Moruzzi"
snail mail:
Via Irnerio 48, 40126 Bologna, Italy
email:
mas...@un...
tel: +39-051-2094388
fax: +39-051-2094387
|
|
From: massimo s. <mas...@un...> - 2006-06-09 15:36:59
|
Hi, I recently installed matplotlib 0.87.3 (compiled from source) on a kubuntu 6.06 I notice, both when using mpl embedded into an application and when using it with pylab, that before drawing a new graph window the following error happens: X Error: BadDevice, invalid or uninitialized input device 168 Major opcode: 145 Minor opcode: 3 Resource id: 0x0 Failed to open device X Error: BadDevice, invalid or uninitialized input device 168 Major opcode: 145 Minor opcode: 3 Resource id: 0x0 Failed to open device The graph is then correctly displayed and everything then proceeds normally, but I guess it is not completely normal it happens (an old matplotlib version on debian sarge gave no errors). Thanks, m. -- Massimo Sandal University of Bologna Department of Biochemistry "G.Moruzzi" snail mail: Via Irnerio 48, 40126 Bologna, Italy email: mas...@un... tel: +39-051-2094388 fax: +39-051-2094387 |
|
From: Nikolai H. <nik...@ma...> - 2006-06-09 15:00:15
|
Hi everyone First of all I'd like to thank you for all your work since many bugs which I found to be quite annoying have been fixed in the latest version. But I ran into trouble with the new colorbar. As you can see in the attached picture horizontal lines are drawn. The plot was generated with the following python code: from pylab import * from RandomArray import * z=random((200,100)) imshow(z, interpolation='nearest', cmap=cm.hot) colorbar(drawedges=False) colorbar(drawedges=True) show() Any ideas what this problem could be related to? Best regards, Nikolai -- "1984" is not a howto! |
|
From: John H. <jdh...@ac...> - 2006-06-09 13:26:28
|
>>>>> "Nils" == Nils Wagner <nw...@ia...> writes:
Nils> Hi all, Can I use formulas within the legend command, e.g.
Nils> legend( ('$\sin(x)$', '$\cos(x)$'), loc='upper left')
You can, but there are two problems with your example. One, you need
to be using "raw" strings if you are using single backslashes, eg
r'$\sin(x)$'
the other is that mathtext doesn't recognize \sin, \cos, \exp etc.
(Edin are you out there? If so, this would be something useful to
work on).
You can do the equivalent by setting the font to roman
from pylab import figure, show, nx
x = nx.arange(0.0, 1.0, 0.01)
fig = figure()
ax = fig.add_subplot(111)
ax.plot(x, nx.sin(2*nx.pi*x), 'ro', label=r'$\rm{sin}(x)$')
ax.plot(x, nx.cos(2*nx.pi*x), 'gs', label=r'$\rm{cos}(x)$')
ax.legend(loc='upper center')
show()
but unfortunately the layout is crappy. This is one of the things
Edin will be working on this summer, trying to fix the kerning (by
using a better set of fonts) so the spacing in '(x)' is handled
properly.
If you have access to TeX, dvipng and ghostscript, you can use
"usetext" for better layout.
JDH
|
|
From: massimo s. <mas...@un...> - 2006-06-08 15:17:58
|
Ok, I guess I found the problem is in my code (the arrays I'm passing are indeed empty for some reason, not surprising it can't line fit them). So high shame on me for having polluted the mailing list :( A lesson in humility (and debugging) indeed. Thanks anyway... I flee in shame. m. -- Massimo Sandal University of Bologna Department of Biochemistry "G.Moruzzi" snail mail: Via Irnerio 48, 40126 Bologna, Italy email: mas...@un... tel: +39-051-2094388 fax: +39-051-2094387 |
|
From: Christian M. <mee...@un...> - 2006-06-08 15:16:54
|
On Thursday 08 June 2006 16:19, massimo sandal wrote:
> Brian Blais ha scritto:
> > I want to write a wxPython script to pull up pylab plots (in a separate
> > window), based on menu or button choices. The script below crashes with
> > a segmentation fault. Am I doing something wrong here? Is there a
> > workaround or fix?
>
> As far as I know, mixing wxpython and pylab this way is BAD.
>
> You should better choose between:
> - (1)Launch pylab in a separate thread
> - (2) (What I do) Using WxMPL and embedding a matplotlib plot in a
> wxPanel or wxFrame. You have to use the OO interface to matplotlib.
>
> m.
Hi,
Agree with massimo. One brief example might help:
import matplotlib
matplotlib.use('WXAgg')
from pylab import gca
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as
FigureCanvas
from matplotlib.font_manager import fontManager, FontProperties
from matplotlib.figure import Figure
from matplotlib.axes import Subplot
import matplotlib.numerix as numpy
from matplotlib.ticker import LogLocator, MultipleLocator
from matplotlib import rcParams
import wx
<snip>
class Your_Class(wx.Frame):
def __init__(self,parent,id,title):
wx.Frame.__init__(self,None,-1,"Your_Title")
<snip>
self.fig = Figure(figsize=(7,5),dpi=100)
self.axes = self.fig.add_subplot(111)
self.canvas = FigureCanvas(self, -1, self.fig)
self.parent = self.canvas.GetParent()
self.canvas.mpl_connect('motion_notify_event',self.mouse_move)
<snip: SomeSizer>
SomeSizer.add(self.canvas, 1, wx.LEFT|wx.TOP|wx.GROW|wx.EXPAND)
#useful method examples:
def OnRefresh(self,event=None):
"""
refreshes the plotting window
"""
self.canvas.draw()
self.toolbar.update()
#then the actual drawing function:
def plot_data(self):
"""
actual plotting function
"""
raw_plot(self) #imported own function, see below
self.toolbar.update() #not necesarry, but might help
def raw_plot(parent):
# note that all meta data / parameters from the parent are accessible !
# e.g. color = parent.color
parent.fig.clear()
a = parent.fig.add_subplot(211)
etc. etc. etc.
Thought this might be helpful to get started. You might want to write things a
different way, though. Particularly the my application is a bit more than
just a short script, so feel free to drop anything you don't want.
One last thing: I'd recommend having a look at the matplotlib examples
('embedding_in_wx*.py').
Cheers,
Christian
|
|
From: Darren D. <dd...@co...> - 2006-06-08 15:15:02
|
On Thursday 08 June 2006 10:35, massimo sandal wrote: > Hi, > I upgraded today to matplotlib 0.87.3, compiled from source. > I noticed the following error when in my application I try to export the > plot in EPS format. The odd thing is that the export actually works and > produces a good eps file, but nevertheless... > > File "hooke.py", line 354, in ExportImage #that's my wxpython+MPL app > self.figure.savefig(filename) > File "/usr/lib/python2.4/site-packages/matplotlib/figure.py", line > 660, in savefig > self.canvas.print_figure(*args, **kwargs) > File > "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py", > line 1123, in print_figure > else: shutil.move(tmpfile, outfile) > File "/usr/lib/python2.4/shutil.py", line 193, in move > copy2(src,dst) > File "/usr/lib/python2.4/shutil.py", line 93, in copy2 > copystat(src, dst) > File "/usr/lib/python2.4/shutil.py", line 68, in copystat > os.utime(dst, (st.st_atime, st.st_mtime)) > OSError: [Errno 1] Operation not permitted: 'figura001.eps' please submit a short script that reproduces the problem. |
|
From: massimo s. <mas...@un...> - 2006-06-08 15:08:20
|
Hi, I upgraded today to latest numpy (0.9.8) and matplotlib (0.87.3). I still have the same error (upgraded code in snippet): >> --------- >> import matplotlib.numerix as nx >> >> contact_x_points=nx.array(x_points[left_bound:right_bound]) >> contact_y_points=nx.array(y_points[left_bound:right_bound]) >> >> A=nx.ones((len(contact_x_points),2)) >> A[:,0]=contact_x_points >> result=nx.linalg.lstsq(A,contact_y_points) >> --------- >> >> ...but when I run, it crashes with: >> >> result=nx.linalg.lstsq(A, contact_y_points) >> File "/usr/lib/python2.4/site-packages/numpy/linalg/linalg.py", line >> 457, in lstsq >> nlvl = max( 0, int( math.log( float(min( m,n ))/2. ) ) + 1 ) >> OverflowError: math range error any hint? m. -- Massimo Sandal University of Bologna Department of Biochemistry "G.Moruzzi" snail mail: Via Irnerio 48, 40126 Bologna, Italy email: mas...@un... tel: +39-051-2094388 fax: +39-051-2094387 |
|
From: Jeff W. <js...@fa...> - 2006-06-08 15:05:38
|
The main purpose of this release is to take advantage of the new aspect
ratio handling in matplotlib 0.87.3.
Some new features have been added (new polar-centric convenience
projections, sinusoidal projection, ability to plot land-sea masks,
pcolormesh method), and numerous bugs were squashed.
Here is the full list of changes since 0.8.2:
* updated for new matplotlib aspect ratio handling.
Now maps will always have the correct aspect ratio.
* if resolution keyword is set to None when Basemap
instance is created, no boundary data sets are needed
(methods to draw boundaries, like drawcoastlines, will
raise an exception).
* update to proj4 module - renamed pyproj to avoid
conflicts with proj4 module from CDAT.
* createfigure method deprecated, since maps
will now automatically have the correct aspect ratio.
* Added new projections Xpstere, Xplaea, Xpaeqd (where X
can be n or s). These are special-case, polar-centric
versions of the stereographic, lambert azimuthal equal area
and azimuthal equidistant projections that don't require
you specify the lat/lon values of the lower-left and upper-right
corners.
* fixed bugs in plot, scatter and mapboundary methods for
miller, cylindrical and mercator projections.
* 'crude' and 'low' resolution boundary datasets now installed
by default. basemap_data package now only needed for to get
'intermediate' and 'high' resolution datasets.
* moved all packages under single lib/ directory so
setuptools' "develop" command works properly.
* Added sinusoidal projection.
* bilinear interpolation routines can return masked arrays with
values outside range of data coordinates masked.
* New examples (warpimage.py - warping an image to
different map projections, polarmaps.py - simplified polar
projections, garp.py - 'World According to Garp' maps).
* pcolormesh method added.
* drawlsmask method added for masking oceans and/or land areas.
5 minute land-sea mask dataset added.
-Jeff
--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
|
|
From: massimo s. <mas...@un...> - 2006-06-08 14:36:10
|
Hi,
I upgraded today to matplotlib 0.87.3, compiled from source.
I noticed the following error when in my application I try to export the
plot in EPS format. The odd thing is that the export actually works and
produces a good eps file, but nevertheless...
File "hooke.py", line 354, in ExportImage #that's my wxpython+MPL app
self.figure.savefig(filename)
File "/usr/lib/python2.4/site-packages/matplotlib/figure.py", line
660, in savefig
self.canvas.print_figure(*args, **kwargs)
File
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py",
line 1123, in print_figure
else: shutil.move(tmpfile, outfile)
File "/usr/lib/python2.4/shutil.py", line 193, in move
copy2(src,dst)
File "/usr/lib/python2.4/shutil.py", line 93, in copy2
copystat(src, dst)
File "/usr/lib/python2.4/shutil.py", line 68, in copystat
os.utime(dst, (st.st_atime, st.st_mtime))
OSError: [Errno 1] Operation not permitted: 'figura001.eps'
Thanks as usual!
Massimo
--
Massimo Sandal
University of Bologna
Department of Biochemistry "G.Moruzzi"
snail mail:
Via Irnerio 48, 40126 Bologna, Italy
email:
mas...@un...
tel: +39-051-2094388
fax: +39-051-2094387
|
|
From: massimo s. <mas...@un...> - 2006-06-08 14:20:19
|
Brian Blais ha scritto: > I want to write a wxPython script to pull up pylab plots (in a separate window), > based on menu or button choices. The script below crashes with a segmentation fault. > Am I doing something wrong here? Is there a workaround or fix? As far as I know, mixing wxpython and pylab this way is BAD. You should better choose between: - (1)Launch pylab in a separate thread - (2) (What I do) Using WxMPL and embedding a matplotlib plot in a wxPanel or wxFrame. You have to use the OO interface to matplotlib. m. -- Massimo Sandal University of Bologna Department of Biochemistry "G.Moruzzi" snail mail: Via Irnerio 48, 40126 Bologna, Italy email: mas...@un... tel: +39-051-2094388 fax: +39-051-2094387 |
|
From: David H. <dav...@gm...> - 2006-06-08 13:57:20
|
Hi,
I'd do it the quick way:
str = [...] # list of strings for the labels.
x[:] # abcisse vector
y[i][:] # list of ordinate vector (y[i][:] contains the data for the ith
line)
for i in range(10):
text(x[-1], y[i][-1], str[i], horizontalalignement='left')
David
2006/6/7, Webb Sprague <web...@gm...>:
>
> Is there a way to programmatically write line labels, as in the
> attached image? If it doesn't go through the list, basically I want a
> label at the end of each of 10 or so lines in a plot.
>
> Tx
>
>
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
>
>
|
|
From: leau2001 <lea...@fr...> - 2006-06-08 13:32:49
|
i succed, just do this : labels = getp(gca(), 'xticklabels') setp(labels, 'rotation', 45,'horizontalalignment', 'right', fontsize=8) that's all ;) |
|
From: Brian B. <bb...@br...> - 2006-06-08 13:24:56
|
Hello,
I want to write a wxPython script to pull up pylab plots (in a separate window),
based on menu or button choices. The script below crashes with a segmentation fault.
Am I doing something wrong here? Is there a workaround or fix?
thanks,
Brian Blais
#!/usr/bin/env python
from wxPython.wx import *
import pylab
class MyFrame(wxFrame):
def __init__(self, parent, id, title):
wxFrame.__init__(self, parent, -1, title)
self.CenterOnScreen()
menuBar = wxMenuBar()
# 1st menu from left
menu1 = wxMenu()
menu1.Append(101, "&New")
menu1.Append(102, "&Close", "Close this frame")
menuBar.Append(menu1, "&File")
EVT_MENU(self, 101, self.New)
EVT_MENU(self, 102, self.Close)
self.SetMenuBar(menuBar)
self.Show(True)
def New(self, event):
pylab.plot([1,2,3,4],[5,6,7,8])
pylab.show()
def CloseWindow(self, event):
self.Close()
class App(wxApp):
def OnInit(self):
frame = MyFrame(None, -1, "testing")
self.SetTopWindow(frame)
return True
def main():
app = App(0)
app.MainLoop()
if __name__ == "__main__":
main()
--
-----------------
bb...@br...
http://web.bryant.edu/~bblais
|
|
From: leau2001 <lea...@fr...> - 2006-06-08 12:01:15
|
i want to have this x axe look, not with date, but with any words, i don't find how i can do this Thx |
|
From: Darren D. <dd...@co...> - 2006-06-08 11:53:34
|
On Wednesday 07 June 2006 16:45, John Hunter wrote:
> >>>>> "William" == William Hartt <wh...@gm...> writes:
>
> William> Does anyone know the syntax for fraction used in
> William> mathtext? The LaTex version is \frac{num}{denom} but
> William> this gives an error.
>
> mathtext doesn't currently support frac (but hopefully it will by the
> end of the summer as we have a google summer-of-code student working
> on mathtext). As Ryan noted, if you have access to TeX/LaTeX on your
> system, you can use that to render your equations
>
> Requirements:
>
> tex
>
> *Agg backends: dvipng
>
> PS backend: latex w/ psfrag, dvips, and Ghostscript 8.51
> (older versions do not work properly)
I think we can relax the ghostscript requirement to version 7.07 or later. I
worked through some issues a few months back, and my test script (which
produces three different sized plots for every combination of text.usetex and
ps.usedistiller settings) didnt indicate any problems using ESP Ghostscript
7.07.
Darren
|
|
From: Nils W. <nw...@ia...> - 2006-06-08 11:48:22
|
Hi all,
Can I use formulas within the legend command, e.g.
legend( ('$\sin(x)$', '$\cos(x)$'), loc='upper left')
Nils
|
|
From: leau2001 <lea...@fr...> - 2006-06-08 08:27:27
|
No problem with the last version ;) thx Developpers |