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
(7) |
2
(5) |
3
(18) |
4
(9) |
5
(13) |
6
(14) |
7
(8) |
8
(7) |
9
(6) |
10
(6) |
11
(24) |
12
(14) |
13
(9) |
14
(21) |
15
(6) |
16
(1) |
17
(20) |
18
(42) |
19
(16) |
20
(21) |
21
(41) |
22
(13) |
23
(11) |
24
(15) |
25
(32) |
26
(27) |
27
(29) |
28
(10) |
29
(3) |
30
(1) |
31
(5) |
|
|
|
|
|
Ryan May wrote: > Hi, > > I'm trying to get matplotlib to replot a pcolor image as data in a file > is updated. What's the proper way to do this? The best approach I > could come up with is as follows: Ok, I hadn't noticed the dynamic_image_gtkagg.py example before. I'm pretty sure this will do what I need. Anyone have any pitfalls or gotcha's with this method? Thanks, Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma
Hi, I'm trying to get matplotlib to replot a pcolor image as data in a file is updated. What's the proper way to do this? The best approach I could come up with is as follows: import threading, time import numpy as N import matplotlib.pyplot as P def update_plot(*args): ax = args[0] while True: data = N.random.rand(10,10) if ax.collections: del ax.collections[0] ax.pcolor(data) print 'drawing' P.draw() time.sleep(1) P.ion() f = P.figure() ax = f.add_subplot(1,1,1) ax.set_xlabel('X Axis') ax.set_ylabel('Y Axis') t = threading.Thread(name='Plot', target=update_plot, args=(ax,)) t.start() P.show() Can anyone point me in the right direction? Thanks, Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma
sa6113 wrote: > I need QImage in order to display or use in GUI , for exa. in QFrame or > QLabel , I can convert the Image to QImage , but the problem is that I > haven't access to Image object without saving that , also I can convert the > figure (Plot) to string or buffer but I don't know what should I do after > that and how convert it to Image. I'm going to try one more time -- I actually answered all this in my last note: 1) you may not need to do this yourself at all -- look at the embedding in QT examples -- they show you how to embed MPL plots in a regular old QT application. This may help: http://www.scipy.org/Cookbook/Matplotlib/Qt_with_IPython_and_Designer or this: http://www.krugle.org/examples/p-WiYT16ZpEKzLv4fa/embedding_in_qt.py (that should be in the MPL distro too) 2) If you really do need to convert the binary image data from MPL into a QImage, then you may be able to figure out how by looking at the QT backend code. If that doesn't work, then this is a question for the PyQT docs or mailing list. -CHB -- 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...
Hi guys, I've been wanting to do something similar as well. Create a figure from other figures. The function accepts a list of figures, and according to the ratio (rows to columns) creates a bigger figure of appropriate size and 'copies' the axes into the new figure. I calculate the positions and size of the subplots in the new figure proportionately (ie. a value between 0 and 1), and then do a ax.set_position. This seems to be broken somehow, the axes still think the size of the figure they're in is the original figure's size. Even though I already moved them over to the new larger figure. I've tried to hack this by simply passing in values bigger then 1, but I can't get it to work. If I don't make the new figure bigger everything works, though the labels get a bit cramped then. If someone can have a look and give me some advise it would be very appreciated. Regards, Christiaan _________________________ import math from matplotlib.figure import * def multisubplot(figures=[], ratio=1.0, wspace=0.0, hspace=0.0): fig = Figure() n = len(figures) if n < 1: fig.add_subplot(111) return fig # calculate number of rows and columns columns = int(math.ceil(sqrt(float(n)/(ratio)))) rows = int(math.ceil(float(n)/float(columns))) # resize the new figure w_inches = figures[0].get_size_inches()[0]*(columns) h_inches = figures[0].get_size_inches()[1]*(rows) fig.set_size_inches(w_inches, h_inches, forward=True) print fig.get_size_inches() # calculate the spacing wspace = wspace / (float(columns)) hspace = hspace / (float(rows)) # calculate the l,b,w,h of all subplots width = 1/float(columns) - wspace height = 1/float(rows) - hspace positions = [] for i in range(rows): for j in range(columns): positions.append([(j)*(width + wspace) + wspace/2, \ (rows-i-1)*(height + hspace) + hspace/2 , \ width, height]) # hack broken axes scaling for pos in positions: print '' #pos[0] = pos[0] * (columns) #pos[1] = pos[1] * (rows) #pos[2] = pos[2] * (columns) #pos[3] = pos[3] * (rows) print n print 'columns', columns, 'rows', rows print 'wspace', wspace, 'hspace', hspace print 'width', width, 'height', height for pos in positions: print pos for i in range(rows): for j in range(columns): x = i*(columns) + j if x < n: for ax in figures[x].axes: figures[x].delaxes(ax) ax.set_figure(fig) fig.add_axes(ax) ax.set_position(positions[x]) return fig #create some figures to pass to our function pl = [] for i in range(13): fig = Figure() ax = fig.add_subplot(111) ax.plot([1,math.sin(i),2]) pl.append(fig) figsub = multisubplot(pl,ratio=1, wspace=0.1, hspace=0.1) _______________________________-- On 18/02/2008, Robin <ro...@gm...> wrote: > > Thanks very much for all your help. > > > On Feb 18, 2008 3:44 PM, John Hunter <jd...@gm...> wrote: > > It's not that it isn't supported, it's just rarely used and so may > > have slowly broken over time. It is useful, so It would be worthwhile > > for us to fix it. Are you using 0.91.2 or svn? > > > I am using 0.91.2 at the moment (on Mac OS X - I think this was the > downloaded binary). I could build from svn if you think it would make > a difference. > > I guess for now I will use the function argument method, but I'm happy > to keep this code around and provide what feedback I can. > > I suspect that if the subplot geometry was set to autoupdate when the > window is resized as it is for a fresh subplot, then the overlapping > axes might go away after a window resize. The missing xticks is a bit > of a mystery though - they all seems to be there, just not shown. I > tried setting them visible and redrawing but no luck. > > Thanks again, > > > Robin > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
First, I apologize for the long script. It's if anyone wants to see the issue first hand. The problem is that when I use twinx() to plot two different functions on the same axes, the legend from the first part is overwritten by the grid lines of the second part (after the twinx() statement). As you can see in the Plot function, I tried to use the zorder to have the first legend drawn at the end but that doesn't work. I can see two possibilities - 1) I still don't know how to use zorder, or ... 2) the twinx() statement somehow causes the zorder process to get reset so that the first legend always gets drawn before the second function is plotted. Thanks for any help, Wayne
Le mercredi 05 mars 2008 à 15:19 +0100, Lorenzo Isella a écrit : > p.hold(False) [...] > p.plot(x,y,"ko") > p.axvline(30.) > > My problem is that the second figure shows only the vertical line. If > I remove all the lines for the first plot (i.e. the one without > axvline), then the remaining plot is perfectly ok. > (1) Has anyone experienced the same problem/bug in matplotlib? > (2) Any idea of a possible fix? Since you turn hold to False, every new line that is added to axes (with plot() or axvline()) deletes the existing lines. Removing p.hold(False) may result in what you want. -- Fabrice Silva <si...@lm...> LMA UPR CNRS 7051
Thanks, the -n flag to idle did the trick. -----Original Message----- From: Darren Dale [mailto:dar...@co...] Sent: Wednesday, March 05, 2008 7:13 AM To: mat...@li... Cc: David Fox Subject: Re: [Matplotlib-users] newbie question about interactive plotting On Tuesday 04 March 2008 10:44:13 pm David Fox wrote: > I'm trying to use the pylab interface of matplotlib interactively. I'd > like to enter some commands interactively to generate some data, plot a > graph based on the data, inspect the graph, enter more interactive > python, plot another graph, and so on. Instead, what happens is either > > (a) If I start with matplotlib set to interactive, control returns to > the Idle shell after the graph appears, but my graph window isn't > interactive (and most importantly, the window doesn't even refresh > properly, so if it is initially covered by the Idle window or another > window, that part of the graph isn't visible even when I put the graph > window in the foreground, or Are you starting idle with the -n flag? It is required for interactive plotting with idle. Please see the users guide, which explains how to get up and running in interactive mode quickly. > (b) if I don't start with matplotlib in interactive mode, then to see > the graph I need to type show(). Then the graph is interactive and > refreshing works right, but the cursor doesn't return to the Idle shell, > unless I kill the graph window. At that point, any subsequent calls to > show() behave as in case (a). > > My questions are: > > 1. Is this the expected behavior? [given the details on my setup and > procedure below] > 2. Is there a way to get the type of interactivity I described in the > first paragraph of my email, other than using ipython (which I don't > particularly like because of the DOS window display, and the lack of > command completion and function argument hints which I depend on when > using GUI python shells like pythonwin or PyCrust)? ipython can give you command completion and function hints.
Dear All, I am running Debian testing on my box and I installed matplotlib from the standard repositories. >From time to time I experience a problem when plotting several figures. Consider the following code snippet: #! /usr/bin/env python import scipy as s import numpy as n import pylab as p x=s.linspace(1.,100.,20) y=s.linspace(40.,56.,20) p.plot(x,y,"ko") #p.axvline(30.) p.xlabel('time') p.ylabel('coordination number') #p.legend(('beta=1e-2,100 part','beta=1e-1, 100 part', 'beta=1e-1, 200 part')) p.title('Evolution coordination number in single cluster size') p.grid(True) p.savefig('test_no_av_line.pdf') p.hold(False) p.clf() p.plot(x,y,"ko") p.axvline(30.) p.xlabel('time') p.ylabel('coordination number') #p.legend(('beta=1e-2,100 part','beta=1e-1, 100 part', 'beta=1e-1, 200 part')) p.title('Evolution coordination number in single cluster size') p.grid(True) p.savefig('test_av_line.pdf') p.hold(False) p.clf() My problem is that the second figure shows only the vertical line. If I remove all the lines for the first plot (i.e. the one without axvline), then the remaining plot is perfectly ok. (1) Has anyone experienced the same problem/bug in matplotlib? (2) Any idea of a possible fix? Many thanks Lorenzo
On Tuesday 04 March 2008 10:44:13 pm David Fox wrote: > I'm trying to use the pylab interface of matplotlib interactively. I'd > like to enter some commands interactively to generate some data, plot a > graph based on the data, inspect the graph, enter more interactive > python, plot another graph, and so on. Instead, what happens is either > > (a) If I start with matplotlib set to interactive, control returns to > the Idle shell after the graph appears, but my graph window isn't > interactive (and most importantly, the window doesn't even refresh > properly, so if it is initially covered by the Idle window or another > window, that part of the graph isn't visible even when I put the graph > window in the foreground, or Are you starting idle with the -n flag? It is required for interactive plotting with idle. Please see the users guide, which explains how to get up and running in interactive mode quickly. > (b) if I don't start with matplotlib in interactive mode, then to see > the graph I need to type show(). Then the graph is interactive and > refreshing works right, but the cursor doesn't return to the Idle shell, > unless I kill the graph window. At that point, any subsequent calls to > show() behave as in case (a). > > My questions are: > > 1. Is this the expected behavior? [given the details on my setup and > procedure below] > 2. Is there a way to get the type of interactivity I described in the > first paragraph of my email, other than using ipython (which I don't > particularly like because of the DOS window display, and the lack of > command completion and function argument hints which I depend on when > using GUI python shells like pythonwin or PyCrust)? ipython can give you command completion and function hints.
hi,list I run the example "embedding_in_gtk2.py" which download from matplotlib website. After I save the figure using the toolbar button,if I click another toolbar button,like 'zoom', but nothing happen.The figure is not changed. One time I change the window size after save figure,then it work fine.what's the matter?why? it work fine when i run 'embedding_in_wx*.py', I can operate after i save figure using tooblar My matplotlib version is 0.90.1 and os is XP(this also happen on linux os) thanks for your help. 2008年03月05日 ZhangRuirui
Hello,David Just a hint.I use ipython and meet the similiar problem as you when I configure the ipython configuration file to use pylab or import pylab from the ipython command line. The problem can be solve for me if I start ipython with the pylab ,that is I use the following command to start ipython with pylab enabled. ipython -pylab -- 在2008年03月05日,"David Fox" <Dav...@nu...> 写道: I'm trying to use the pylab interface of matplotlib interactively. I'd like to enter some commands interactively to generate some data, plot a graph based on the data, inspect the graph, enter more interactive python, plot another graph, and so on. Instead, what happens is either (a) If I start with matplotlib set to interactive, control returns to the Idle shell after the graph appears, but my graph window isn't interactive (and most importantly, the window doesn't even refresh properly, so if it is initially covered by the Idle window or another window, that part of the graph isn't visible even when I put the graph window in the foreground, or (b) if I don't start with matplotlib in interactive mode, then to see the graph I need to type show(). Then the graph is interactive and refreshing works right, but the cursor doesn't return to the Idle shell, unless I kill the graph window. At that point, any subsequent calls to show() behave as in case (a). My questions are: 1. Is this the expected behavior? [given the details on my setup and procedure below] 2. Is there a way to get the type of interactivity I described in the first paragraph of my email, other than using ipython (which I don't particularly like because of the DOS window display, and the lack of command completion and function argument hints which I depend on when using GUI python shells like pythonwin or PyCrust)? 3. Is this a fundamental issue with trying to plot using an interactive shell whose main message loop doesn't know anything about the graph window? I suspect the answers are yes, no (except ipython), and yes, but if so, I'd like to have confirmation of that so I don't keep trying to bang my head against a wall trying to figure out what I'm doing wrong. Here are the details on what versions I'm running and what I'm trying: I'm using matplotlib version 0.91.2 with Python 2.4.4 on Windows XP. Following the instructions at http://matplotlib.sourceforge.net/interactive.html, I've set my TkAgg as my default backend and set interactive to True in my matplotlibrc file. I generally like do my interactive python in a shell with autocompletion. On Windows, I generally prefer PythonWin, but am open to exploring others if PythonWin is not going to be compatible with the matplotlib backend. For now, I'm testing with the (Tkinter-based) Idle to avoid possible conflicts between the PythonWin mainloop. I fire up Idle and following the example, type from pylab import * plot([1,2,3]) A new window pops up and displays my graph. However, the toolbar in the window does not respond, and any portion of the window which was covered by my Idle window doesn't get refreshed when I switch to the window. This is not terribly useful. Alternatively, if I don't set interactive in matplotlibrc, I do the same steps and an empty window pops up. If I then type show() the graph appears in that window, and refreshing and the toolbar work fine. I can manipulate the window and its contents with the toolbar. However, the cursor does not return to the Idle window, so I can't plot another graph. The only way I've been able to get the cursor to return to the Idle window is to close the graph window (via the Windows close button). When I do that, I can once again issue python commands interactively, and the behavior again matches the interactive mode (so refresh doesn't work right). ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users
I need QImage in order to display or use in GUI , for exa. in QFrame or QLabel , I can convert the Image to QImage , but the problem is that I haven't access to Image object without saving that , also I can convert the figure (Plot) to string or buffer but I don't know what should I do after that and how convert it to Image. What about numpy or Numerical Python , may I use fromstring or another function ? Or what about savining the string binary or buffer in StringIO and then convert to QImage ? Christopher Barker wrote: > > sa6113 wrote: >> Would you please help me ? >> I want to load data to Image (QImage) from String or binary String >> without >> using PIL module . > > you can load data straight into a numpy array with numpy.fromstring() -- > if it's in an easy format (RGB, RGBA), then you should be able to go > from there. > > What do you want to do with the image data? > > -CHB > > > -- > 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... > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- View this message in context: http://www.nabble.com/how-load-data-to-Image-from-String--tp15784115p15843273.html Sent from the matplotlib - users mailing list archive at Nabble.com.
I'm trying to use the pylab interface of matplotlib interactively. I'd like to enter some commands interactively to generate some data, plot a graph based on the data, inspect the graph, enter more interactive python, plot another graph, and so on. Instead, what happens is either (a) If I start with matplotlib set to interactive, control returns to the Idle shell after the graph appears, but my graph window isn't interactive (and most importantly, the window doesn't even refresh properly, so if it is initially covered by the Idle window or another window, that part of the graph isn't visible even when I put the graph window in the foreground, or (b) if I don't start with matplotlib in interactive mode, then to see the graph I need to type show(). Then the graph is interactive and refreshing works right, but the cursor doesn't return to the Idle shell, unless I kill the graph window. At that point, any subsequent calls to show() behave as in case (a). My questions are: 1. Is this the expected behavior? [given the details on my setup and procedure below] 2. Is there a way to get the type of interactivity I described in the first paragraph of my email, other than using ipython (which I don't particularly like because of the DOS window display, and the lack of command completion and function argument hints which I depend on when using GUI python shells like pythonwin or PyCrust)? 3. Is this a fundamental issue with trying to plot using an interactive shell whose main message loop doesn't know anything about the graph window? I suspect the answers are yes, no (except ipython), and yes, but if so, I'd like to have confirmation of that so I don't keep trying to bang my head against a wall trying to figure out what I'm doing wrong. Here are the details on what versions I'm running and what I'm trying: I'm using matplotlib version 0.91.2 with Python 2.4.4 on Windows XP. Following the instructions at http://matplotlib.sourceforge.net/interactive.html, I've set my TkAgg as my default backend and set interactive to True in my matplotlibrc file. I generally like do my interactive python in a shell with autocompletion. On Windows, I generally prefer PythonWin, but am open to exploring others if PythonWin is not going to be compatible with the matplotlib backend. For now, I'm testing with the (Tkinter-based) Idle to avoid possible conflicts between the PythonWin mainloop. I fire up Idle and following the example, type from pylab import * plot([1,2,3]) A new window pops up and displays my graph. However, the toolbar in the window does not respond, and any portion of the window which was covered by my Idle window doesn't get refreshed when I switch to the window. This is not terribly useful. Alternatively, if I don't set interactive in matplotlibrc, I do the same steps and an empty window pops up. If I then type show() the graph appears in that window, and refreshing and the toolbar work fine. I can manipulate the window and its contents with the toolbar. However, the cursor does not return to the Idle window, so I can't plot another graph. The only way I've been able to get the cursor to return to the Idle window is to close the graph window (via the Windows close button). When I do that, I can once again issue python commands interactively, and the behavior again matches the interactive mode (so refresh doesn't work right).