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
(35) |
2
(29) |
3
(12) |
4
|
5
(8) |
6
(5) |
|
7
(3) |
8
(38) |
9
(15) |
10
(20) |
11
(14) |
12
(12) |
13
(17) |
|
14
(6) |
15
(41) |
16
(38) |
17
(31) |
18
(7) |
19
(14) |
20
(12) |
|
21
(3) |
22
(3) |
23
(15) |
24
(4) |
25
|
26
(3) |
27
(2) |
|
28
(7) |
29
(16) |
30
(17) |
31
(10) |
|
|
|
|
From: Jeff W. <js...@fa...> - 2008-12-05 21:05:42
|
Mauro Cavalcanti wrote: > Dear Jeff, > > Thanks for your fast reply. Unfortunately, I have not been able to get > yet working: > > I have a menu event like this: > > borders = [] > if self.MapDrawBorderItem.IsChecked(): > borders = self.map.drawcountries() > else: > self.ax.lines.remove(borders) > # .... redraw the map here... > > But I got a ValueError: list.remove(x): x not in list > > Any hints? > Mauro: Instead of self.ax.lines.remove(borders) I think should simply do borders.remove() -Jeff > With best regards, > > 2008/12/5 Jeff Whitaker <js...@fa...>: > >> Mauro Cavalcanti wrote: >> >>> Dear ALL, >>> >>> Always engaged in pushing MPL/Basemap ahead of its limits, here am I >>> again with a humble question: I want to be able to toggle the display >>> of country boundaries on a map using a menu option on my wxPython >>> interface. It is quite easy to initially plotting a map without >>> borders and then toggling them on, but I could not figure out a way to >>> toggling them off (if possible, without redrawing the whole map). Is >>> there any trick to do this? ;-) >>> >>> Thanks in advance! >>> >>> With warmest regards, >>> >>> >>> >> Mauro: >> >> The drawcountries() method returns a matplotlib line collection. Invoking >> the remove() method of the line collection will remove the countries from >> the axes instance. >> >> -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 >> >> >> > > > > -- 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: Jeff W. <js...@fa...> - 2008-12-05 20:32:38
|
Mauro Cavalcanti wrote: > Dear ALL, > > Always engaged in pushing MPL/Basemap ahead of its limits, here am I > again with a humble question: I want to be able to toggle the display > of country boundaries on a map using a menu option on my wxPython > interface. It is quite easy to initially plotting a map without > borders and then toggling them on, but I could not figure out a way to > toggling them off (if possible, without redrawing the whole map). Is > there any trick to do this? ;-) > > Thanks in advance! > > With warmest regards, > > Mauro: The drawcountries() method returns a matplotlib line collection. Invoking the remove() method of the line collection will remove the countries from the axes instance. -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: Mauro C. <mau...@gm...> - 2008-12-05 20:08:03
|
Dear ALL, Always engaged in pushing MPL/Basemap ahead of its limits, here am I again with a humble question: I want to be able to toggle the display of country boundaries on a map using a menu option on my wxPython interface. It is quite easy to initially plotting a map without borders and then toggling them on, but I could not figure out a way to toggling them off (if possible, without redrawing the whole map). Is there any trick to do this? ;-) Thanks in advance! With warmest regards, -- Dr. Mauro J. Cavalcanti Ecoinformatics Studio P.O. Box 46521, CEP 20551-970 Rio de Janeiro, RJ, BRASIL E-mail: mau...@gm... Web: http://studio.infobio.net Linux Registered User #473524 * Ubuntu User #22717 "Life is complex. It consists of real and imaginary parts." |
|
From: Armando S. L. <ars...@gm...> - 2008-12-05 13:01:15
|
The bottleneck for Python 3 adoption is going to be the availability of compatible third party libraries. I'm using numpy, scipy, matplotlib, wxpython, pywin32 and py2exe, so I'm not even going to download python 3 until all these projects have moved to it. Armando. On Fri, Dec 5, 2008 at 2:37 AM, Kaushik Ghose <Kau...@hm... > wrote: > > Has anyone switched to python 3? > > Thanks > -Kaushik > |
|
From: John H. <jd...@gm...> - 2008-12-05 03:05:17
|
On Thu, Dec 4, 2008 at 8:42 PM, David Cournapeau <da...@ar...> wrote: >> Quick question. Is matplotlib python 3 compatible? Has anyone switched to python >> 3? Anecdotally, how much of a pain is it to switch over, if you use common >> scientific libraries such as PIL and VTK? >> > > matplotlib depends on numpy, and numpy on python 3 won't be finished > anytime soon - it will be a huge task. mpl also depends on CXX for extension code. I was heartened to see that the python 3 migration is well underway in CXX svn. Since this is most of our extension code, hopefully it will insulate from serious difficulties porting the extension code. But we will have to wait for CXX and numpy before we can do serious work. JDH |
|
From: David C. <da...@ar...> - 2008-12-05 02:57:27
|
Kaushik Ghose wrote: > Hi Everyone, > > Quick question. Is matplotlib python 3 compatible? Has anyone switched to python > 3? Anecdotally, how much of a pain is it to switch over, if you use common > scientific libraries such as PIL and VTK? > matplotlib depends on numpy, and numpy on python 3 won't be finished anytime soon - it will be a huge task. David |
|
From: Kaushik G. <Kau...@hm...> - 2008-12-05 02:37:03
|
Hi Everyone, Quick question. Is matplotlib python 3 compatible? Has anyone switched to python 3? Anecdotally, how much of a pain is it to switch over, if you use common scientific libraries such as PIL and VTK? Thanks -Kaushik |
|
From: Christopher B. <Chr...@no...> - 2008-12-03 23:05:01
|
Elfnor wrote: > I'm giving an introductory talk on matplotlib to colleagues next week. I'd > like to run matplotlib in interactive mode from the PythonWin IDE. Is this > possible? probably not reliably -- pythonWin IDE runs things inside the same interpreter as the IDE itself, and therefore has problems running GUI code with any GUI that MPL supports. IPython has smarts to start up MPL in another thread to avoid the issues. Has pythonWin IDE seen any maintenance in the last five years? It may be time for them to move on! On the other hand, you can still edit code with the IDE, and start it from a command line. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
|
From: Elfnor <el...@gm...> - 2008-12-03 22:05:15
|
Hi I'm giving an introductory talk on matplotlib to colleagues next week. I'd like to run matplotlib in interactive mode from the PythonWin IDE. Is this possible? I use PyScripter or occasionally IPython myself, but the python group I'm talking to have all been set up with PythonWin and my brief is to avoid confusing then with another IDE. thanks Eleanor -- View this message in context: http://www.nabble.com/Can-matplotlib-be-run-from-PythonWin-IDE-in-interactive-mode--tp20822638p20822638.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Eric F. <ef...@ha...> - 2008-12-03 21:44:00
|
Mike Hearne wrote: > > >>I don't think this is going to make it easy to do what you want > > It might if I could find the x,y data in the LineCollection objects. > There is an undocumented function in the LineCollection class called > get_paths(), which looks like it returns a list of Path objects. These > path objects have a vertices property which looks like the stuff I want. > I'll explore this for a while. Anyone who knows more about these > objects, feel free to chime in! Mike, Have you tried simply making two sets of contours, one where you have masked out the region that you want dashed, and a second with the inverse of that mask? (Or, maybe the original mask and the inverted mask should overlap so that the contours in both regions go to their common boundary.) Granted, there may be edge effects between the regions, but it should be simple and quick. Eric > > Thanks, > > Mike > > > *Eric Firing <ef...@ha...>* > > 12/03/08 01:59 PM > > > To > Mike Hearne <mh...@us...> > cc > mat...@li... > Subject > Re: [Matplotlib-users] Contour line data > > > > > > > > > Mike Hearne wrote: > > > > How can I get the actual x,y data that represents the contour lines that > > are drawn with the contour() function? > > > > I'd like to be able to redraw portions of those lines with different > > styles (dashed, dotted, etc.) > > > > For example, given the following sample code (lifted from the > > sourceforge example): > > > > from pylab import * > > from numpy import * > > > > delta = 0.025 > > x = arange(-3.0, 3.0, delta) > > y = arange(-2.0, 2.0, delta) > > X, Y = meshgrid(x, y) > > Z1 = bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0) > > Z2 = bivariate_normal(X, Y, 1.5, 0.5, 1, 1) > > # difference of Gaussians > > Z = 10.0 * (Z2 - Z1) > > figure() > > cs = plt.contour(X, Y, Z) > > show() > > > > How could I, for example, re-draw the lines in the region X [0 1] Y > > [-1.5 -0.5] as dashed? > > > > I could do it, I think, if I had the for all the lines in the plot. > > I don't think this is going to make it easy to do what you want, but > cs.collections is a list of LineCollection objects corresponding to the > contour levels in cs.levels. > > Eric > |
|
From: Mike H. <mh...@us...> - 2008-12-03 21:12:39
|
>>I don't think this is going to make it easy to do what you want It might if I could find the x,y data in the LineCollection objects. There is an undocumented function in the LineCollection class called get_paths(), which looks like it returns a list of Path objects. These path objects have a vertices property which looks like the stuff I want. I'll explore this for a while. Anyone who knows more about these objects, feel free to chime in! Thanks, Mike Eric Firing <ef...@ha...> 12/03/08 01:59 PM To Mike Hearne <mh...@us...> cc mat...@li... Subject Re: [Matplotlib-users] Contour line data Mike Hearne wrote: > > How can I get the actual x,y data that represents the contour lines that > are drawn with the contour() function? > > I'd like to be able to redraw portions of those lines with different > styles (dashed, dotted, etc.) > > For example, given the following sample code (lifted from the > sourceforge example): > > from pylab import * > from numpy import * > > delta = 0.025 > x = arange(-3.0, 3.0, delta) > y = arange(-2.0, 2.0, delta) > X, Y = meshgrid(x, y) > Z1 = bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0) > Z2 = bivariate_normal(X, Y, 1.5, 0.5, 1, 1) > # difference of Gaussians > Z = 10.0 * (Z2 - Z1) > figure() > cs = plt.contour(X, Y, Z) > show() > > How could I, for example, re-draw the lines in the region X [0 1] Y > [-1.5 -0.5] as dashed? > > I could do it, I think, if I had the for all the lines in the plot. I don't think this is going to make it easy to do what you want, but cs.collections is a list of LineCollection objects corresponding to the contour levels in cs.levels. Eric |
|
From: Eric F. <ef...@ha...> - 2008-12-03 21:00:14
|
Mike Hearne wrote: > > How can I get the actual x,y data that represents the contour lines that > are drawn with the contour() function? > > I'd like to be able to redraw portions of those lines with different > styles (dashed, dotted, etc.) > > For example, given the following sample code (lifted from the > sourceforge example): > > from pylab import * > from numpy import * > > delta = 0.025 > x = arange(-3.0, 3.0, delta) > y = arange(-2.0, 2.0, delta) > X, Y = meshgrid(x, y) > Z1 = bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0) > Z2 = bivariate_normal(X, Y, 1.5, 0.5, 1, 1) > # difference of Gaussians > Z = 10.0 * (Z2 - Z1) > figure() > cs = plt.contour(X, Y, Z) > show() > > How could I, for example, re-draw the lines in the region X [0 1] Y > [-1.5 -0.5] as dashed? > > I could do it, I think, if I had the for all the lines in the plot. I don't think this is going to make it easy to do what you want, but cs.collections is a list of LineCollection objects corresponding to the contour levels in cs.levels. Eric |
|
From: Mike H. <mh...@us...> - 2008-12-03 20:53:03
|
How can I get the actual x,y data that represents the contour lines that are drawn with the contour() function? I'd like to be able to redraw portions of those lines with different styles (dashed, dotted, etc.) For example, given the following sample code (lifted from the sourceforge example): from pylab import * from numpy import * delta = 0.025 x = arange(-3.0, 3.0, delta) y = arange(-2.0, 2.0, delta) X, Y = meshgrid(x, y) Z1 = bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0) Z2 = bivariate_normal(X, Y, 1.5, 0.5, 1, 1) # difference of Gaussians Z = 10.0 * (Z2 - Z1) figure() cs = plt.contour(X, Y, Z) show() How could I, for example, re-draw the lines in the region X [0 1] Y [-1.5 -0.5] as dashed? I could do it, I think, if I had the for all the lines in the plot. --Mike |
|
From: John H. <jd...@gm...> - 2008-12-03 19:12:59
|
On Wed, Dec 3, 2008 at 9:15 AM, Nitin Bhide <nit...@ya...> wrote: > Hi, > > I am getting following error while running the 'legend_demo3.py' from the examples. > > exec codeObject in __main__.__dict__ > File "D:\nitinb\SoftwareSources\SVNPlot\legendtest.py", line 13, in <module> > ax1.legend(loc=1, ncol=3, shadow=True) > File "F:\Python25\Lib\site-packages\matplotlib\axes.py", line 3617, in legend > self.legend_ = mlegend.Legend(self, handles, labels, **kwargs) > TypeError: __init__() got an unexpected keyword argument 'ncol' > > I am using ActivePython version 2.5.2 and Matplotlib version 0.98.3 We use the svn version of matplotlib to generate the website, and ncol is a recent feature not in the main release yet. You can checkout the svn code following the instructions at http://matplotlib.sourceforge.net/devel/coding_guide.html I have added a note on the gallery warning people that not all the images are available in the latest release with a pointer to the svn instructions. But we would like to get a release out ASAP! JDH |
|
From: Nitin B. <nit...@ya...> - 2008-12-03 15:15:51
|
Hi,
I am getting following error while running the 'legend_demo3.py' from the examples.
exec codeObject in __main__.__dict__
File "D:\nitinb\SoftwareSources\SVNPlot\legendtest.py", line 13, in <module>
ax1.legend(loc=1, ncol=3, shadow=True)
File "F:\Python25\Lib\site-packages\matplotlib\axes.py", line 3617, in legend
self.legend_ = mlegend.Legend(self, handles, labels, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'ncol'
I am using ActivePython version 2.5.2 and Matplotlib version 0.98.3
Regards
Nitin
|
|
From: Ryan M. <rm...@gm...> - 2008-12-03 14:48:24
|
Nils Wagner wrote: > Hi all, > > How can I suppress xticks in a polar plot ? import matplotlib.pyplot as plt from matplotlib.ticker import NullFormatter ax = plt.subplot(1, 1, 1, polar=True) ax.xaxis.set_major_formatter(NullFormatter()) plt.show() Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma |
|
From: Jeff W. <jef...@no...> - 2008-12-03 13:26:12
|
Aleš Čadež wrote: > > Dear Jeffrey, > > First of all, sorry to bother you. I'm using matplotlib mapping > toolkit. Can you help me with one problem. I would like to colour > different countries with different colors. Is there any way to do this > with basemap toolkit library? I just can't seem to find any function > that would do that. > > > > Thank you again, > > Ales Cadez > Ales: You need an external shapefile containing country polygons for this. The built-in country dataset in Basemap is made up of line segments, so you can't fill them. Here's a simple example to get you started: import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.basemap import Basemap as Basemap from matplotlib.patches import Polygon # Robinson world map m = Basemap(projection='robin',lon_0=0) # draw country boundaries # data from http://www.cipotato.org/diva/data/misc/world_adm0.zip shp_info = m.readshapefile('world_adm0','countries',drawbounds=True) ax = plt.gca() # get current axes instance # fill US blue, Russia red, the rest gray. for nshape,seg in enumerate(m.countries): if m.countries_info[nshape]['NAME'] == 'United States': poly = Polygon(seg,facecolor='b',edgecolor='b') elif m.countries_info[nshape]['NAME'] == 'Russia': poly = Polygon(seg,facecolor='r',edgecolor='r') else: poly = Polygon(seg,facecolor='0.7',edgecolor='0.7') ax.add_patch(poly) # draw meridians and parallels. m.drawparallels(np.arange(-80,81,20)) m.drawmeridians(np.arange(-180,180,60)) # draw projection limb, set background color m.drawmapboundary(fill_color='aqua') plt.title('US Blue, Russia Red') plt.show() -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 325 Broadway Boulder, CO, USA 80305-3328 |
|
From: Nils W. <nw...@ia...> - 2008-12-03 09:19:21
|
Hi all, How can I suppress xticks in a polar plot ? Nils |
|
From: Jesper L. <jes...@gm...> - 2008-12-03 04:44:54
|
Thank you for your answers and the obvious solution (banging head into wall). Best regards, Jesper 2008/12/1 Jae-Joon Lee <lee...@gm...>: > On Mon, Dec 1, 2008 at 12:56 AM, Jesper Larsen <jes...@gm...> wrote: >> Hi Matplotlib users, >> >> I have a web application in which I would like to scale the plots down >> if the users horizontal screen size is less than 800. Currently only >> the plot is scaled while the fonts are fixed in size (see link below >> for application). This is of course not a viable solution. I was >> therefore wondering what the best way to scale fonts consistently with >> figure size is. A requirement is that the scaling is thread safe (or >> whatever it is called) in the sense that it should not affect other >> threads executing matplotlib (since they may have different screen >> resolutions). >> > > Saving the figure with smaller dpi doesn't work? > It is not clear how you're scaling down the over all plot (smaller > figure size, maybe?), > but I guess the easiest way is to have everything same and save it > with a smaller dpi. > > -JJ > |
|
From: Eric F. <ef...@ha...> - 2008-12-02 22:32:32
|
João et al.,
Thanks for the bug report. Mike D. has fixed the problem in svn. (I had
moved the discussion to matplotlib-devel; I am just reporting back to
matplotlib-users so this thread can be closed.)
Eric
Eric Firing wrote:
> wafels wrote:
>> Hello,
>>
>> I can confirm and extend this bug report. The axvline also moves to the
>> wrong position on resizing the matplotlib display window (Mac OS X 10.5.5,
>> Python 2.5.1, Matplotlib 0.98.3).
>>
>> Thanks
>
> It looks like the transform for the line made by axvline is not getting
> updated when view limits change. The problem is found in svn, after the
> changes I made to axvline, as well as in 0.98.3. I can't track it down
> right now.
>
> Eric
>
>>
>>
>> João Luís Silva-2 wrote:
>>> Hi,
>>>
>>> A vertical line on the x axis of a semilogy plot will be in the correct
>>> position, but when saved with the save button of the toolbar it will be
>>> placed in an incorrect position, although savefig will do the right
>>> thing. Furthermore, zooming will not move the axvline correctly.
>>>
>>> Matplotlib version: 0.98.3
>>>
>>> Example script:
>>> -----------------------------------------
>>>
>>> import matplotlib.pyplot as pl
>>> import numpy as np
>>>
>>> x = np.linspace(0.0,1.0,100)
>>>
>>> pl.semilogy(x,x**2)
>>> pl.axvline(x=0.5,ls='--',color='k')
>>> pl.show()
>>> #pl.savefig("saved_image.png")
>>> -----------------------------------------
>>>
>>> image.png was saved using the toolbar, saved_image.png using savefig.
>>>
>>> Regards,
>>> João Silva
|
|
From: Gary R. <gr...@bi...> - 2008-12-02 22:08:44
|
Thanks for the rapid fix Mike. regards, Gary Michael Droettboom wrote: > There is an explicit offset of one pixel on the left when it sets up a > clip box in Agg. I don't know why this is there, but it dates back to > 0.98.0, and earlier versions did something completely different. I can > only guess it was to compensate for an earlier bug in the precise > drawing of the axes rectangle. I can't explain why it would have > different behavior on Windows vs. Linux, though. > > I have fixed this in SVN r6465 and am including a patch below (which > unfortunately requires a recompile). > > Cheers, > Mike |
|
From: Michael D. <md...@st...> - 2008-12-02 20:11:06
|
I've committed both of these things. The subplot()/polar() change seems tricky, so it may produce some breakage even though the "regression tests" are passing. Please let me know if you see anything strange after this change. Mike Ryan May wrote: > Michael Droettboom wrote: >> Thanks for updating the docstring. I actually saw this as a >> usability bug and have come up with a patch such that polar() (et al) >> will *replace* the current axes with a polar plot if it isn't already >> polar. This is (from the user's perspective) similar to how, for >> example, a histogram plot would work -- that is, you don't have to >> tell subplot you're about to plot a histogram. >> >> But Ryan's new docstring is not obsolete with respect to my proposed >> change. Both techniques will work, and in fact subplot(polar=True); >> polar(...) will be slightly faster since it avoids creating a linear >> axes which is subsequently thrown away. >> >> Any argument against committing my change? > > None here. I'm +1. > >> The polar theta tick formatter could be changed to call "round", I >> guess. Alternatively, it looks like '%0.0f' also does the right >> thing. I think that's generally what people would want for polar >> plots. This change would only affect polar theta ticks, so we don't >> need to worry about a change in behavior in standard Euclidean plots. >> >> Ryan's workaround (to get around this numerically external to >> matplotlib) is a good suggestion as well, but I think changing the >> formatter may be less surprising... > > I like the idea of using %0.0f. If I don't hear any objections, I'll > go ahead and make the change. It definitely will make things less > confusing for our users. > > Ryan > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: Ryan M. <rm...@gm...> - 2008-12-02 19:07:14
|
Michael Droettboom wrote: > Thanks for updating the docstring. I actually saw this as a usability > bug and have come up with a patch such that polar() (et al) will > *replace* the current axes with a polar plot if it isn't already polar. > This is (from the user's perspective) similar to how, for example, a > histogram plot would work -- that is, you don't have to tell subplot > you're about to plot a histogram. > > But Ryan's new docstring is not obsolete with respect to my proposed > change. Both techniques will work, and in fact subplot(polar=True); > polar(...) will be slightly faster since it avoids creating a linear > axes which is subsequently thrown away. > > Any argument against committing my change? None here. I'm +1. > The polar theta tick formatter could be changed to call "round", I > guess. Alternatively, it looks like '%0.0f' also does the right thing. > I think that's generally what people would want for polar plots. This > change would only affect polar theta ticks, so we don't need to worry > about a change in behavior in standard Euclidean plots. > > Ryan's workaround (to get around this numerically external to > matplotlib) is a good suggestion as well, but I think changing the > formatter may be less surprising... I like the idea of using %0.0f. If I don't hear any objections, I'll go ahead and make the change. It definitely will make things less confusing for our users. Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma |
|
From: John H. <jd...@gm...> - 2008-12-02 18:29:43
|
On Tue, Dec 2, 2008 at 12:09 PM, Eric Emsellem <ems...@ob...> wrote: > Really annoying but as mentioned before, I cannot get a set of commands which > consistenly break the session, so... Since there does not appear to be an easy diagnosis or fix, you may want to consider switching your backend to the non-threaded tkagg JDH |
|
From: Michael D. <md...@st...> - 2008-12-02 18:27:31
|
Ryan May wrote: > On Tue, Dec 2, 2008 at 11:27 AM, Nils Wagner > <nw...@ia... <mailto:nw...@ia...>> > wrote: > > Thank you very much ! > It would be nice to have that information in the docstring > > > Done. Thanks for updating the docstring. I actually saw this as a usability bug and have come up with a patch such that polar() (et al) will *replace* the current axes with a polar plot if it isn't already polar. This is (from the user's perspective) similar to how, for example, a histogram plot would work -- that is, you don't have to tell subplot you're about to plot a histogram. But Ryan's new docstring is not obsolete with respect to my proposed change. Both techniques will work, and in fact subplot(polar=True); polar(...) will be slightly faster since it avoids creating a linear axes which is subsequently thrown away. Any argument against committing my change? > > > The next inquiry is related to xticks. > I have added > > xticks(linspace(0,2*pi,24,endpoint=False)) > > The difference between consecutive xticks is varying between 14 > and 16 degrees. > > For what reason ? > > > Looks like roundoff error. For instance: > > linspace(0, 2*pi, 24)[7] * 180. / pi > 104.999999999999 > > If you format that with '%d', it becomes 104, not 105. > > Is there an accepted way of doing this rounding in matplotlib that > doesn't round in odd cases? The polar theta tick formatter could be changed to call "round", I guess. Alternatively, it looks like '%0.0f' also does the right thing. I think that's generally what people would want for polar plots. This change would only affect polar theta ticks, so we don't need to worry about a change in behavior in standard Euclidean plots. Ryan's workaround (to get around this numerically external to matplotlib) is a good suggestion as well, but I think changing the formatter may be less surprising... Cheers, Mike -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |