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
(1) |
2
(43) |
3
(17) |
4
(12) |
5
(9) |
6
(14) |
7
(8) |
8
|
9
(15) |
10
(16) |
11
(11) |
12
(10) |
13
(20) |
14
(7) |
15
(4) |
16
(16) |
17
(25) |
18
(10) |
19
(27) |
20
(26) |
21
(6) |
22
(20) |
23
(12) |
24
(15) |
25
(22) |
26
(15) |
27
(43) |
28
(8) |
29
(6) |
30
(12) |
|
|
|
|
|
On Thu, Jun 19, 2008 at 3:37 PM, Alan G Isaac <ai...@am...> wrote: > On 2008年6月19日, John Hunter apparently wrote: >> This is covered somewhat in Chapter 10 of the user's guide >> http://matplotlib.sourceforge.net/users_guide_0.98.0.pdf > > Your post was helpful. > I still do not see why a figure has a canvas as data. > I'll read that chapter. This is just a convenience so the child can see the parent. If I have a function that gets a line, I can do line.axes.figure.canvas and walk backwards up the containment hierarchy to get what I need. This is backwards because a canvas holds a figure which holds an axes which holds a line, but everybody stores a reference to their parent. A side effect of having so many cyclic references is that we cannot use __del__ anywhere in the mpl class hierarchy since this breaks garbage collection with cyclic references.
On 2008年6月19日, John Hunter apparently wrote: > This is covered somewhat in Chapter 10 of the user's guide > http://matplotlib.sourceforge.net/users_guide_0.98.0.pdf Your post was helpful. I still do not see why a figure has a canvas as data. I'll read that chapter. Thanks! Alan
John Hunter wrote: > I don't think this is what you want. gtk is already threaded. By > doing things in the gtk mainloop, you are using their threading. You > are asking for a world of pain if you try and mix in python threading > unless you really know what you are doing. The point of the example > is that you don't need to use python threads. All your printing and > figure updating can be done in function calls activated by the gtk > loop. Ok, I think I see your point. Let me explain what I'm after, then. I'm doing some distributed computing and need to have a pylab process running remotely that accepts plotting commands. The issue is that the show() command takes over the main thread of execution, so I can't have my listening process running. Essentially I need to: 1) Pop up a figure() 2) Start the drawing loop 3) Start the socket listener 4) When the listener gets commands, execute them (plot, etc) Is this something that I can do? Thanks, dan
On Thu, Jun 19, 2008 at 2:30 PM, Daniel Ashbrook <an...@cc...> wrote: > John Hunter wrote: >> >> Use the gtk mainloop and do your figure updates in a timeout add or a >> idle handler (as suggested in the animation tutorial at >> http://www.scipy.org/Cookbook/Matplotlib/Animations > > Excellent, thanks. Your sample code adapted nicely; appended below for > posterity. I don't think this is what you want. gtk is already threaded. By doing things in the gtk mainloop, you are using their threading. You are asking for a world of pain if you try and mix in python threading unless you really know what you are doing. The point of the example is that you don't need to use python threads. All your printing and figure updating can be done in function calls activated by the gtk loop. JDH
John Hunter wrote: > Use the gtk mainloop and do your figure updates in a timeout add or a > idle handler (as suggested in the animation tutorial at > http://www.scipy.org/Cookbook/Matplotlib/Animations Excellent, thanks. Your sample code adapted nicely; appended below for posterity. dan import gobject import numpy as np import matplotlib matplotlib.use('GTKAgg') import matplotlib.pyplot as plt import threading, time class PylabThread(threading.Thread): def __init__(self): threading.Thread.__init__(self) self.fig = plt.figure() ax = self.fig.add_subplot(111) self.line, = ax.plot(np.random.rand(10)) ax.set_ylim(0, 1) def update(self): self.line.set_ydata(np.random.rand(10)) self.fig.canvas.draw_idle() return True # return False to terminate the updates def run(self): gobject.timeout_add(100, self.update) # you can also use idle_add to update when gtk is idle plt.show() if __name__ == "__main__": p = PylabThread() p.start() i = 0 while True: print "%.2f: %d" % (time.time(), i) i += 1 time.sleep(.5)
On Thu, Jun 19, 2008 at 1:40 PM, Daniel Ashbrook <an...@cc...> wrote: > I need to have a plot window hang around and be occasionally updated by > my script as it does things. I've been looking through examples and have > not been able to get anything to work. > > My current approach, inspired by strip_chart_demo.py and others in the > animation examples, is: Use the gtk mainloop and do your figure updates in a timeout add or a idle handler (as suggested in the animation tutorial at http://www.scipy.org/Cookbook/Matplotlib/Animations import gobject import numpy as np import matplotlib matplotlib.use('GTKAgg') import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) line, = ax.plot(np.random.rand(10)) ax.set_ylim(0, 1) def update(): line.set_ydata(np.random.rand(10)) fig.canvas.draw_idle() return True # return False to terminate the updates gobject.timeout_add(100, update) # you can also use idle_add to update when gtk is idle plt.show()
On Thu, Jun 19, 2008 at 12:26 PM, Cormac Purcell <Cor...@ma...> wrote: > Hello, > > I need to find a way to apply a offset and scaling factor to the X and Y > axes on an image plot. Instead of showing the pixel number I would like > to transform the axes to 'world' coordinates, in this case degrees of > Right-ascension and Declination in an astronomical image. The > transformation is defined on both axes via an offset and a scaling factor. I believe you are looking for the "extent" argument to imshow, which will handle a linear scaling and offset. JDH
I need to have a plot window hang around and be occasionally updated by my script as it does things. I've been looking through examples and have not been able to get anything to work. My current approach, inspired by strip_chart_demo.py and others in the animation examples, is: import gobject, matplotlib, sys matplotlib.use('GTKAgg') import matplotlib.pylab as pylab import threading, time, random class PylabThread(threading.Thread): def __init__(self): threading.Thread.__init__(self) def update(self): pylab.draw() def run(self): gobject.idle_add(self.update) pylab.plot([random.random() for i in xrange(1000)]) pylab.show() if __name__ == "__main__": p = PylabThread() p.start() i = 0 while True: print i i += 1 time.sleep(.5) Running this, however, yields the odd behavior that you only get numbers printed every half second (as you should) if you move the mouse (or hit keys, or otherwise generate events) within the plot window! What's going on, and how can I fix this? Thanks! dan
Hello, I need to find a way to apply a offset and scaling factor to the X and Y axes on an image plot. Instead of showing the pixel number I would like to transform the axes to 'world' coordinates, in this case degrees of Right-ascension and Declination in an astronomical image. The transformation is defined on both axes via an offset and a scaling factor. For example in PGPLOT this can be accomplished by specifying a transformation vector with the call to 'pgimag()'. http://www.icp.uni-stuttgart.de/~feri/pgplot.html#PGIMAG Despite looking at the examples in the tar-ball I cannot seem to find similar functionality - likely because I am new to matplotlib. Can anybody point me in the right direction? Thanks, Cormac
On Thu, Jun 19, 2008 at 11:02 AM, John Hunter <jd...@gm...> wrote: >> I want to adjust the x position of my ylabel, like >> >> subplot(111) >> ylabel('YLabel', x=-.25, y=.75) >> >> the 'y=.75' argument is applied but the 'x=-.2' argument has no affect. >> But why? Have you any idea to do this? > > The x position is automatically determined by the size of the > yticklabels. We should provide a means to override this x position, > but it is not possible currently. Since our typical mantra is "we don't do much autolayout but we make it possible for you to layout your figure as you like", I wasn't satisfied with my answer, so I committed a patch to svn which supports setting the label coords. See the example below import numpy as np import matplotlib.pyplot as plt box = dict(facecolor='yellow', pad=5, alpha=0.2) fig = plt.figure() fig.subplots_adjust(left=0.2, wspace=0.6) ax1 = fig.add_subplot(221) ax1.plot(2000*np.random.rand(10)) ax1.set_title('ylabels not aligned') ax1.set_ylabel('misaligned 1', bbox=box) ax1.set_ylim(0, 2000) ax3 = fig.add_subplot(223) ax3.set_ylabel('misaligned 2',bbox=box) ax3.plot(np.random.rand(10)) labelx = -0.3 # axes coords ax2 = fig.add_subplot(222) ax2.set_title('ylabels aligned') ax2.plot(2000*np.random.rand(10)) ax2.set_ylabel('aligned 1', bbox=box) ax2.yaxis.set_label_coords(labelx, 0.5) ax2.set_ylim(0, 2000) ax4 = fig.add_subplot(224) ax4.plot(np.random.rand(10)) ax4.set_ylabel('aligned 2', bbox=box) ax4.yaxis.set_label_coords(labelx, 0.5) plt.show()
On Thu, Jun 19, 2008 at 11:23 AM, Bryan Fodness <bry...@gm...> wrote: > I have an axes instance that I would like to rotate. I see that there is a > rotation keyword for text and would like to do something like that with a > plot. Is this possible. Not currently, no. JDH
Thanks, sadly, I DID download them and had them in the right directory. I had just not decompressed them! Kurt ------------------------------ Message: 4 Date: 2008年6月19日 14:47:51 +0100 From: Jose G?mez-Dans <jgo...@gm...> Subject: Re: [Matplotlib-users] tesgdal in examples of basemap To: mat...@li... Message-ID: <200...@gm...> Content-Type: text/plain; charset="iso-8859-1" Hi, On Thursday 19 June 2008 00:16:39 KURT PETERS wrote: > array = gd.ReadAsArray() > AttributeError: 'NoneType' object has no attribute 'ReadAsArray' > > Anyone know what the problem is? Do I need something else? Did you download the Denver DEM from USGS? From testgdal.py: # download from # http://edcftp.cr.usgs.gov/pub/data/DEM/250/D/denver-w.gz It should work after that... Cheers, Jose -- NERC Centre for Terrestrial Carbon Dynamics, Department of Geography, University College London Gower Street, London WC1E 6BT, UK
I have an axes instance that I would like to rotate. I see that there is a rotation keyword for text and would like to do something like that with a plot. Is this possible. -- "The game of science can accurately be described as a never-ending insult to human intelligence." - João Magueijo "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. " -Albert Einstein
On Thu, Jun 19, 2008 at 5:16 AM, Friedrich Hagedorn <fri...@gm...> wrote: > Hello, > > I want to adjust the x position of my ylabel, like > > subplot(111) > ylabel('YLabel', x=-.25, y=.75) > > the 'y=.75' argument is applied but the 'x=-.2' argument has no affect. > But why? Have you any idea to do this? The x position is automatically determined by the size of the yticklabels. We should provide a means to override this x position, but it is not possible currently. JDH
On Thu, Jun 19, 2008 at 8:58 AM, Alan G Isaac <ai...@am...> wrote: > On 2008年6月19日, Scott Sinclair apparently wrote: >> canvas = FigureCanvas(fig) > > What is the relationship between a figure and a canvas? The Figure is the top level matplotlib artist container that contains all the other matplotlib.artist.Artist instances (Axes, Line2D, etc..). Artists don't know anything about output formats (GDK, PS, SVG) but they do know about renderers (matplotlib.backend_bases.RendererBase) which have methods like draw_line, draw_rectangle, and draw_text. The renderer subclasses know the various output languages like postscript or svg. The canvas is the target of the drawing by the renderer, and the canvas puts all the pieces together. The canvas contains a renderer that knows how to draw on the canvas, and it also contains the figure instance to be drawn. The canvas calls fig.draw(renderer) and then the figure instance in turn calls self.figurePatch.draw(renderer) and then the figurePatch, a matplotlib.patches.Rectangle instance, calls renderer.draw_rectangle(graphicscontext, 25, 40) So the renderer doesn't know anything about the matplotlib artist Rectangle, but the Rectangle knows how to tell the renderer to draw itself. This design decouples the functionality to make it possible to change the artists w/o affecting the renderers, so the drawing API is not affected by the matplotlib artist classes. This is covered somewhat in Chapter 10 of the user's guide http://matplotlib.sourceforge.net/users_guide_0.98.0.pdf JDH
On Wed, Jun 18, 2008 at 2:43 PM, Curtis Jensen <cu...@th...> wrote: > Nice. Thanks. I had tried to do something similar, but kept getting > a curved line between each data point. > Also, I too got errors with a previous versions of matplotlib, but 0.98 works. > > If someone were willing to add Radar plots to the matplotlib > functionality, would this be wanted by the users or maintainers? Yes, certainly. You may want to take a look at the polar implementation (can you inherit from it?) to reuse as much as possible. Michael has also written a short guide to developers working with nonlinear projections http://matplotlib.sourceforge.net/doc/html/devel/add_new_projection.html JDH
On Wed, Jun 18, 2008 at 2:42 PM, David Warde-Farley <dw...@cs...> wrote: > One more related thing: is there any way to retrieve the size of a textbox > in figure coordinates, something like > ax.get_ymajorticklabels[0].get_width()? This is not very easy since the renderer is not known until the figure is drawn. After the window is drawn and the text instance knows its renderer, you can call t.get_window_extent(). So you would likely want to connect to the "on_draw" method and get the window extent there, and then do something with it, eg move the left of the canvas over. Here is a recursive, iterative solution that will gradually move the left of the subplot over until the label fits w/o going outside the figure border (requires 0.98):: import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) ax.plot(range(10)) ax.set_yticks((2,5,7)) labels = ax.set_yticklabels(('really, really, really', 'long', 'labels')) def on_draw(event): for label in labels: bbox = label.get_window_extent() if bbox.xmin<0: print 'adjusting left of subplot' fig.subplots_adjust(left=1.1*fig.subplotpars.left) fig.canvas.draw() break fig.canvas.mpl_connect('draw_event', on_draw) plt.show() > Also, I'm kind of wondering why things like set_text() on that doesn't work. > In general I haven't had much success with editing the properties of objects > like this. The tick labels are a bit special, since they are generated on the fly (eg if you are panning and zooming, new ticks must be created and sold ones destroyed). So you can't set their text directly, but rather need to create a tick locator and a tick formatter as described in Users Guide Chapter 6 - http://matplotlib.sourceforge.net/users_guide_0.98.0.pdf and the examples http://matplotlib.sourceforge.net/examples/pylab/custom_ticker1.py http://matplotlib.sourceforge.net/examples/pylab/major_minor_demo1.py JDH
On 2008年6月19日, Scott Sinclair apparently wrote: > canvas = FigureCanvas(fig) What is the relationship between a figure and a canvas? My impression is the following. You can do all your drawing on a figure. When you want to render the figure (e.g., to screen, or printing to file), and not until then, you need a canvas. A canvas will therefore always be associated with a particular backend. But when one creates a figure canvas, the canvas registers itself with the figure. What does the figure get out of this? (E.g., if we want the figure to draw itself to the canvas, the canvas could always pass itself to the figure. Right?) Thank you, Alan Isaac
Hi, On Thursday 19 June 2008 00:16:39 KURT PETERS wrote: > array = gd.ReadAsArray() > AttributeError: 'NoneType' object has no attribute 'ReadAsArray' > > Anyone know what the problem is? Do I need something else? Did you download the Denver DEM from USGS? From testgdal.py: # download from # http://edcftp.cr.usgs.gov/pub/data/DEM/250/D/denver-w.gz It should work after that... Cheers, Jose -- NERC Centre for Terrestrial Carbon Dynamics, Department of Geography, University College London Gower Street, London WC1E 6BT, UK
Hi, On Thursday 19 June 2008 00:16:39 KURT PETERS wrote: > array = gd.ReadAsArray() > AttributeError: 'NoneType' object has no attribute 'ReadAsArray' > > Anyone know what the problem is? Do I need something else? Did you download the Denver DEM from USGS? From testgdal.py: # download from # http://edcftp.cr.usgs.gov/pub/data/DEM/250/D/denver-w.gz It should work after that... Cheers, Jose -- NERC Centre for Terrestrial Carbon Dynamics, Department of Geography, University College London Gower Street, London WC1E 6BT, UK
>>> David Goldsmith <d_l...@ya...> 06/19/08 9:39 AM >>> Hi! I'm having trouble figuring out how to plot an array as an image with the OO interface - please help (e.g., w/ an example). Thanks, DG >>> >From the examples http://matplotlib.sourceforge.net/matplotlib_examples_0.98.0.zip ../examples/api/agg_oo.py -------------------------------------------- #!/usr/bin/env python """ A pure OO (look Ma, no pylab!) example using the agg backend """ from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figure fig = Figure() canvas = FigureCanvas(fig) ax = fig.add_subplot(111) ax.plot([1,2,3]) ax.set_title('hi mom') ax.grid(True) ax.set_xlabel('time') ax.set_ylabel('volts') canvas.print_figure('test') -------------------------------------------- You can replace the call to ax.plot() with a call to ax.imshow() or ax.pcolor() Hope that gets you going. Cheers, Scott Please find our Email Disclaimer here: http://www.ukzn.ac.za/disclaimer/
Hello, I want to adjust the x position of my ylabel, like subplot(111) ylabel('YLabel', x=-.25, y=.75) the 'y=.75' argument is applied but the 'x=-.2' argument has no affect. But why? Have you any idea to do this? Thank you, Friedrich
Hello, I am running matplotlib applications over VNC and during the initialization segment, I always see the above error. It doesn't seem to cause any problems, but I am curious what is causing it. Does anyone have an idea? This happens using the Qt4Agg backend at least. It seems to occur right when I first call ax.plot(...) Thanks, Glenn
rex wrote: > Andrew Straw <str...@as...> [2008年06月05日 09:42]: > >> For i386: >> >> http://debs.astraw.com/hardy/python-matplotlib_0.98.0-0ads2_i386.deb >> >> For amd64: >> >> http://debs.astraw.com/hardy/python-matplotlib_0.98.0-0ads2_amd64.deb >> >> For all arch: >> >> http://debs.astraw.com/hardy/python-matplotlib-data_0.98.0-0ads2_all.deb >> http://debs.astraw.com/hardy/python-matplotlib-doc_0.98.0-0ads2_all.deb >> > > I tried to install on Debian Lenny with Python 2.5 and it fails with: > > python-matplotlib depends on python-wxgtk2.8 > > wxgtk2.8 doesn't seem to be available for Python 2.5 and Lenny at: > > http://apt.wxwidgets.org/dists/ > > Any ideas, short of building from source? > That's probably your best bet at this point -- my repo is for Ubuntu Hardy. It looks like you can get the Debian experimental package of wxwidgets 2.8 at http://packages.debian.org/hu/source/experimental/wxwidgets2.8 . I have no idea why this isn't in unstable or testing yet -- a few minutes of googling didn't find anything. -Andrew
Hi! I'm having trouble figuring out how to plot an array as an image with the OO interface - please help (e.g., w/ an example). Thanks, DG