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
(16) |
2
(16) |
3
(5) |
|
4
(4) |
5
(4) |
6
(10) |
7
(33) |
8
(11) |
9
(20) |
10
(7) |
|
11
(8) |
12
(18) |
13
(27) |
14
(21) |
15
(15) |
16
(10) |
17
(12) |
|
18
(3) |
19
(12) |
20
(12) |
21
(14) |
22
(32) |
23
(15) |
24
(20) |
|
25
(12) |
26
(32) |
27
(29) |
28
(17) |
29
(25) |
30
(12) |
31
(5) |
|
From: John H. <jd...@gm...> - 2010-07-13 23:46:56
|
On Mon, Jul 12, 2010 at 5:06 PM, K.-Michael Aye <kmi...@gm...> wrote: > On 2010-07-12 23:17:19 +0200, John Hunter said: > >> On Mon, Jul 12, 2010 at 4:06 PM, K.-Michael Aye >> <kmi...@gm...> wrote: >>> Dear all, >>> >>> I'm not sure if this is by design or a problem: It's by design and is not a leak. matplotlib supports multiple images on the same axes, and can composite multiple images that overlap the same space using transparency, so each call to imshow is adding additional data to the axes. You can inspect the ax.images list to see the list of images is growing. If you have an Image object and want to remove it from the Axes, call im.remove() or you can manipulate the list of ax.images directly, eg del ax.images[0] or if you have a single image and want to update the data in it, you can do im = ax.imshow(something) im.set_array(newdata) to update the array in the existing image. JDH |
|
From: Eric F. <ef...@ha...> - 2010-07-13 21:57:27
|
On 07/13/2010 10:02 AM, Bala subramanian wrote: > Eric, > Sorry for not providing the test data. Attached herewith both my script > and test data. > > Bala > > On Tue, Jul 13, 2010 at 9:14 PM, Eric Firing <ef...@ha... > <mailto:ef...@ha...>> wrote: > > On 07/13/2010 07:12 AM, Bala subramanian wrote: > > Friends, > > I tried to incorporate an example script for colorbar given in the > > following link into my code. > > > > http://matplotlib.sourceforge.net/examples/api/colorbar_only.html > > > > When i run the program, i get the following error. I didnt use > > set_ylabel option in my code. I am not getting why this error > appears. > > Kindly help me by writting why this error comes. I have attached the > > code with the mail. > > Please include the data file so we can run your example to test it, or > (better) modify your test script to generate fake data so that it > doesn't need a data file. > > Eric > > > > > Thanks, > > Bala > > > > > > Traceback (most recent call last): > > File "./test.py", line 27, in <module> > > cb = mpl.colorbar.ColorbarBase(map, > > cmap=cmap,norm=norm,boundaries=[0]+bound+[9],extend='both',ticks=boun > > File > "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line > > 221, in __init__ > > self.set_label('') > > File > "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line > > 302, in set_label > > self._set_label() > > File > "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line > > 292, in _set_label > > self.ax.set_ylabel(self._label, **self._labelkw) > > AttributeError: 'AxesImage' object has no attribute 'set_ylabel' The problem is that the ColorbarBase initializer takes an axes as its first argument, and you fed it the AxesImage instance returned by matshow. You probably don't actually want to be using ColorbarBase at all--I suspect you would do better with a plain old Figure.colorbar() method call. ColorbarBase is more for the situation in the example you started with, where there is no master image to which the colorbar corresponds. Eric > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > This SF.net email is sponsored by Sprint > > What will you do first with EVO, the first 4G phone? > > Visit sprint.com/first <http://sprint.com/first> -- > http://p.sf.net/sfu/sprint-com-first > > > > > > > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > <mailto:Mat...@li...> > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first <http://sprint.com/first> -- > http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > <mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Steve M. <st...@st...> - 2010-07-13 20:55:25
|
On Jul 13, 2010, at 11:36 AM, Jeff Whitaker wrote:
> On 7/13/10 11:41 AM, Steve McFarlin wrote:
>> On Jul 12, 2010, at 6:15 PM, Jeff Whitaker wrote:
>>
>>> On 7/12/10 5:34 PM, Steve McFarlin wrote:
>>>> Hello,
>>>>
>>>> I have an issue rendering with basemap on a Debian server using Agg. I have confirmed that matplotlib does render using the following example.
>>>>
>>>> # do this before importing pylab or pyplot
>>>> import matplotlib
>>>> matplotlib.use('Agg')
>>>> import matplotlib.pyplot as plt
>>>> fig = plt.figure()
>>>> ax = fig.add_subplot(111)
>>>> ax.plot([1,2,3])
>>>> fig.savefig('test.png')
>>>>
>>>> However, I receive the following results when using basemap
>>>>
>>>> Traceback (most recent call last):
>>>> File "testImageGen.py", line 117, in<module>
>>>> setCommonBaseMapProperties(m)
>>>> File "/home/forecast/sgWaveModel/sgUtil.py", line 34, in setCommonBaseMapProperties
>>>> bmap.drawcoastlines(color=[15./255., 53./255.,73./255.], linewidth=0.15)
>>>> File "/usr/lib/python2.5/site-packages/mpl_toolkits/basemap/__init__.py", line 1479, in drawcoastlines
>>>> self.set_axes_limits(ax=ax)
>>>> File "/usr/lib/python2.5/site-packages/mpl_toolkits/basemap/__init__.py", line 2607, in set_axes_limits
>>>> and not ax.get_autoscalex_on()
>>>> AttributeError: 'AxesSubplot' object has no attribute 'get_autoscalex_on'
>>>>
>>>>
>>>> I am using matplotlib.use('Agg') as the first call in the script. The call to bmpa.drawcoastlines is the first call to basemap I make in my scripts. This works on a system with a windowing toolkit. Any ideas?
>>>>
>>>>
>>>> - steve
>>>>
>>>>
>>> Steve: What's your matplotlib version? Does adding
>>>
>>> ax.get_autoscalex_on()
>>>
>>> in your first script cause that to fail as well?
>>>
>>> -Jeff
>>>
>>
>> python 2.5
>> Matplotlib 1.0.0
>> basemap 1.0
>> pygrib 1.7
>> pyproj 1.8.6
>> numpy 1.4.1
>> Latest source of GRIB API
>> Jasper 1.9
>>
>> At this point I am trying anything. I upgraded everything to the latest version. I now receive the following error, and a warnings.
>>
>> /usr/lib/python2.5/site-packages/matplotlib/contour.py:474: DeprecationWarning: PyArray_FromDims: use PyArray_SimpleNew.
>> nchunk = self.nchunk)
>> /usr/lib/python2.5/site-packages/matplotlib/contour.py:474: DeprecationWarning: PyArray_FromDimsAndDataAndDescr: use PyArray_NewFromDescr.
>> nchunk = self.nchunk)
>>
>> Traceback (most recent call last):
>> File "testImageGen.py", line 124, in<module>
>> m.drawmapboundary(linewidth=0.0, color=[15./255., 53./255.,73./255.])
>> File "/usr/lib/python2.5/site-packages/mpl_toolkits/basemap/__init__.py", line 1325, in drawmapboundary
>> for spine in ax.spines.itervalues():
>> AttributeError: 'AxesSubplot' object has no attribute 'spines''
>>
>>
>> Here are the functions I am calling and their associated errors.
>>
>> bmap.drawcoastlines(color=[15./255., 53./255.,73./255.], linewidth=0.15)
>> bmap.drawcountries(color='k', linewidth=0.25)
>> bmap.fillcontinents(color="white",lake_color=[51./255., 153./255.,204./255.])
>> bmap.drawstates(color='k', linewidth=0.25)
>>
>> No errors for the above calls
>>
>> bmap.drawmapboundary(linewidth=0.0, color=[15./255., 53./255.,73./255.])
>>
>> I receive the AxesSubplot error listed above.
>>
>> I believe the errors before (and possible the current) were due to operator error. I should have started with the latest version of the source from the start rather then installing deb packages.
>>
>>
>> Thanks,
>> Steve
>>
> Steve: I cannot reproduce this error. It would help if you sent a
> self-contained example that I can run to trigger the error. It is
> puzzling since the line that the traceback is pointing to is in a
> try/except block which tries to old matplotlib API to set the color of
> the map boundary, and if that fails use the newer 'spines' module (which
> is available in 1.0). My hypothesis is that you somehow have a mixture
> of old and new matplotlib versions installed in
> /usr/lib/python2.5/site-packages, but that's just a guess.
>
> -Jeff
>
> --
My suspicion and your hypothesis were likely correct. I installed python 2.6 from source and all the latest libraries for everything required by pygrib and basemap. It all works wonderfully.
Thanks,
Steve
|
|
From: Bala s. <bal...@gm...> - 2010-07-13 20:02:19
|
Eric, Sorry for not providing the test data. Attached herewith both my script and test data. Bala On Tue, Jul 13, 2010 at 9:14 PM, Eric Firing <ef...@ha...> wrote: > On 07/13/2010 07:12 AM, Bala subramanian wrote: > > Friends, > > I tried to incorporate an example script for colorbar given in the > > following link into my code. > > > > http://matplotlib.sourceforge.net/examples/api/colorbar_only.html > > > > When i run the program, i get the following error. I didnt use > > set_ylabel option in my code. I am not getting why this error appears. > > Kindly help me by writting why this error comes. I have attached the > > code with the mail. > > Please include the data file so we can run your example to test it, or > (better) modify your test script to generate fake data so that it > doesn't need a data file. > > Eric > > > > > Thanks, > > Bala > > > > > > Traceback (most recent call last): > > File "./test.py", line 27, in <module> > > cb = mpl.colorbar.ColorbarBase(map, > > cmap=cmap,norm=norm,boundaries=[0]+bound+[9],extend='both',ticks=boun > > File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line > > 221, in __init__ > > self.set_label('') > > File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line > > 302, in set_label > > self._set_label() > > File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line > > 292, in _set_label > > self.ax.set_ylabel(self._label, **self._labelkw) > > AttributeError: 'AxesImage' object has no attribute 'set_ylabel' > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > This SF.net email is sponsored by Sprint > > What will you do first with EVO, the first 4G phone? > > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > > > > > > > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Benjamin R. <ben...@ou...> - 2010-07-13 19:34:29
|
Pellegrini, Sorry for the delay. The answer is that, unfortunately, it is not possible to reshow a figure after closing it, even if you still have the figure object. Because of GUI backends, the close action destroys some GUI objects that were created when the figure was created. Therefore, a reshow can not work. This isn't really a bug or a feature, but a consequence of the GUI interaction. I don't know if it is possible to still pull out the axes objects and insert them into a new figure, has anybody investigated that possibility? Ben Root On Mon, Jul 12, 2010 at 12:55 AM, Pellegrini Eric <eri...@ya...>wrote: > Hello everybody, > > My question is in the title ! > > Say that I have the following code: > > f = pylab.figure() > f.plot([1,2,3,4,5]) > pylab.show() > > and that, once I destroyed the figure by clicking on the top-right corner > red button, I would like to redisplay it in the state it was just before I > closed it. Is there way to do this ? There might be one as the variable f is > still assigned as a figure object with all its attributes and methods still > available. > > Thank you very much > > Eric > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Eric F. <ef...@ha...> - 2010-07-13 19:14:09
|
On 07/13/2010 07:12 AM, Bala subramanian wrote: > Friends, > I tried to incorporate an example script for colorbar given in the > following link into my code. > > http://matplotlib.sourceforge.net/examples/api/colorbar_only.html > > When i run the program, i get the following error. I didnt use > set_ylabel option in my code. I am not getting why this error appears. > Kindly help me by writting why this error comes. I have attached the > code with the mail. Please include the data file so we can run your example to test it, or (better) modify your test script to generate fake data so that it doesn't need a data file. Eric > > Thanks, > Bala > > > Traceback (most recent call last): > File "./test.py", line 27, in <module> > cb = mpl.colorbar.ColorbarBase(map, > cmap=cmap,norm=norm,boundaries=[0]+bound+[9],extend='both',ticks=boun > File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line > 221, in __init__ > self.set_label('') > File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line > 302, in set_label > self._set_label() > File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line > 292, in _set_label > self.ax.set_ylabel(self._label, **self._labelkw) > AttributeError: 'AxesImage' object has no attribute 'set_ylabel' > > > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Eric F. <ef...@ha...> - 2010-07-13 18:54:59
|
On 07/12/2010 01:11 PM, John Hunter wrote: > On Mon, Jul 12, 2010 at 5:11 PM, Jeffrey Blackburne<je...@mi...> wrote: >> Actually, I have been able to do it like this: >> >> mpl.rcParams['patch.linewidth'] = 0.2 >> >> Hope that helps, and sorry I didn't reply sooner. > > Of course this will affect any other patches in your figure (eg > Rectangles from histogram plots, etc). > > I am not opposed to adding some legend.frame rc parameters. Part of > the purpose of the rc file is to work like a style sheet, so if you > are writing a book or an article with a bunch of figures, and you want > them all the have the same look-and-feel, you can customize the > defaults externally w/o a bunch of boilerplate in your scripts that > can be difficult to maintain. It seems like the legend frame > properties fit into this category. In particular, the frame alpha is > one I almost always set to semi-transparent so you can see data behind > the legend, which is boilerplate I might be happy to do away with if I > had an rc param. > > I would be amenable to adding: > > legend.frame.facecolor : 'white' > legend.frame.edgecolor : 'white' > legend.frame.linewidth : 1.0 > legend.frame.alpha : 1.0 > > but I'd like to hear from others (Eric?) who are already not happy > with the size of our rc file. Although this change would increase the > line count, it doesn't increase the complexity much if at all in my > view and is somewhat useful. It would imply some mild potential > breakage, because currently the legend face and edge colors use the > axes colors (which is why it would be nice if we had > containment/inheritance for our rc params so they could inherit from > parent) so if someone has tweaked their old axes.facecolor, they would > need to add legend.frame.facecolor under this change to remain > compatible. John, I have no objections to the change you propose, and your idea of adding inheritance sounds good, also. Even nicer might be some flexibility in specifying units, so that a pad could scale with fontsize instead of being given in points, for example. My reservations about the rc file approach come partly from the concern that it can be too hidden, especially when the filename is prefixed with a dot--which, fortunately, we don't do. Still, a user might understandably wonder where the active configuration file really is, (hint to other readers: try the matplotlib function, matplotlib_fname()) and having a program behave differently depending on the current working directory when it is run is a double-edged sword. Style-file functionality is clearly a good thing, so the question is whether to make it explicit. One way to make it more explicit would be to invoke it via a script's command line, just as the backend can be specified via the command line. I don't know if it is worth adding this as an option, but it might facilitate testing, if nothing else. Potentially, the style-file parts of a matplotlibrc file could also be read in by a function at any point in a script. I was also unhappy with situations where the rc mechanism--which really should be used for global configuration--was the only mechanism available for local customization. I don't know whether there are still such cases, but the one that particularly bothered me--tick customization--can now be done without setting and resetting rc parameters. Enough idle rumination... Eric > > JDH > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Jeff W. <js...@fa...> - 2010-07-13 18:36:25
|
On 7/13/10 11:41 AM, Steve McFarlin wrote:
> On Jul 12, 2010, at 6:15 PM, Jeff Whitaker wrote:
>
>> On 7/12/10 5:34 PM, Steve McFarlin wrote:
>>> Hello,
>>>
>>> I have an issue rendering with basemap on a Debian server using Agg. I have confirmed that matplotlib does render using the following example.
>>>
>>> # do this before importing pylab or pyplot
>>> import matplotlib
>>> matplotlib.use('Agg')
>>> import matplotlib.pyplot as plt
>>> fig = plt.figure()
>>> ax = fig.add_subplot(111)
>>> ax.plot([1,2,3])
>>> fig.savefig('test.png')
>>>
>>> However, I receive the following results when using basemap
>>>
>>> Traceback (most recent call last):
>>> File "testImageGen.py", line 117, in<module>
>>> setCommonBaseMapProperties(m)
>>> File "/home/forecast/sgWaveModel/sgUtil.py", line 34, in setCommonBaseMapProperties
>>> bmap.drawcoastlines(color=[15./255., 53./255.,73./255.], linewidth=0.15)
>>> File "/usr/lib/python2.5/site-packages/mpl_toolkits/basemap/__init__.py", line 1479, in drawcoastlines
>>> self.set_axes_limits(ax=ax)
>>> File "/usr/lib/python2.5/site-packages/mpl_toolkits/basemap/__init__.py", line 2607, in set_axes_limits
>>> and not ax.get_autoscalex_on()
>>> AttributeError: 'AxesSubplot' object has no attribute 'get_autoscalex_on'
>>>
>>>
>>> I am using matplotlib.use('Agg') as the first call in the script. The call to bmpa.drawcoastlines is the first call to basemap I make in my scripts. This works on a system with a windowing toolkit. Any ideas?
>>>
>>>
>>> - steve
>>>
>>>
>> Steve: What's your matplotlib version? Does adding
>>
>> ax.get_autoscalex_on()
>>
>> in your first script cause that to fail as well?
>>
>> -Jeff
>>
>
> python 2.5
> Matplotlib 1.0.0
> basemap 1.0
> pygrib 1.7
> pyproj 1.8.6
> numpy 1.4.1
> Latest source of GRIB API
> Jasper 1.9
>
> At this point I am trying anything. I upgraded everything to the latest version. I now receive the following error, and a warnings.
>
> /usr/lib/python2.5/site-packages/matplotlib/contour.py:474: DeprecationWarning: PyArray_FromDims: use PyArray_SimpleNew.
> nchunk = self.nchunk)
> /usr/lib/python2.5/site-packages/matplotlib/contour.py:474: DeprecationWarning: PyArray_FromDimsAndDataAndDescr: use PyArray_NewFromDescr.
> nchunk = self.nchunk)
>
> Traceback (most recent call last):
> File "testImageGen.py", line 124, in<module>
> m.drawmapboundary(linewidth=0.0, color=[15./255., 53./255.,73./255.])
> File "/usr/lib/python2.5/site-packages/mpl_toolkits/basemap/__init__.py", line 1325, in drawmapboundary
> for spine in ax.spines.itervalues():
> AttributeError: 'AxesSubplot' object has no attribute 'spines''
>
>
> Here are the functions I am calling and their associated errors.
>
> bmap.drawcoastlines(color=[15./255., 53./255.,73./255.], linewidth=0.15)
> bmap.drawcountries(color='k', linewidth=0.25)
> bmap.fillcontinents(color="white",lake_color=[51./255., 153./255.,204./255.])
> bmap.drawstates(color='k', linewidth=0.25)
>
> No errors for the above calls
>
> bmap.drawmapboundary(linewidth=0.0, color=[15./255., 53./255.,73./255.])
>
> I receive the AxesSubplot error listed above.
>
> I believe the errors before (and possible the current) were due to operator error. I should have started with the latest version of the source from the start rather then installing deb packages.
>
>
> Thanks,
> Steve
>
Steve: I cannot reproduce this error. It would help if you sent a
self-contained example that I can run to trigger the error. It is
puzzling since the line that the traceback is pointing to is in a
try/except block which tries to old matplotlib API to set the color of
the map boundary, and if that fails use the newer 'spines' module (which
is available in 1.0). My hypothesis is that you somehow have a mixture
of old and new matplotlib versions installed in
/usr/lib/python2.5/site-packages, but that's just a guess.
-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-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
|
|
From: Isaac S. <if...@la...> - 2010-07-13 17:59:43
|
I have read access to the directory and have an admin account, however, i'm not the user who set up the machine (084535) The home.ppm file and others in that directory show "Write only (Drop Box)" for admin. For everyone, the permissions are set to "No Access" I was able to add a new permission user for myself "Isaac (me)" and got passed the error on home.ppm and now get an error on back.ppm. What should I do to correct the permissions on the other files in the images directory? Are there other files that may have this same issue as I am using matplotlib in the future? Thanks. On Jul 13, 2010, at 8:19 AM, Friedrich Romstedt wrote: > 2010/7/12 Isaac Salazar <if...@la...>: >> Hello, >> I am getting a permission error when trying to open a figure or >> plotting >> using matplotlib. >> TclError: couldn't open >> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ >> site-packages/matplotlib/mpl-data/images/home.ppm": >> permission denied > > Simple question: Do you have read access to that directory? Of what > kind is your user account? I guess it wants to display the button > with the home image and cannot read it. > > Friedrich Isaac Salazar W-13: ADVANCED ENGINEERING ANALYSIS TA-03, Building 1400, Room 2229 MS A142 if...@la... phone: 667 9225 |
|
From: Steve M. <st...@st...> - 2010-07-13 17:41:36
|
On Jul 12, 2010, at 6:15 PM, Jeff Whitaker wrote:
> On 7/12/10 5:34 PM, Steve McFarlin wrote:
>> Hello,
>>
>> I have an issue rendering with basemap on a Debian server using Agg. I have confirmed that matplotlib does render using the following example.
>>
>> # do this before importing pylab or pyplot
>> import matplotlib
>> matplotlib.use('Agg')
>> import matplotlib.pyplot as plt
>> fig = plt.figure()
>> ax = fig.add_subplot(111)
>> ax.plot([1,2,3])
>> fig.savefig('test.png')
>>
>> However, I receive the following results when using basemap
>>
>> Traceback (most recent call last):
>> File "testImageGen.py", line 117, in<module>
>> setCommonBaseMapProperties(m)
>> File "/home/forecast/sgWaveModel/sgUtil.py", line 34, in setCommonBaseMapProperties
>> bmap.drawcoastlines(color=[15./255., 53./255.,73./255.], linewidth=0.15)
>> File "/usr/lib/python2.5/site-packages/mpl_toolkits/basemap/__init__.py", line 1479, in drawcoastlines
>> self.set_axes_limits(ax=ax)
>> File "/usr/lib/python2.5/site-packages/mpl_toolkits/basemap/__init__.py", line 2607, in set_axes_limits
>> and not ax.get_autoscalex_on()
>> AttributeError: 'AxesSubplot' object has no attribute 'get_autoscalex_on'
>>
>>
>> I am using matplotlib.use('Agg') as the first call in the script. The call to bmpa.drawcoastlines is the first call to basemap I make in my scripts. This works on a system with a windowing toolkit. Any ideas?
>>
>>
>> - steve
>>
>>
>
> Steve: What's your matplotlib version? Does adding
>
> ax.get_autoscalex_on()
>
> in your first script cause that to fail as well?
>
> -Jeff
>
python 2.5
Matplotlib 1.0.0
basemap 1.0
pygrib 1.7
pyproj 1.8.6
numpy 1.4.1
Latest source of GRIB API
Jasper 1.9
At this point I am trying anything. I upgraded everything to the latest version. I now receive the following error, and a warnings.
/usr/lib/python2.5/site-packages/matplotlib/contour.py:474: DeprecationWarning: PyArray_FromDims: use PyArray_SimpleNew.
nchunk = self.nchunk)
/usr/lib/python2.5/site-packages/matplotlib/contour.py:474: DeprecationWarning: PyArray_FromDimsAndDataAndDescr: use PyArray_NewFromDescr.
nchunk = self.nchunk)
Traceback (most recent call last):
File "testImageGen.py", line 124, in <module>
m.drawmapboundary(linewidth=0.0, color=[15./255., 53./255.,73./255.])
File "/usr/lib/python2.5/site-packages/mpl_toolkits/basemap/__init__.py", line 1325, in drawmapboundary
for spine in ax.spines.itervalues():
AttributeError: 'AxesSubplot' object has no attribute 'spines''
Here are the functions I am calling and their associated errors.
bmap.drawcoastlines(color=[15./255., 53./255.,73./255.], linewidth=0.15)
bmap.drawcountries(color='k', linewidth=0.25)
bmap.fillcontinents(color="white",lake_color=[51./255., 153./255.,204./255.])
bmap.drawstates(color='k', linewidth=0.25)
No errors for the above calls
bmap.drawmapboundary(linewidth=0.0, color=[15./255., 53./255.,73./255.])
I receive the AxesSubplot error listed above.
I believe the errors before (and possible the current) were due to operator error. I should have started with the latest version of the source from the start rather then installing deb packages.
Thanks,
Steve
|
|
From: Bala s. <bal...@gm...> - 2010-07-13 17:12:27
|
Friends, I tried to incorporate an example script for colorbar given in the following link into my code. http://matplotlib.sourceforge.net/examples/api/colorbar_only.html When i run the program, i get the following error. I didnt use set_ylabel option in my code. I am not getting why this error appears. Kindly help me by writting why this error comes. I have attached the code with the mail. Thanks, Bala Traceback (most recent call last): File "./test.py", line 27, in <module> cb = mpl.colorbar.ColorbarBase(map, cmap=cmap,norm=norm,boundaries=[0]+bound+[9],extend='both',ticks=boun File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line 221, in __init__ self.set_label('') File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line 302, in set_label self._set_label() File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line 292, in _set_label self.ax.set_ylabel(self._label, **self._labelkw) AttributeError: 'AxesImage' object has no attribute 'set_ylabel' |
|
From: Jae-Joon L. <lee...@gm...> - 2010-07-13 17:05:36
|
It seems that there are at least two issues related with the text clipping.
The first issue is that the Text.draw method does not properly set
clip path. I think I fixed this in r8541 and r8542.
The second issue is that the agg backend does not seem to support a
clip path yet for the text.
Also, your script need to be fixed.
The patch need to be added to the axes (or its transform need to be
set) before you call set_clip_path.
So, with the current svn, you can clip the text with an arbitrary path
when you're using the backends that support it (I only tested with pdf
backend, the attached is the pdf output converted to png).
If you can install matplotlib from the svn, please test the patch.
Also, it would be great if you file a bug in the SF tracker, so that
other developer can fix it later.
Regards,
-JJ
On Tue, Jul 13, 2010 at 4:21 AM, shuwj <shu...@16...> wrote:
> Hi,
>
> I wanna know how to clip text outside a polygon path.
> In the attached a.png file, the polygon with red facecolor and green
> edgecolor is a Path. I want to get rid of the text 'aaaaaaaaunicode:
> Institut' outside the polygon and keep the part inside the polygon
> ('aaaaaaa') left.
>
> my code as follows. It can work out a 'right' result as i wanted.
> ------------------
> # -*- coding: utf-8 -*-
> import matplotlib.pyplot as plt
> import matplotlib.path as mpath
> import matplotlib.patches as mpatches
>
> import matplotlib.pyplot as plt
> from matplotlib.transforms import *
>
>
> Path=mpath.Path
>
> lines = [ [1,1.5],[1,6],[6,3],[3,1.5],[1,1.5] ]
>
> codes=[Path.LINETO]*len(lines)
> codes[0]=Path.MOVETO
> codes[-1]=Path.CLOSEPOLY
> path=mpath.Path(lines,codes)
> patch=mpatches.PathPatch(path,facecolor='red',edgecolor='green',lw=2)#,alpha=1)
>
>
> fig = plt.figure()
> fig.suptitle('bold figure suptitle', fontsize=14, fontweight='bold')
> ax = fig.add_subplot(111)
> fig.subplots_adjust(top=0.85)
> ax.set_title('axes title')
> ax.set_xlabel('xlabel')
> ax.set_ylabel('ylabel')
> ax.text(3, 8, 'boxed italics text in data coords', style='italic',
> bbox={'facecolor':'red', 'alpha':0.5, 'pad':10})
> ax.text(2, 6, r'an equation: $E=mc^2$', fontsize=15)
>
> t=ax.text(3, 2, unicode('aaaaaaaaunicode: Institut f\374r Festk\366rperphysik', 'latin-1'))
> t.set_clip_path(patch)
>
> ax.text(0.95, 0.01, 'colored text in axes coords',
> verticalalignment='bottom', horizontalalignment='right',
> transform=ax.transAxes,
> color='green', fontsize=15)
> ax.plot([2], [1], 'o')
> ax.annotate('annotate', xy=(2, 1), xytext=(3, 4),
> arrowprops=dict(facecolor='black', shrink=0.05))
> ax.axis([0, 10, 0, 10])
>
> ax.add_patch(patch)
> ax.set_clip_path(patch)
>
>
> plt.show()
>
> -------------------
>
>
> Can anybody give me a example?
> thanks.
>
> david.shu
> 2010.7.13
>
>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: John H. <jd...@gm...> - 2010-07-13 15:14:10
|
On Tue, Jul 13, 2010 at 5:34 AM, Preben Randhol <ra...@pv...> wrote: > Hi > > I have tried the mpl and glade examples and tried different approaches > from the net, but I can only get button_press_event to work with a matplot > canvas. key_press_event does not work using gtkagg for GUI. > > Is this due to the gtk builder 2.16? I mean does the main window steal the > key_presses or something? > > I had previously tried an example without a gtk gui (don't remember the > example). There a callback was connected and it could get events > containing both mouse click and keypress. I mean if I pressed the mouse > button while keeping doen say 'e' I could get form event.key that 'e' was > pressed when I click the mouse. > > I have to use gtk for the rest of the GUI so when I tried to pack the > canvas into gtk I got the problem that callbacks and connections didn't > work. i guess it has to do with that gtk has it's own callback system. > > If anybody has some example code, tips or tricks, I would very much > appreciate that. I cannot at the moment provide an example code due to > project deadline, but will do afterwards. I've seen this before when an mpl canvas is placed in a gtk notebook widget for example. The containing class swallows the kwy press event. What has worked for me before is to grab the focus with the mpl FigureCanvas: canvas.grab_focus() Thanks, JDH |
|
From: Georges S. <geo...@in...> - 2010-07-13 14:55:20
|
Hello all I am new to this newsgroup and not that experienced in using matplotlib. I build a figure with some interactive widget elements (Button, Slider, CheckButtons). I use the CheckButtons to interactively show or hide different time series by first plotting them and ones plotted turn the visible attribute to True or False. The slider is used to walk around on the datetime x axes by refreshing the plotted data of the lines. Currently I do the y-scaling by hand because autoscale fixes the range based on all plotted lines, visible and non-visible ones. Is there a possibility to restrict the autoscale mechanism to only visible lines. I did not find something related to this neither on this newsgroup nor by googleing. Only the thredt about "make autoscale_view even less tight?" from 4/2/2010 talks about building a custom locator somehow act on the tick level range creation. Do I need to create a custom autoscale_view method or something like that. Could someone point me to the best approach for doing something like that. Thanks already Georges Schutz |
|
From: Friedrich R. <fri...@gm...> - 2010-07-13 14:20:27
|
2010/7/12 Isaac Salazar <if...@la...>: > Hello, > I am getting a permission error when trying to open a figure or plotting > using matplotlib. > TclError: couldn't open > "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/mpl-data/images/home.ppm": > permission denied Simple question: Do you have read access to that directory? Of what kind is your user account? I guess it wants to display the button with the home image and cannot read it. Friedrich |
|
From: Karianne H. <kar...@as...> - 2010-07-13 12:42:34
|
It works! Awsome! Thank you so much!! I guess it is generally better to install everything that's using each other's programs at the same time, or update what you already have to the latest version upon installing more stuff. Cheers, Karianne On Fri, 9 Jul 2010, John Hunter wrote: > On Fri, Jul 9, 2010 at 7:25 AM, Karianne Holhjem > <kar...@as...> wrote: > > > Regarding numpy - what you say is intersting. I couldn't find any such > > problems in my google-searches. I am running version 1.2.1: > > [karianneholhjem:/] karianne% python -c 'import numpy; print numpy.__version__' > > 1.2.1 > > Can you try upgrading numpy to the latest released version? This is > likely your problem. I would rm -rf the old numpy in your > site-packages directory and upgrade to 1.4.1 > > > https://sourceforge.net/projects/numpy/files/NumPy/1.4.1/numpy-1.4.1-py2.5-python.org.dmg/download > > Are you using python.org python or Apple python -- it appears the > installer above is for python.org python > > JDH > |
|
From: sa6113 <s.p...@gm...> - 2010-07-13 11:27:14
|
Dear all, I want to print the plotted curves to a printer NOT to a file. if you know somthing such as "QwtPlotPrintFilter " class in Qwt. Which module help me? -- View this message in context: http://old.nabble.com/print-to-aprint-device%21-tp29149286p29149286.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Preben R. <ra...@pv...> - 2010-07-13 10:34:17
|
Hi I have tried the mpl and glade examples and tried different approaches from the net, but I can only get button_press_event to work with a matplot canvas. key_press_event does not work using gtkagg for GUI. Is this due to the gtk builder 2.16? I mean does the main window steal the key_presses or something? I had previously tried an example without a gtk gui (don't remember the example). There a callback was connected and it could get events containing both mouse click and keypress. I mean if I pressed the mouse button while keeping doen say 'e' I could get form event.key that 'e' was pressed when I click the mouse. I have to use gtk for the rest of the GUI so when I tried to pack the canvas into gtk I got the problem that callbacks and connections didn't work. i guess it has to do with that gtk has it's own callback system. If anybody has some example code, tips or tricks, I would very much appreciate that. I cannot at the moment provide an example code due to project deadline, but will do afterwards. thanks in advance Preben |
|
From: Preben R. <ra...@pv...> - 2010-07-13 10:23:39
|
> On 07/13/2010 02:05 AM, John Hunter wrote: >> I also see buggy behavior, but on my ubuntu linux system I see that >> the whole subplot gets painted black on a mouse press and remains so >> while the rubber-banding is in effect. It's not strictly black, but >> it looks like blackish bit noise. I also notice if I don't add the >> combobox to the vbox, I have no problem. But I don't see that the >> "plot moves".... > > By the plot moves, I mean that with a reasonably sized control on top of > the plot the lower x axis seems to shoot upward during the zoom. See the > attached example. I see the same moving on one of my PCs (64-bit) in Ubuntu 10.04. But the movement is much larger. |
|
From: João L. S. <js...@fc...> - 2010-07-13 09:43:31
|
On 07/13/2010 02:05 AM, John Hunter wrote: > I also see buggy behavior, but on my ubuntu linux system I see that > the whole subplot gets painted black on a mouse press and remains so > while the rubber-banding is in effect. It's not strictly black, but > it looks like blackish bit noise. I also notice if I don't add the > combobox to the vbox, I have no problem. But I don't see that the > "plot moves".... By the plot moves, I mean that with a reasonably sized control on top of the plot the lower x axis seems to shoot upward during the zoom. See the attached example. > > It;s somewhat reminiscent of this pixel noise I once reported working > on another gtkagg problem. > > Interestingly, I'm seeing the same behavior with backend gtk and gtkagg. > > All of which is discouraging: we both see bugs but different ones on > linux, Actually I think we are seeing the same bug (the blackish noise). I've included screen shots both on the original post and this one so you can see what happens while the mouse is pressed. >the appearance of the bug is caused by adding a combobox which > is not used (on my system), the bug appears on some platforms (linux) > but not others (win) and it appears for both gtk and gtkagg. > I agree with you that it does look like a gtk bug, although it's not ComboBox specific, as the example attached to this message uses a Label. JLS |
|
From: shuwj <shu...@16...> - 2010-07-13 08:22:41
|
Hi,
I wanna know how to clip text outside a polygon path.
In the attached a.png file, the polygon with red facecolor and green
edgecolor is a Path. I want to get rid of the text 'aaaaaaaaunicode:
Institut' outside the polygon and keep the part inside the polygon
('aaaaaaa') left.
my code as follows. It can work out a 'right' result as i wanted.
------------------
# -*- coding: utf-8 -*-
import matplotlib.pyplot as plt
import matplotlib.path as mpath
import matplotlib.patches as mpatches
import matplotlib.pyplot as plt
from matplotlib.transforms import *
Path=mpath.Path
lines = [ [1,1.5],[1,6],[6,3],[3,1.5],[1,1.5] ]
codes=[Path.LINETO]*len(lines)
codes[0]=Path.MOVETO
codes[-1]=Path.CLOSEPOLY
path=mpath.Path(lines,codes)
patch=mpatches.PathPatch(path,facecolor='red',edgecolor='green',lw=2)#,alpha=1)
fig = plt.figure()
fig.suptitle('bold figure suptitle', fontsize=14, fontweight='bold')
ax = fig.add_subplot(111)
fig.subplots_adjust(top=0.85)
ax.set_title('axes title')
ax.set_xlabel('xlabel')
ax.set_ylabel('ylabel')
ax.text(3, 8, 'boxed italics text in data coords', style='italic',
bbox={'facecolor':'red', 'alpha':0.5, 'pad':10})
ax.text(2, 6, r'an equation: $E=mc^2$', fontsize=15)
t=ax.text(3, 2, unicode('aaaaaaaaunicode: Institut f\374r Festk\366rperphysik', 'latin-1'))
t.set_clip_path(patch)
ax.text(0.95, 0.01, 'colored text in axes coords',
verticalalignment='bottom', horizontalalignment='right',
transform=ax.transAxes,
color='green', fontsize=15)
ax.plot([2], [1], 'o')
ax.annotate('annotate', xy=(2, 1), xytext=(3, 4),
arrowprops=dict(facecolor='black', shrink=0.05))
ax.axis([0, 10, 0, 10])
ax.add_patch(patch)
ax.set_clip_path(patch)
plt.show()
-------------------
Can anybody give me a example?
thanks.
david.shu
2010.7.13
|
|
From: Steve M. <st...@st...> - 2010-07-13 02:12:47
|
I was wrong in my last email. I was running another script and has a residual image from when I uploaded. I will test this and and post back.
On Jul 12, 2010, at 6:15 PM, Jeff Whitaker wrote:
> On 7/12/10 5:34 PM, Steve McFarlin wrote:
>> Hello,
>>
>> I have an issue rendering with basemap on a Debian server using Agg. I have confirmed that matplotlib does render using the following example.
>>
>> # do this before importing pylab or pyplot
>> import matplotlib
>> matplotlib.use('Agg')
>> import matplotlib.pyplot as plt
>> fig = plt.figure()
>> ax = fig.add_subplot(111)
>> ax.plot([1,2,3])
>> fig.savefig('test.png')
>>
>> However, I receive the following results when using basemap
>>
>> Traceback (most recent call last):
>> File "testImageGen.py", line 117, in<module>
>> setCommonBaseMapProperties(m)
>> File "/home/forecast/sgWaveModel/sgUtil.py", line 34, in setCommonBaseMapProperties
>> bmap.drawcoastlines(color=[15./255., 53./255.,73./255.], linewidth=0.15)
>> File "/usr/lib/python2.5/site-packages/mpl_toolkits/basemap/__init__.py", line 1479, in drawcoastlines
>> self.set_axes_limits(ax=ax)
>> File "/usr/lib/python2.5/site-packages/mpl_toolkits/basemap/__init__.py", line 2607, in set_axes_limits
>> and not ax.get_autoscalex_on()
>> AttributeError: 'AxesSubplot' object has no attribute 'get_autoscalex_on'
>>
>>
>> I am using matplotlib.use('Agg') as the first call in the script. The call to bmpa.drawcoastlines is the first call to basemap I make in my scripts. This works on a system with a windowing toolkit. Any ideas?
>>
>>
>> - steve
>>
>>
>
> Steve: What's your matplotlib version? Does adding
>
> ax.get_autoscalex_on()
>
> in your first script cause that to fail as well?
>
> -Jeff
>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: John H. <jd...@gm...> - 2010-07-13 02:00:29
|
On Mon, Jul 12, 2010 at 8:05 PM, John Hunter <jd...@gm...> wrote: > All of which is discouraging: we both see bugs but different ones on > linux, the appearance of the bug is caused by adding a combobox which > is not used (on my system), the bug appears on some platforms (linux) > but not others (win) and it appears for both gtk and gtkagg. The last thing I'll add for now is that my bug, the black pixel noise (fills the axes window when motion starts in a zoom-to-rect event) which may be unrelated to your bug, is happening in backend_gtk.NavigationToolbar2GTK.draw_rubberband in the pair of calls: # this is used to copy the background that the zoom to rect "rubberband" will be drawn over self._imageBack = axrect, drawable.get_image(*axrect) # this is used to restore the background before redrawing the rectangle for the zoom box drawable.draw_image(gc, imageBack, 0, 0, *lastrect) Since the bug is only exposed when a combo box is added to the hierarchy, and appears to be platform or gtk specific, I'm suspecting a gtk bug at this point. But I don't have anything conclusive or a minimal example which I could use to post to the gtk list. The mpl calls and values (axrect, lastrect, etc) look correct on inspection. Somehow the call to drawable.get_image is getting a buffer full of noise if and only if the combobox is added to the vbox. JDH |
|
From: Jeff W. <js...@fa...> - 2010-07-13 01:28:48
|
On 7/12/10 5:34 PM, Steve McFarlin wrote:
> Hello,
>
> I have an issue rendering with basemap on a Debian server using Agg. I have confirmed that matplotlib does render using the following example.
>
> # do this before importing pylab or pyplot
> import matplotlib
> matplotlib.use('Agg')
> import matplotlib.pyplot as plt
> fig = plt.figure()
> ax = fig.add_subplot(111)
> ax.plot([1,2,3])
> fig.savefig('test.png')
>
> However, I receive the following results when using basemap
>
> Traceback (most recent call last):
> File "testImageGen.py", line 117, in<module>
> setCommonBaseMapProperties(m)
> File "/home/forecast/sgWaveModel/sgUtil.py", line 34, in setCommonBaseMapProperties
> bmap.drawcoastlines(color=[15./255., 53./255.,73./255.], linewidth=0.15)
> File "/usr/lib/python2.5/site-packages/mpl_toolkits/basemap/__init__.py", line 1479, in drawcoastlines
> self.set_axes_limits(ax=ax)
> File "/usr/lib/python2.5/site-packages/mpl_toolkits/basemap/__init__.py", line 2607, in set_axes_limits
> and not ax.get_autoscalex_on()
> AttributeError: 'AxesSubplot' object has no attribute 'get_autoscalex_on'
>
>
> I am using matplotlib.use('Agg') as the first call in the script. The call to bmpa.drawcoastlines is the first call to basemap I make in my scripts. This works on a system with a windowing toolkit. Any ideas?
>
>
> - steve
>
>
Steve: What's your matplotlib version? Does adding
ax.get_autoscalex_on()
in your first script cause that to fail as well?
-Jeff
|
|
From: Steve M. <st...@st...> - 2010-07-13 01:20:23
|
Hello Jeff,
Again this was an issue with my lack of understanding. Installing python-matplotlib-data solved the issue.
Thanks once again.
- Steve (aka. AbstractMapping)
On Jul 12, 2010, at 6:15 PM, Jeff Whitaker wrote:
> On 7/12/10 5:34 PM, Steve McFarlin wrote:
>> Hello,
>>
>> I have an issue rendering with basemap on a Debian server using Agg. I have confirmed that matplotlib does render using the following example.
>>
>> # do this before importing pylab or pyplot
>> import matplotlib
>> matplotlib.use('Agg')
>> import matplotlib.pyplot as plt
>> fig = plt.figure()
>> ax = fig.add_subplot(111)
>> ax.plot([1,2,3])
>> fig.savefig('test.png')
>>
>> However, I receive the following results when using basemap
>>
>> Traceback (most recent call last):
>> File "testImageGen.py", line 117, in<module>
>> setCommonBaseMapProperties(m)
>> File "/home/forecast/sgWaveModel/sgUtil.py", line 34, in setCommonBaseMapProperties
>> bmap.drawcoastlines(color=[15./255., 53./255.,73./255.], linewidth=0.15)
>> File "/usr/lib/python2.5/site-packages/mpl_toolkits/basemap/__init__.py", line 1479, in drawcoastlines
>> self.set_axes_limits(ax=ax)
>> File "/usr/lib/python2.5/site-packages/mpl_toolkits/basemap/__init__.py", line 2607, in set_axes_limits
>> and not ax.get_autoscalex_on()
>> AttributeError: 'AxesSubplot' object has no attribute 'get_autoscalex_on'
>>
>>
>> I am using matplotlib.use('Agg') as the first call in the script. The call to bmpa.drawcoastlines is the first call to basemap I make in my scripts. This works on a system with a windowing toolkit. Any ideas?
>>
>>
>> - steve
>>
>>
>
> Steve: What's your matplotlib version? Does adding
>
> ax.get_autoscalex_on()
>
> in your first script cause that to fail as well?
>
> -Jeff
>
>
>
|