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-12 15:02:24
|
On Mon, Jul 12, 2010 at 9:35 AM, Ademir Francisco da Silva <Ade...@in...> wrote: > Hello John ..., > > I was thinking about our speech by email yesterday and I am not sure that > the problem is in that unofficial compilation I am really surmising about > those several changes in Python 2.7, anyway is worthy to verify > compatibility about matplotlib code( specifically widgets' module, please ) > and the new version of the Python program. > > You have asked me about to paste a output from my script of my systems when > I pass it in the verbose but in this case there no one, what really happend > is that my code( according my last email ) did not show widgets.Cursor > anymore and the widgets.Button have appeared but it is completely > inactivated, I mean it do not do nothing, whether my code is the same what > is this estrange behavior ??? > > I know, I know ..., I will wait for the official matplotlib's version for > win64_Py2.7, but ... This is not what we recommend. Christoph builds the official win32 binaries for matplotlib and as he said, it is likely that whatever problems you see now you would see in the official builds. That is why we want to fix the problem now and not later. And it is why we have both asked you to post a complete example that we can run that replicates your problem. And I have asked you to run the code with --verbose-helpful and post the entire output. You have *described* what did or would happen but this is not the same as providing us with the information we requested. There is a lot of output emitted by verbose-helpful that will aid us in debugging your problem. In case I am not being clear: * write a script that factors out stuff specific you your system that we can run that exposes the problem. As often as not the bug is in your code, not matplotlib, and we can't debug your code w/o seeing it. Nor do we want to wade through 5000 lines of code that is specific to your problem which we can't run. In the process of simplifying your example to something that exposes the problem which we can run, you will often find the problem yourself. A well-written help query to the mailing list often solves the problem you are trying to address. "It doesn't work and here is a snippet of my code" rarely does. * run the script as in 'python myscript.py --verbose-helpful' * paste the output into the email in which you've attached the code. Sorry to be blunt but this is the 4th email you have gotten from a developer trying to help you and we have made no progress. Finally, please respond to the existing threads rather than starting new ones on the same subject as it makes it easier for developers who are following the thread to do so, and it makes it possible for archival services such as nabble to properly thread the conversation. JDH |
|
From: Preben R. <ra...@pv...> - 2010-07-12 10:21:35
|
On Sun, 11 Jul 2010 13:39:05 -1000 Eric Firing <ef...@ha...> wrote: > On 07/11/2010 07:52 AM, Preben Randhol wrote: > > >> > >> Also, are you using backend_gtk or backend_gtkagg (and does it > >> matter for your problem?) > > > > I use GTKAgg and it works. GTK doesn't. > > > > backend_gtk has limitations that backend_gtkagg does not, although I > don't know that your zooming problem should be one of them. Are you > sure you *need* to use backend_gtk instead of backend_gtkagg? But I am using gtkagg. I only tested backend_gtk because I was asked to. gtkagg still has problem with zooming/panning Preben |
|
From: Pellegrini E. <eri...@ya...> - 2010-07-12 05:56:06
|
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
|
|
From: Jeremy C. <jlc...@gm...> - 2010-07-12 02:08:29
|
On Friday, July 9, 2010, Benjamin Root <ben...@ou...> wrote: > Jeremy, > > I believe that 0.99.1 is fairly old. I don't know when Axes3D came along, but I am sure you can find it in 0.99.3. It is most definitely in 1.0, but you might not need to go that far if your distro does not provide it. Wince my first post, I have upgraded to 1.0 which definitely has Axes3D. The trouble is that the plot_surface function does not deal with masked arrays like color does. That is what I need and I haven't found a way around it. Jeremy |
|
From: Eric F. <ef...@ha...> - 2010-07-11 23:39:13
|
On 07/11/2010 07:52 AM, Preben Randhol wrote: >> >> Also, are you using backend_gtk or backend_gtkagg (and does it matter >> for your problem?) > > I use GTKAgg and it works. GTK doesn't. > backend_gtk has limitations that backend_gtkagg does not, although I don't know that your zooming problem should be one of them. Are you sure you *need* to use backend_gtk instead of backend_gtkagg? Eric |
|
From: Christoph G. <cg...@uc...> - 2010-07-11 19:40:05
|
Again, please post a complete free-standing example that replicates the problem, otherwise we can not help you. The binaries you are using are as close to any later official binaries as possible at this point and they pass all the example tests for the agg, cairo, and pdf backends. Christoph On 7/11/2010 12:12 PM, Ademir Francisco da Silva wrote: > Em 11/07/2010 13:56, John Hunter escreveu: >> On Sun, Jul 11, 2010 at 11:15 AM, Ademir Francisco da Silva >>> Case closed. Finally I find it..., but for my success I have taken off the >>> # of the #interactive : False on the line #37 from this file >>> matplotlib\\mpl-data\\matplotlibrc and everything works fine now. >> I don't think this flag will affect whether or nor widgets is >> imported. Are you sure you haven't made some other changes? >> >>> But I have another important question for all of you..., recently I have >>> changed my Python's version from 2.6.5 to 2.7 and since I did it my >>> widgets.Cursor and widgets.Button do not work, so anyone have a idea about >>> this behavior to tell me, please ??? >>> >>> Further information ... >>> My code is the same and before it works fine but now it just not works ..., >>> just take a look in the excerpt of my code below ... >>> >>> widgets.Cursor( axe, useblit = True, color = self.cor[ 477 ][ 1 ], lw = 2 ) >>> widgets.Button( pyplot.axes( [ .91, .1, .08, .06 ] ), self.textName[ 19 ], >>> color = self.cor[ 403 ][ 1 ], hovercolor = self.cor[ >>> 46 ][ 1 ] ).\ >>> on_clicked( self.button_12Click ) >>> >>> How may I fix it, please ??? >> Did you compile matplotlib for python2.7 yourself -- we haven't >> released any binaries yet for that version. Can you paste a complete >> free-standing example that replicates the problem as wee as the output >> of your script on your system when you pass in the --verbose-helpful >> flag? >> >> JDH >> >> > Hi John ..., > > I am just take that binarie from this internet address > http://www.lfd.uci.edu/~gohlke/pythonlibs/ > Hmmmm..., so I was wondering that the problem is it and I will have to > wait for the official version of the matplotlib binaries for the Python > 2.7( win64 ). Sucks...! > I hope to have that binaries asap and after the installation of it I > will verify if that problem continues. > > anyway I really enjoyed your prompt aid ..., Thanks. > > > Cheers, > > > -- > Ademir Francisco da Silva > > > > ------------------------------------------------------------------------------ > 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: Ademir F. da S. <Ade...@it...> - 2010-07-11 19:12:34
|
Em 11/07/2010 13:56, John Hunter escreveu: > On Sun, Jul 11, 2010 at 11:15 AM, Ademir Francisco da Silva >> Case closed. Finally I find it..., but for my success I have taken off the >> # of the #interactive : False on the line #37 from this file >> matplotlib\\mpl-data\\matplotlibrc and everything works fine now. > I don't think this flag will affect whether or nor widgets is > imported. Are you sure you haven't made some other changes? > >> But I have another important question for all of you..., recently I have >> changed my Python's version from 2.6.5 to 2.7 and since I did it my >> widgets.Cursor and widgets.Button do not work, so anyone have a idea about >> this behavior to tell me, please ??? >> >> Further information ... >> My code is the same and before it works fine but now it just not works ..., >> just take a look in the excerpt of my code below ... >> >> widgets.Cursor( axe, useblit = True, color = self.cor[ 477 ][ 1 ], lw = 2 ) >> widgets.Button( pyplot.axes( [ .91, .1, .08, .06 ] ), self.textName[ 19 ], >> color = self.cor[ 403 ][ 1 ], hovercolor = self.cor[ >> 46 ][ 1 ] ).\ >> on_clicked( self.button_12Click ) >> >> How may I fix it, please ??? > Did you compile matplotlib for python2.7 yourself -- we haven't > released any binaries yet for that version. Can you paste a complete > free-standing example that replicates the problem as wee as the output > of your script on your system when you pass in the --verbose-helpful > flag? > > JDH > > Hi John ..., I am just take that binarie from this internet address http://www.lfd.uci.edu/~gohlke/pythonlibs/ Hmmmm..., so I was wondering that the problem is it and I will have to wait for the official version of the matplotlib binaries for the Python 2.7( win64 ). Sucks...! I hope to have that binaries asap and after the installation of it I will verify if that problem continues. anyway I really enjoyed your prompt aid ..., Thanks. Cheers, -- Ademir Francisco da Silva |
|
From: Preben R. <ra...@pv...> - 2010-07-11 17:51:37
|
On Fri, 9 Jul 2010 19:37:56 -0500 John Hunter <jd...@gm...> wrote: > On Fri, Jul 9, 2010 at 3:10 PM, Preben Randhol <ra...@pv...> > wrote: > > > I'm trying to plot several subplots. I have setup a scrollwidget and > > viewport and I pack a canvas into a vbox in the viewport. > > > > Problem is that when I scroll, either some of the subplots are > > missing, or I get an error when I try to zoom on a graph that > > argument is not a gdk.gtk.image (or something like that) but None. > > > > I thought this was fixed in 1.0, but it isn't > > > > Please advice! > > Does this example work for you? > > http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_gtk3.html Yes it works and a bit cleanup of my imports helped in my program too. However if I add NavigateToolbar to the example above I get problems. mtoolbar = NavigationToolbar(canvas, win) then I get error when I try to zoom in a graph: /usr/lib/pymodules/python2.6/matplotlib/backends/backend_gtk.py:621: DeprecationWarning: Use the new widget gtk.Tooltip self.tooltips = gtk.Tooltips() /usr/lib/pymodules/python2.6/matplotlib/backends/backend_gtk.py:601: GtkWarning: gdk_drawable_copy_to_image: assertion `src_y >= 0' failed self._imageBack = axrect, drawable.get_image(*axrect) Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_gtk.py", line 606, in idle_draw drawable.draw_image(gc, imageBack, 0, 0, *lastrect) TypeError: Gdk.Drawable.draw_image() argument 2 must be gtk.gdk.Image, not None The graph zooms, but I don't see the rubberband. I got same error in 1.0: TypeError: Gdk.Drawable.draw_image() argument 2 must be gtk.gdk.Image, not None > It uses a ScrolledWindow. > > Also, are you using backend_gtk or backend_gtkagg (and does it matter > for your problem?) I use GTKAgg and it works. GTK doesn't. > > If you could create a minimal example starting with > embedding_in_gtk3.py that replicates your problem, we're more likely > to be able to help. I have added the example above with my changes. Zooming is the problem. |
|
From: John H. <jd...@gm...> - 2010-07-11 16:56:50
|
On Sun, Jul 11, 2010 at 11:15 AM, Ademir Francisco da Silva > Case closed. Finally I find it..., but for my success I have taken off the > # of the #interactive : False on the line #37 from this file > matplotlib\\mpl-data\\matplotlibrc and everything works fine now. I don't think this flag will affect whether or nor widgets is imported. Are you sure you haven't made some other changes? > But I have another important question for all of you..., recently I have > changed my Python's version from 2.6.5 to 2.7 and since I did it my > widgets.Cursor and widgets.Button do not work, so anyone have a idea about > this behavior to tell me, please ??? > > Further information ... > My code is the same and before it works fine but now it just not works ..., > just take a look in the excerpt of my code below ... > > widgets.Cursor( axe, useblit = True, color = self.cor[ 477 ][ 1 ], lw = 2 ) > widgets.Button( pyplot.axes( [ .91, .1, .08, .06 ] ), self.textName[ 19 ], > color = self.cor[ 403 ][ 1 ], hovercolor = self.cor[ > 46 ][ 1 ] ).\ > on_clicked( self.button_12Click ) > > How may I fix it, please ??? Did you compile matplotlib for python2.7 yourself -- we haven't released any binaries yet for that version. Can you paste a complete free-standing example that replicates the problem as wee as the output of your script on your system when you pass in the --verbose-helpful flag? JDH |
|
From: Ademir F. da S. <Ade...@it...> - 2010-07-11 16:15:34
|
Em 11/07/2010 12:22, Ademir Francisco da Silva escreveu:
> Hi all ...,
>
> Anyone may tell me what happend with the /widgets/ in the matplotlib???
>
> Before it is here ..., from matplotlib import widgets
>
> but now it is vanished ..., or where it is ???
>
> Further informations ...
> my matplotlib version is 1.0.0 - $Revision: 8503 $
> my numpy version is 1.5.0.dev8469
> my OS is Windows Vista 64
>
> Thank you very much for any help.
>
> Cheers,
>
>
> --
> Ademir Francisco da Silva
Hello again ...,
Case closed. Finally I find it..., but for my success I have taken off
the # of the #interactive : False on the line #37 from this file
matplotlib\\mpl-data\\matplotlibrc and everything works fine now.
But I have another important question for all of you..., recently I have
changed my Python's version from 2.6.5 to 2.7 and since I did it my
widgets.Cursor and widgets.Button do not work, so anyone have a idea
about this behavior to tell me, please ???
Further information ...
My code is the same and before it works fine but now it just not works
..., just take a look in the excerpt of my code below ...
widgets.Cursor( axe, useblit = True, color = self.cor[ 477 ][ 1 ], lw = 2 )
widgets.Button( pyplot.axes( [ .91, .1, .08, .06 ] ), self.textName[ 19 ],
color = self.cor[ 403 ][ 1 ], hovercolor =
self.cor[ 46 ][ 1 ] ).\
on_clicked( self.button_12Click )
How may I fix it, please ???
Cheers,
--
Ademir Francisco da Silva
|
|
From: Ademir F. da S. <Ade...@it...> - 2010-07-11 15:22:28
|
Hi all ..., Anyone may tell me what happend with the /widgets/ in the matplotlib??? Before it is here ..., from matplotlib import widgets but now it is vanished ..., or where it is ??? Further informations ... my matplotlib version is 1.0.0 - $Revision: 8503 $ my numpy version is 1.5.0.dev8469 my OS is Windows Vista 64 Thank you very much for any help. Cheers, -- Ademir Francisco da Silva |
|
From: bdb112 <boy...@an...> - 2010-07-11 01:04:43
|
>>Any chance you can test this with the latest release 1.0.0?
>>JDH
Tried 1.0.0 but first I should explain what I want more clearly in case I am
missing something.
I want to run a long calculation and have some early results plotted (and
become visible) without needing to close the window as the show() command
now requires. I am happy to run in ipython -pylab to achieve this, and
recognise that the plots might/will be delayed if I use ipython (no pylab)
or straight python.
I also would like the control to suppress the interactive rendering for some
plots, such as those that overlay many curves. When all the curves have
been added to the object (typically by plot()), then I would like them
rendered - this is faster than re-rendering every time a curve is added.
I was able to achieve this with ion(), isinteractive(), and show() in
previous versions.
How should I do it now (especially as show() is now(1.0.0) supposed to
block?
====== Back to your suggestion =======
OK, after aptitude install python-dev tk8.5-dev tcl8.5-dev python-gtk2-dev
1.0.0 can be built
It passes the simple test in the initial post, (good), but is still delayed
in real code - i.e. in script or compiled code.
In the interests of simplicity, I had reduced my test case to the absolute
simplest, equivalent to typing at the command prompt.
Below are two better examples: the first is still very brief, but better
represents real code, and works on ubuntu9.04 and Enthought for w7.
Following is a longer example which is also simplified. I left a few extra
lines commented out to show you what I have tried.
After the code snippets is a list of what versions do and do not work
interactively (as described above).
=======short_test.py==
# graph should appear immediately, the update after 3 secs, prompt at 6 secs
import pylab as pl
import time
def test():
pl.plot([1,2])
pl.show()
time.sleep(3)
print(pl.isinteractive())
pl.ion()
pl.plot([3,4])
pl.show()
time.sleep(3)
test()
==========interactive_plot_test.py===========
""" Test the ability of plots to be interactive - in the sense that
they display as they go, rather than waiting til the command prompt is
reached.
These might well be on different figures, or subplots but I kept it simple.
"""
import pylab as pl
import time
def int_plot():
print('plot intermediate result')
# pl.figure()
pl.plot([2,1])
pl.title('intermediate result')
# pl.draw_if_interactive()
# pl.show() #?? (mainloop=False)
time.sleep(3)
print('When run, the plot should appear immediately, '
' then the prompt after sleep(2)')
print('test on "scripted" code - ipython may treat differently')
pl.ion()
pl.plot([3,4], hold=0)
#pl.show()
time.sleep(3)
print('same test on compiled code')
int_plot()
=========================
List of what works (and not):
works under ubuntu 9.04 dist (tested under w32 VMPlayer)
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
IPython 0.9.1 matplotlib '0.98.5.2' tkagg backend
works under Win7 Enthought
Python 2.6.4 |EPD 6.1-1 (32-bit)| (r264:75706, Nov 11 2009, 19:42:36) [MSC
v.150
0 32 bit (Intel)]
IPython 0.10 matplotlib: '0.99.1.1' backend_wx.py
*not* under ubuntu 10.04/2.6.5/0.10 with matplotlib 1.0.0 compiled as above
WXAgg: nothing appears until 6 sec, prompt is blocked
TkAgg: nothing appears until 6 sec, prompt is not blocked
GTKAgg: nothing appears until 6 sec, prompt is not blocked
John Hunter-4 wrote:
>
> On Fri, Jul 9, 2010 at 9:52 PM, bdb112 <boy...@an...> wrote:
>
>> print('When pasted in to ipython -pylab, the plot should appear
>> immediately,
>> '
>> ' then the ipython prompt after sleep(2): but the plot waits until
>> the
>> prompt!')
>> plot([3,4], hold=0)
>> ion()
>> show()
>> time.sleep(2)
>>
>> Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
>> IPython 0.10
>> matplotlib.__version__ Out[3]: '0.99.1.1
>
>
> ------------------------------------------------------------------------------
> 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
>
>
--
View this message in context: http://old.nabble.com/interactive-plots-in-ipython--pylab-are-delayed-until-ipython-prompt-tp29123816p29129079.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Jouni K. S. <jk...@ik...> - 2010-07-10 15:43:00
|
Janne Blomqvist <blo...@gm...> writes: > The problem I'm having is that as the figure is then pretty small, I > can scale font sizes, axis sizes, line widths etc., but what I've been > unable to figure out is how to scale dashed or dotted lines, as well > as the thickness of the legend border box. It seems that there are no rc settings for these, but you can adjust them as follows: > a.plot(x, y, '--', label='foo bar') Change this to a.plot(x, y, '--', label='foo bar', dashes=(2,2)) The value of dashes is the number of points of ink followed by the number of points of whitespace. It defaults to (6,6) for the '--' linestyle (found in the dashd dictionary of backend_bases.py). > a.legend() Change this to lg = a.legend() fr = lg.get_frame() fr.set_lw(0.2) -- Jouni K. Seppänen http://www.iki.fi/jks |
|
From: David M. <dm...@ya...> - 2010-07-10 13:15:14
|
I am getting a recursive error with the following script. When using plot
instead of semilogy, I get the desired result. Does anyone know of a
workaround?
from pylab import *
class Hover(object):
def __call__(self, ev):
print ev.canvas.figure.hitlist(ev)
fig = plt.figure()
ax=fig.add_subplot(111)
ax.semilogy([1,5,10])
hover = Hover()
fig.canvas.mpl_connect('motion_notify_event',hover)
show()
|
|
From: John H. <jd...@gm...> - 2010-07-10 02:58:41
|
On Fri, Jul 9, 2010 at 9:52 PM, bdb112 <boy...@an...> wrote:
> python or ipython. See version numbers at end.
>
>
>
> import time
> # Note - this version is meant to be pasted!
>
> print('When pasted in to ipython -pylab, the plot should appear immediately,
> '
> ' then the ipython prompt after sleep(2): but the plot waits until the
> prompt!')
> plot([3,4], hold=0)
> ion()
> show()
> time.sleep(2)
>
> Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
> IPython 0.10
> matplotlib.__version__ Out[3]: '0.99.1.1
Any chance you can test this with the latest release 1.0.0?
JDH
|
|
From: bdb112 <boy...@an...> - 2010-07-10 02:52:11
|
I have successfully used ipython -pylab under w32 python, but under the
builtin ipython under ubuntu 9 and 10, the graphics display thread seems to
block until the ipython command line - as if the threading (internal to
ipython etc) is not happening.
For example if the following is pasted in, the plot appears after 2 seconds,
instead of straight away, as it used to in w32 python 2.6, (and I think, but
am not sure, in earlier linux pythons). The reason I want this feature is
to show intermediate
results of long computations, without blocking, as would happen in straight
python or ipython. See version numbers at end.
import time
# Note - this version is meant to be pasted!
print('When pasted in to ipython -pylab, the plot should appear immediately,
'
' then the ipython prompt after sleep(2): but the plot waits until the
prompt!')
plot([3,4], hold=0)
ion()
show()
time.sleep(2)
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
IPython 0.10
matplotlib.__version__ Out[3]: '0.99.1.1'
--
View this message in context: http://old.nabble.com/interactive-plots-in-ipython--pylab-are-delayed-until-ipython-prompt-tp29123816p29123816.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Benjamin R. <ben...@ou...> - 2010-07-10 01:05:46
|
Jeremy, I believe that 0.99.1 is fairly old. I don't know when Axes3D came along, but I am sure you can find it in 0.99.3. It is most definitely in 1.0, but you might not need to go that far if your distro does not provide it. Ben Root On Fri, Jul 9, 2010 at 4:50 PM, Jeremy Conlin <jlc...@gm...> wrote: > On Thu, Jul 8, 2010 at 8:41 AM, Jeremy Conlin <jlc...@gm...> wrote: > > On Sun, Jul 4, 2010 at 8:38 PM, Benjamin Root <ben...@ou...> wrote: > >> Jeremy, > >> > >> The pcolor function can take a vmin and a vmax parameter if you wish to > >> control the colorscaling. In addition, you can use a special array > >> structure called a "masked array" to have pcolor ignore "special" > values. > >> Assuming your data is 'vals': > >> > >> vals_masked = numpy.ma.masked_array(vals, vals == 0.0) > >> > >> Note that depending on your situation, doing an equality with with a > >> floating point value probably isn't very reliable, so be sure to test > and > >> modify to suit your needs. 'vals_masked' can then be passed to pcolor > >> instead of vals. > > > > Yes, I think this is exactly what I need. Thanks! > > > > To follow up with my response, I tried the above and it works nicely > with pyplot.pcolor. I would like to get a 3D version of this, like I > get using Axes3D.plot_surface. Is this just not implemented yet? I > am using 0.99.1.1. Has this been implemented in matplotlib 1.0? > > Thanks, > Jeremy > |
|
From: John H. <jd...@gm...> - 2010-07-10 00:38:04
|
On Fri, Jul 9, 2010 at 3:10 PM, Preben Randhol <ra...@pv...> wrote: > I'm trying to plot several subplots. I have setup a scrollwidget and > viewport and I pack a canvas into a vbox in the viewport. > > Problem is that when I scroll, either some of the subplots are missing, > or I get an error when I try to zoom on a graph that argument is not a > gdk.gtk.image (or something like that) but None. > > I thought this was fixed in 1.0, but it isn't > > Please advice! Does this example work for you? http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_gtk3.html It uses a ScrolledWindow. Also, are you using backend_gtk or backend_gtkagg (and does it matter for your problem?) If you could create a minimal example starting with embedding_in_gtk3.py that replicates your problem, we're more likely to be able to help. JDH |
|
From: John H. <jd...@gm...> - 2010-07-10 00:36:52
|
On Fri, Jul 9, 2010 at 3:10 PM, Preben Randhol <ra...@pv...> wrote: > Hi > > I'm trying to plot several subplots. I have setup a scrollwidget and > viewport and I pack a canvas into a vbox in the viewport. > > Problem is that when I scroll, either some of the subplots are missing, > or I get an error when I try to zoom on a graph that argument is not a > gdk.gtk.image (or something like that) but None. > > I thought this was fixed in 1.0, but it isn't > > Please advice! Does this example work for you? http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_gtk3.html It uses a ScrolledWindow. Also, are you using backend_gtk or backend_gtkagg (and does it matter for your problem?) If you could create a minimal example starting with embedding_in_gtk3.py that replicates your problem, we're more likely to be able to help. JDH |
|
From: Jeremy C. <jlc...@gm...> - 2010-07-09 21:50:16
|
On Thu, Jul 8, 2010 at 8:41 AM, Jeremy Conlin <jlc...@gm...> wrote: > On Sun, Jul 4, 2010 at 8:38 PM, Benjamin Root <ben...@ou...> wrote: >> Jeremy, >> >> The pcolor function can take a vmin and a vmax parameter if you wish to >> control the colorscaling. In addition, you can use a special array >> structure called a "masked array" to have pcolor ignore "special" values. >> Assuming your data is 'vals': >> >> vals_masked = numpy.ma.masked_array(vals, vals == 0.0) >> >> Note that depending on your situation, doing an equality with with a >> floating point value probably isn't very reliable, so be sure to test and >> modify to suit your needs. 'vals_masked' can then be passed to pcolor >> instead of vals. > > Yes, I think this is exactly what I need. Thanks! > To follow up with my response, I tried the above and it works nicely with pyplot.pcolor. I would like to get a 3D version of this, like I get using Axes3D.plot_surface. Is this just not implemented yet? I am using 0.99.1.1. Has this been implemented in matplotlib 1.0? Thanks, Jeremy |
|
From: Preben R. <ra...@pv...> - 2010-07-09 20:10:03
|
Hi I'm trying to plot several subplots. I have setup a scrollwidget and viewport and I pack a canvas into a vbox in the viewport. Problem is that when I scroll, either some of the subplots are missing, or I get an error when I try to zoom on a graph that argument is not a gdk.gtk.image (or something like that) but None. I thought this was fixed in 1.0, but it isn't Please advice! Thanks in advance. Preben |
|
From: Ryan M. <rm...@gm...> - 2010-07-09 17:25:22
|
On Fri, Jul 9, 2010 at 10:49 AM, Johannes Röhrs <joh...@me...> wrote: > > > Thanks a lot, this solutions seems to serve my purpose. A new method C.remove() would of course be even better. > > One could say the problem is solved, but why does there no method exist to update a contour plot as there is for many other plot routines, i.e. > set_xdata/set_ydata for plot > set_data for imshow or > set_UVC for quiver and so on. > set_array should be the corresponding method for contour plots, and if type C.get_array() I actually get the data array that I used to plot the countours! > > My purpose of this is to animate the contour plot, and I did read somewhere that updating the plot is much faster/more efficient than deleting and recreating the plot. This is the case when setting up the initial book-keeping is a significant portion of the time to make the plot. In this case, most of the work is in generating the contours, so I don't think you'd get much savings. (Granted, I haven't tried to verify these assumptions.) Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma |
|
From: Johannes R. <joh...@me...> - 2010-07-09 15:49:17
|
Thanks a lot, this solutions seems to serve my purpose. A new method C.remove() would of course be even better.
One could say the problem is solved, but why does there no method exist to update a contour plot as there is for many other plot routines, i.e.
set_xdata/set_ydata for plot
set_data for imshow or
set_UVC for quiver and so on.
set_array should be the corresponding method for contour plots, and if type C.get_array() I actually get the data array that I used to plot the countours!
My purpose of this is to animate the contour plot, and I did read somewhere that updating the plot is much faster/more efficient than deleting and recreating the plot.
----- Original Message -----
From: "Ryan May" <rm...@gm...>
To: "Johannes Röhrs" <joh...@me...>
Cc: mat...@li...
Sent: Friday, 9 July, 2010 5:11:37 PM
Subject: Re: [Matplotlib-users] update an existing contour plot with new data
On Fri, Jul 9, 2010 at 6:28 AM, Johannes Röhrs <joh...@me...> wrote:
> I have some troubles updating a contour plot. I reduced my code to a simple example to reproduce the problem:
>
> [code]
> from pylab *
> import scipy as sp
>
> x=sp.arange(0,2*sp.pi,0.1)
> X,Y=sp.meshgrid(x,x)
> f1=sp.sin(X)+sp.sin(Y)
> f2=sp.cos(X)+sp.cos(Y)
>
> figure()
> C=contourf(f1)
> show()
>
> C.set_array(f2)
> draw()
> [\code]
>
> What do I need to do to update an existing contour plot with new data?
The set_array() method (I think) only impacts the colormapping
information for contourf, and even then doesn't appear to update.
What you need to do is make a new contour plot and remove the old one,
especially if you need to change the underlying contoured data. This
should be as easy as C.remove(), but for some reason, this doesn't
exist (I'll go add it in a minute). So instead, you need to do the
following:
import matplotlib.pyplot as plt
import numpy as np
x = np.arange(0, 2 * np.pi, 0.1)
X,Y = np.meshgrid(x,x)
f1 = np.sin(X) + np.sin(Y)
f2 = np.cos(X) + np.cos(Y)
plt.figure()
C = plt.contourf(f1)
plt.show()
for coll in C.collections:
plt.gca().collections.remove(coll)
C = plt.contourf(f2)
plt.draw()
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
|
|
From: Ryan M. <rm...@gm...> - 2010-07-09 15:12:07
|
On Fri, Jul 9, 2010 at 6:28 AM, Johannes Röhrs <joh...@me...> wrote:
> I have some troubles updating a contour plot. I reduced my code to a simple example to reproduce the problem:
>
> [code]
> from pylab *
> import scipy as sp
>
> x=sp.arange(0,2*sp.pi,0.1)
> X,Y=sp.meshgrid(x,x)
> f1=sp.sin(X)+sp.sin(Y)
> f2=sp.cos(X)+sp.cos(Y)
>
> figure()
> C=contourf(f1)
> show()
>
> C.set_array(f2)
> draw()
> [\code]
>
> What do I need to do to update an existing contour plot with new data?
The set_array() method (I think) only impacts the colormapping
information for contourf, and even then doesn't appear to update.
What you need to do is make a new contour plot and remove the old one,
especially if you need to change the underlying contoured data. This
should be as easy as C.remove(), but for some reason, this doesn't
exist (I'll go add it in a minute). So instead, you need to do the
following:
import matplotlib.pyplot as plt
import numpy as np
x = np.arange(0, 2 * np.pi, 0.1)
X,Y = np.meshgrid(x,x)
f1 = np.sin(X) + np.sin(Y)
f2 = np.cos(X) + np.cos(Y)
plt.figure()
C = plt.contourf(f1)
plt.show()
for coll in C.collections:
plt.gca().collections.remove(coll)
C = plt.contourf(f2)
plt.draw()
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
|
|
From: Robert K. <rob...@gm...> - 2010-07-09 14:39:51
|
On 7/9/10 10:31 AM, per freem wrote: > Also, I am not sure how to use alan's code. > > If I try: > > ec = empirical_cdf(my_data) > plt.plot(ec) > > it doesn't actually look like a cdf Make sure my_data is sorted first. plt.plot(my_data, ec) You probably want to use one of the "steps" linestyles; I'm not sure which one would be best. It probably doesn't matter much. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco |