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
(31) |
3
(17) |
4
(18) |
5
(7) |
|
6
(5) |
7
(16) |
8
(9) |
9
(19) |
10
(18) |
11
(17) |
12
(7) |
|
13
(6) |
14
(15) |
15
(16) |
16
(15) |
17
(19) |
18
(27) |
19
(10) |
|
20
(5) |
21
(5) |
22
(19) |
23
(7) |
24
(11) |
25
(19) |
26
(1) |
|
27
(36) |
28
(37) |
29
(28) |
30
(36) |
|
|
|
|
From: John H. <jd...@gm...> - 2009-09-18 21:29:37
|
On Fri, Sep 18, 2009 at 4:00 PM, Philip Austin <pa...@eo...> wrote: > Reckoner wrote: >> if you're asking me, I don't have write access to this website. > > See http://www.scipy.org/UserPreferences > > to create a wiki account -- best, Phil I was asking you -- let me know if you are unable to do it and one of us can follow up. Thanks! JDH |
|
From: Philip A. <pa...@eo...> - 2009-09-18 21:00:54
|
Reckoner wrote: > if you're asking me, I don't have write access to this website. See http://www.scipy.org/UserPreferences to create a wiki account -- best, Phil |
|
From: Reckoner <rec...@gm...> - 2009-09-18 20:32:16
|
if you're asking me, I don't have write access to this website. Thanks again. On Fri, Sep 18, 2009 at 4:45 AM, John Hunter <jd...@gm...> wrote: > On Thu, Sep 17, 2009 at 8:34 PM, Reckoner <rec...@gm...> wrote: >> thanks. does this mean that >> >> http://www.scipy.org/Cookbook/Matplotlib/mplot3D >> >> is out of date? > > Yes, it needs to be updated -- best would just be to remove the > contents there and point to the mplot3d on the mpl website. Can you > do this for us? > > JDH > |
|
From: Jeff P. <jef...@ya...> - 2009-09-18 20:05:24
|
hello,
have an error occuring that causes my app to crash. I found a few other email listings similar to my problem, but there were no responses that I could learn from.
I am quickly plotting an array as it grows. I have a wxframe, canvas, figure and an axes. I clear the axes, plot the array, draw the canvas. this is happening at about 5 hz. I get the error message listed below and it only occurs when the mouse is hovering over the canvas or a button is pressed. I disabled these events from my canvas yet I still get this error, so I am not sure it is something from my code.
If I am not doing all this fast redrawing. there is no problem, ie. if the image is static I don't have this error. I suspect it has something to do with the axes objects clearing and redrawing while a mouse or key event is simultaneously being drawn.
Please advise as to how I may fix this problem. thanks for your help.
Jeff
Traceback (most recent call last):
File "C:\Python26\lib\site-packages\matplotlib\backends\backend_wx.py", line 1315, in _onMotion
FigureCanvasBase.motion_notify_event(self, x, y, guiEvent=evt)
File "C:\Python26\lib\site-packages\matplotlib\backend_bases.py", line 1244, in motion_notify_event
guiEvent=guiEvent)
File "C:\Python26\lib\site-packages\matplotlib\backend_bases.py", line 899, in __init__
LocationEvent.__init__(self, name, canvas, x, y, guiEvent=guiEvent)
File "C:\Python26\lib\site-packages\matplotlib\backend_bases.py", line 835, in __init__
self._update_enter_leave()
File "C:\Python26\lib\site-packages\matplotlib\backend_bases.py", line 844, in _update_enter_leave
last.canvas.callbacks.process('axes_leave_event', last)
File "C:\Python26\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 14568, in __getattr__
raise PyDeadObjectError(self.attrStr % self._name)
wx._core.PyDeadObjectError: The C++ part of the Canvas object has been deleted, attribute access no longer allowed.
|
|
From: Jae-Joon L. <lee...@gm...> - 2009-09-18 18:05:44
|
On Thu, Sep 17, 2009 at 2:49 AM, Bala subramanian
<bal...@gm...> wrote:
> Friends,
>
> I have a matrix data and i used matshow() function to plot. The plot is
> attached.
>
> 1) After plotting the data, i used xticks() function to change the x-axis
> tick labels from x1 to x12 ( figure attached). Similarly I want to change
> the y-axis tick labels into as A,B and C, instead of 0,1,2 (in the attached
> figure) but when i use yticks() function as below, it dosent happen, instead
> it changes the plot.
>
> yticks( arange(3), ('A','B','C'))
>
Can you post a complete code (a simplified version that reproduces the
problem)? I have done some simple tests but it worked as expected.
Also, please report the version number of your mpl installation.
> 2) I used the colormap cm.autumn to create the plot. Suppose if i want to
> generate the same plot with green,black, red combination, how should i
> specify the colors in matshow.
>
If none of the mpl's colormaps fits your need, you need to create your
own colormap.
Maybe the links below will be helpful.
http://www.scipy.org/Cookbook/Matplotlib/Show_colormaps
-JJ
> Thanks in advance.
> Bala
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: <jas...@cr...> - 2009-09-18 17:37:55
|
John Hunter wrote: > On Fri, Sep 18, 2009 at 11:44 AM, Jae-Joon Lee <lee...@gm...> wrote: > >> I don't think your approach will work in general. >> When you move an axes from one figure to the other, you have to update >> the transform attributes of all the artists, which, I think, could be >> tricky to do for general cases. >> > > I agree that this would be difficult with the existing code base, but > it would be something that is nice to support. Perhaps we can think > about adding support for a fig.move_axes_to(otherfig) method that > reconnects all the wiring. We would of course have to be very careful > about all the child artists, but this would be a good thing to get > right. > Okay. I was hoping that maybe you would say the right way to do this was using inset_axes or something (http://matplotlib.sourceforge.net/examples/axes_grid/inset_locator_demo.html), but I think I understand from the comments why, for example, the ticks were all off in my example. I guess we'll put this functionality in Sage on hold pending the functionality you mention above... Thanks, Jason |
|
From: Werner F. B. <wer...@fr...> - 2009-09-18 17:11:04
|
Hi Jae-Joon, Jae-Joon Lee wrote: > My guess is that the error happens when the matplotlib tries to format > the date ticklabels when the xlim is not correctly set, i.e., [0, 1] > in the example. But, I'm not sure what is the best approach here. > > Werner, if there is nothing to draw (i,e, xlim is [0,1]), change the > xlim to some arbitrary range that is greater than 1 (e.g, [1,2]). For > example, in your code, you may do something like following after > calling the autoscale_view(). > Thanks for the tip. I have in the mean time reorganized my code and I am just bypassing the problematic code if there is nothing to draw. Werner |
|
From: John H. <jd...@gm...> - 2009-09-18 17:09:27
|
On Fri, Sep 18, 2009 at 11:44 AM, Jae-Joon Lee <lee...@gm...> wrote: > I don't think your approach will work in general. > When you move an axes from one figure to the other, you have to update > the transform attributes of all the artists, which, I think, could be > tricky to do for general cases. I agree that this would be difficult with the existing code base, but it would be something that is nice to support. Perhaps we can think about adding support for a fig.move_axes_to(otherfig) method that reconnects all the wiring. We would of course have to be very careful about all the child artists, but this would be a good thing to get right. JDH |
|
From: Jae-Joon L. <lee...@gm...> - 2009-09-18 16:44:54
|
I don't think your approach will work in general.
When you move an axes from one figure to the other, you have to update
the transform attributes of all the artists, which, I think, could be
tricky to do for general cases.
On Thu, Sep 17, 2009 at 1:59 PM, <jas...@cr...> wrote:
> I'm trying to draw the axes from one figure directly over the axes for
> another figure, in a sense, combining the two axes as two layers on one
> figure.
>
> So, first I get an axes instance, "ax".
>
> import matplotlib.pyplot as plt
> fig=plt.figure()
> fig.add_subplot(111)
> plt.plot(range(10), [i^2 for i in range(10)])
> ax=fig.axes[0]
> plt.savefig('test.png')
>
>
> Okay, now I have the axes "ax". I want to draw ax directly on top of
> the following figure, and get a result that would be the same as if I
> had called the plot command above directly in the following code. All
> I'm passed in my real code is the newax variable below, which is why I
> use newax.get_figure()).
>
> fig=plt.figure()
> newax=fig.add_subplot(111)
> ax.set_figure(newax.get_figure())
> newax.get_figure().add_axes(ax,label="newax")
> plt.savefig('test2.png')
For this particular case, set the figure attribute directly instead of
calling the set_figure methods, which does more extra stuff. For
example,
fig=plt.figure()
ax.figure = fig
fig.add_axes(ax,label="newax")
plt.savefig('test2.png')
At least you will have your ticks right.
Again, this approach won't work well unless you update the transform
of all the artists as well.
>
> However, the result of test2.png is not very pretty and definitely not
> what I want. The tick labels for the y-axis are all scrunched up, for
> example.
>
> Can anyone help?
>
> For those curious, what I'm doing is working on getting the Sage
> graphics code to be able to wrap and intelligently display matplotlib
> axes objects, so that a person could easily create a matplotlib axes,
> wrap it in the Sage graphics class, and then be able to manipulate it in
> Sage. In order for this to work, it seems like I need to save the axes
> object I care about, and then when Sage composes it's final figure
> (using matplotlib), it passes me an AxesSubplot object. I need to
> somehow take that subplot object and draw my saved axes on it in the
> most intelligent way possible. In the code above, I try taking the
> given AxesSubplot object, getting the figure from that, and then just
> adding my saved axes to that figure. Is there a better way to do this?
>
Having never used Sage before, I have little idea what you want to do
here (for example, what do you mean by "Sage composes it's final
figure"?). Anyhow, I think it would be best if you can figure out some
way that does not involves axes moving around.
Regards,
-JJ
> Thanks,
>
> Jason
>
> --
> Jason Grout
>
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Christopher B. <Chr...@no...> - 2009-09-18 16:44:11
|
Andrew Straw wrote: > Thanks for this. Yes, indeed. It looks like nice stuff! I do encourage you to keep up the good work on this (the only thing I notice is the need for some more docs). I also encourage you to keep the contour generating code separate from anything matplotlib specific. I, for one, would like to use it outside of MPL. Unfortunately, it will probably be a month or two before I can spend any time digging into this for my stuff, but it looks great so far. > I haven't had a chance to look at your code -- can you elaborate on the > approach you took versus natural neighbors interpolation, as available > through the mlab.griddata function? I think I can answer that a bit: this is contouring directly on the triangular mesh, rather than interpolating to a rectangular grid, then contouring. It should be a little more accurate, as well as saving processing time and memory. In particular, it should work better around the edges of a non-rectangular domain. -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: Andrew S. <str...@as...> - 2009-09-18 16:30:21
|
Ian Thomas wrote: > I've written some code to perform contouring on triangular grids. I > wrote the underlying C++ for a separate project, but as there has been > some interest on the mpl mailing lists for such functionality I've had > a go at wrapping it up as a python module so that it is available from > mpl. I've also added a few utility functions for plotting triangular > grids, doing pseudocolour plots, etc. > Hi Ian, Thanks for this. I haven't had a chance to look at your code -- can you elaborate on the approach you took versus natural neighbors interpolation, as available through the mlab.griddata function? (See examples/pylab_examples/griddata_demo.py for an example apparently similar to yours.) -Andrew |
|
From: Jae-Joon L. <lee...@gm...> - 2009-09-18 16:22:56
|
My guess is that the error happens when the matplotlib tries to format
the date ticklabels when the xlim is not correctly set, i.e., [0, 1]
in the example. But, I'm not sure what is the best approach here.
Werner, if there is nothing to draw (i,e, xlim is [0,1]), change the
xlim to some arbitrary range that is greater than 1 (e.g, [1,2]). For
example, in your code, you may do something like following after
calling the autoscale_view().
self.axes.autoscale_view()
if self.axes.get_xlim()[0] < 1:
self.axes.set_xlim(dates[0], dates[-1])
Regards,
-JJ
On Fri, Sep 18, 2009 at 11:41 AM, Werner F. Bruhin
<wer...@fr...> wrote:
> John Hunter wrote:
>> On Fri, Sep 18, 2009 at 8:15 AM, Werner F. Bruhin <wer...@fr...> wrote:
>>
>>> John Hunter wrote:
>>>
>>>> We want a complete, free standing example that exposes the bug, with any
>>>> additional info like mpl backend and version number.
>>>>
>>
>> Thanks -- when posting a bug, please consider taking the time to make
>> a *minimal* example.
> Sorry about that - was a bit in a hurry, but that is no excuse!
>
> Will do better next time.
>
> Thanks for anyhow having taken the time to look at it and to distill it
> down.
>
> Werner
>
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Bartosz T. <b.t...@bi...> - 2009-09-18 16:13:16
|
Dear Jae-Joon, Your workaround worked perfectly! Thanks a lot! Cheers, Bartosz |
|
From: Werner F. B. <wer...@fr...> - 2009-09-18 15:43:31
|
John Hunter wrote: > On Fri, Sep 18, 2009 at 8:15 AM, Werner F. Bruhin <wer...@fr...> wrote: > >> John Hunter wrote: >> >>> We want a complete, free standing example that exposes the bug, with any >>> additional info like mpl backend and version number. >>> > > Thanks -- when posting a bug, please consider taking the time to make > a *minimal* example. Sorry about that - was a bit in a hurry, but that is no excuse! Will do better next time. Thanks for anyhow having taken the time to look at it and to distill it down. Werner |
|
From: Ian T. <ian...@go...> - 2009-09-18 14:19:00
|
I've written some code to perform contouring on triangular grids. I wrote the underlying C++ for a separate project, but as there has been some interest on the mpl mailing lists for such functionality I've had a go at wrapping it up as a python module so that it is available from mpl. I've also added a few utility functions for plotting triangular grids, doing pseudocolour plots, etc. Attached is the source code with some documentation and examples. There's an example of the output at http://img10.imageshack.us/img10/2873/tricontourfdemo3g.png This example is similar to one of the mpl contourf examples, but on a triangular grid of 1000 randomly spaced points, with the grid overlaid. So far it is only experimental code and hasn't been widely tested. I have a list of improvements already, but thought it best to let people see a working version before spending time polishing it. If it turned out that a (much improved) version of it was considered good enough to incorporate into mpl, I'd would happily help as I'd like to contribute. I hope someone finds it useful! Ian Thomas |
|
From: John H. <jd...@gm...> - 2009-09-18 14:07:59
|
On Fri, Sep 18, 2009 at 8:15 AM, Werner F. Bruhin <wer...@fr...> wrote: > John Hunter wrote: >> >> We want a complete, free standing example that exposes the bug, with any >> additional info like mpl backend and version number. Thanks -- when posting a bug, please consider taking the time to make a *minimal* example. Ie, there is a lot of wx cruft in the example, as well as a lot of stuff that is created but not used (various tickers, locators and datetime instances). We have to then filter this down to the core bug to see if it is real. In this case it is. But we get 1000 emails a month in addition to having to work on normal mpl releases and development so we can use all the help we can get. Here is my version of a minimal example, tested and failing on the release branch and svn HEAD. I've filed a bug report at https://sourceforge.net/tracker/?func=detail&aid=2861426&group_id=80706&atid=560720 and committed a unit test with a knownfailure decorator import matplotlib.dates as dates fig = plt.figure() ax = fig.add_subplot(111) yearFmt = dates.DateFormatter('%Y') ax.xaxis.set_major_formatter(yearFmt) fig.savefig('empty_date_bug') That much more clearly shows where the problem is, doesn't require a developer to have an optionaol backend installed, etc. Thanks for the report and the test case. JDH |
|
From: Werner F. B. <wer...@fr...> - 2009-09-18 13:16:07
|
John Hunter wrote: > We want a complete, free standing example that exposes the bug, with > any additional info like mpl backend and version number. matplotlib: 0.99.0 wx.Python: 2.8.10.1 (unicode on Win Vista) Python 2.5.4 If I comment line 78 then the exception goes away. The attached code does not use, but the exception is the same as I get in my code when I call draw. Hope this helps Werner > > > > On Sep 18, 2009, at 7:43 AM, "Werner F. Bruhin" > <wer...@fr...> wrote: > >> John, >> >> John Hunter wrote: >>> On Fri, Sep 18, 2009 at 4:39 AM, Werner F. Bruhin >>> <wer...@fr...> wrote: >>> >>>> I have multiple canvas and sometimes one or more might have nothing to >>>> draw (no data). >>>> >>>> Currently I just call. >>>> >>>> canvas.draw() >>>> canvas.Refresh() >>>> >>>> for each of the canvas, but this gives me an error if there is no >>>> data. >>>> >>>> Is there a built-in flag I can check before calling draw? Or do I >>>> have >>>> to keep create my own? >>>> >>> >>> There is no such flag, but you should not get an error on drawing an >>> empty figure or one that doesn't "need" to be drawn. Can you post >>> example code that produces the error? >>> >> I narrowed it down to one line of code, if I comment the following line >> then the error goes away. >> >> axes.xaxis.set_major_formatter(yearFmt) >> >> Is this enough for you? Or do you like some runnable code? >> >> Werner >> >> >> >> >> ------------------------------------------------------------------------------ >> >> Come build with us! The BlackBerry® Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and >> stay >> ahead of the curve. Join us from November 9-12, 2009. Register >> now! >> http://p.sf.net/sfu/devconf >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: John H. <jd...@gm...> - 2009-09-18 12:51:09
|
We want a complete, free standing example that exposes the bug, with any additional info like mpl backend and version number. On Sep 18, 2009, at 7:43 AM, "Werner F. Bruhin" <wer...@fr...> wrote: > John, > > John Hunter wrote: >> On Fri, Sep 18, 2009 at 4:39 AM, Werner F. Bruhin <wer...@fr... >> > wrote: >> >>> I have multiple canvas and sometimes one or more might have >>> nothing to >>> draw (no data). >>> >>> Currently I just call. >>> >>> canvas.draw() >>> canvas.Refresh() >>> >>> for each of the canvas, but this gives me an error if there is no >>> data. >>> >>> Is there a built-in flag I can check before calling draw? Or do I >>> have >>> to keep create my own? >>> >> >> There is no such flag, but you should not get an error on drawing an >> empty figure or one that doesn't "need" to be drawn. Can you post >> example code that produces the error? >> > I narrowed it down to one line of code, if I comment the following > line > then the error goes away. > > axes.xaxis.set_major_formatter(yearFmt) > > Is this enough for you? Or do you like some runnable code? > > Werner > > > > > --- > --- > --- > --------------------------------------------------------------------- > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart > your > developing skills, take BlackBerry mobile applications to market and > stay > ahead of the curve. Join us from November 9-12, 2009. Register > now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Werner F. B. <wer...@fr...> - 2009-09-18 12:44:38
|
John,
John Hunter wrote:
> On Fri, Sep 18, 2009 at 4:39 AM, Werner F. Bruhin <wer...@fr...> wrote:
>
>> I have multiple canvas and sometimes one or more might have nothing to
>> draw (no data).
>>
>> Currently I just call.
>>
>> canvas.draw()
>> canvas.Refresh()
>>
>> for each of the canvas, but this gives me an error if there is no data.
>>
>> Is there a built-in flag I can check before calling draw? Or do I have
>> to keep create my own?
>>
>
> There is no such flag, but you should not get an error on drawing an
> empty figure or one that doesn't "need" to be drawn. Can you post
> example code that produces the error?
>
I narrowed it down to one line of code, if I comment the following line
then the error goes away.
axes.xaxis.set_major_formatter(yearFmt)
Is this enough for you? Or do you like some runnable code?
Werner
|
|
From: John H. <jd...@gm...> - 2009-09-18 12:09:12
|
On Thu, Sep 17, 2009 at 11:28 PM, Andrew Straw <str...@as...> wrote: > Flávio Coelho has implemented Violin plots for MPL. Nice! He has a > question regarding its suitability for inclusion due to a dependency on > scipy for the gaussian_kde function. > http://pyinsci.blogspot.com/2009/09/violin-plot-with-matplotlib.html > > Is there a place this could live in the MPL code base without requiring > scipy? Perhaps we should just include it as a demo. I note that > examples/pylab_examples/demo_agg_filter.py requires scipy, too. > > Thanks Flávio for sharing -- I have occasionally wondered how my data > would look in a violin plot. These do look nice, and the implementation is fairly light. I don't have strong feelings about what the best way to include this is: * as an example * as a proper mpl pyplot/axes function that imports scipy internally and raises if it can't find it * that requires a kde to be passed in Of these, the top two are probably preferable since in practice everyone would just pass in the kde from scipy so why not just save them the step and try to import it ourselves. While I don't want the core of mpl to require scipy, I can certainly abide by some functions requiring it as long as they raise helpful errors. So I'm leaning towards the 2nd option (we already do something like this -- we conditionally import Image in imread for example) If we go that way, we will have the worry about version dependencies and what we want to require on the buildbots. As for a patch, the implementation looks good though we need a better docstring and one that is Sphinx compliant. One thing you will want to consider is how to support the boxplot and fill between keywords. Eg, people will want to customize the fills, so you may want something like violin_plot(blah, fillprops=None, boxprops=None): if fillprops is None: fillprops = dict(facecolor='yellow', alpha=0.3) if boxprops is None: boxprops = dict(notch=1, vert=1) ax.fill_betweenx(blahblah, **fillprops) etc... that way people can sti In you docstring, you should also point to the fill_betweenx and boxprops docs using the Sphinx API conventions. Finally, we will need a pass-through interface in pyplot, most likely through a boilerplate.py entry, and a unit test :-) Some of this is discussed at http://matplotlib.sourceforge.net/devel/coding_guide.html, but some of these conventions are undocumented, so we're happy to help with any part that is confusing. JDH |
|
From: John H. <jd...@gm...> - 2009-09-18 11:47:55
|
On Fri, Sep 18, 2009 at 4:39 AM, Werner F. Bruhin <wer...@fr...> wrote: > I have multiple canvas and sometimes one or more might have nothing to > draw (no data). > > Currently I just call. > > canvas.draw() > canvas.Refresh() > > for each of the canvas, but this gives me an error if there is no data. > > Is there a built-in flag I can check before calling draw? Or do I have > to keep create my own? There is no such flag, but you should not get an error on drawing an empty figure or one that doesn't "need" to be drawn. Can you post example code that produces the error? JDH |
|
From: John H. <jd...@gm...> - 2009-09-18 11:45:48
|
On Thu, Sep 17, 2009 at 8:34 PM, Reckoner <rec...@gm...> wrote: > thanks. does this mean that > > http://www.scipy.org/Cookbook/Matplotlib/mplot3D > > is out of date? Yes, it needs to be updated -- best would just be to remove the contents there and point to the mplot3d on the mpl website. Can you do this for us? JDH |
|
From: Werner F. B. <wer...@fr...> - 2009-09-18 09:40:14
|
I have multiple canvas and sometimes one or more might have nothing to
draw (no data).
Currently I just call.
canvas.draw()
canvas.Refresh()
for each of the canvas, but this gives me an error if there is no data.
Is there a built-in flag I can check before calling draw? Or do I have
to keep create my own?
Werner
PS
If it is of any help, I get this (also I have mpl.verbose.level = u'silent':
C:\Python25\lib\site-packages\matplotlib\axes.py:3996: UserWarning: No
labeled objects found. Use label='...' kwarg on individual plots.
warnings.warn("No labeled objects found. "
And here is the traceback.
Traceback (most recent call last):
File "C:\Dev\twcbBranchv31\Program\panelstats.py", line 178, in DoRefresh
self.RefreshAllGraphs()
File "C:\Dev\twcbBranchv31\Program\panelstats.py", line 313, in
RefreshAllGraphs
self.priceChangeP.canvas.draw()
File
"C:\Python25\Lib\site-packages\matplotlib\backends\backend_wxagg.py",
line 59, in draw
FigureCanvasAgg.draw(self)
File
"C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", line
314, in draw
self.figure.draw(self.renderer)
File "C:\Python25\Lib\site-packages\matplotlib\artist.py", line 46, in
draw_wrapper
draw(artist, renderer, *kl)
File "C:\Python25\Lib\site-packages\matplotlib\figure.py", line 774,
in draw
for a in self.axes: a.draw(renderer)
File "C:\Python25\Lib\site-packages\matplotlib\artist.py", line 46, in
draw_wrapper
draw(artist, renderer, *kl)
File "C:\Python25\Lib\site-packages\matplotlib\axes.py", line 1721, in
draw
a.draw(renderer)
File "C:\Python25\Lib\site-packages\matplotlib\artist.py", line 46, in
draw_wrapper
draw(artist, renderer, *kl)
File "C:\Python25\Lib\site-packages\matplotlib\axis.py", line 736, in draw
for tick, loc, label in self.iter_ticks():
File "C:\Python25\Lib\site-packages\matplotlib\axis.py", line 677, in
iter_ticks
majorLocs = self.major.locator()
File "C:\Python25\Lib\site-packages\matplotlib\dates.py", line 754, in
__call__
dmin, dmax = self.viewlim_to_dt()
File "C:\Python25\Lib\site-packages\matplotlib\dates.py", line 454, in
viewlim_to_dt
return num2date(vmin, self.tz), num2date(vmax, self.tz)
File "C:\Python25\Lib\site-packages\matplotlib\dates.py", line 249, in
num2date
if not cbook.iterable(x): return _from_ordinalf(x, tz)
File "C:\Python25\Lib\site-packages\matplotlib\dates.py", line 170, in
_from_ordinalf
dt = datetime.datetime.fromordinal(ix)
ValueError: ordinal must be >= 1
|
|
From: Andrew S. <str...@as...> - 2009-09-18 04:29:08
|
Flávio Coelho has implemented Violin plots for MPL. Nice! He has a question regarding its suitability for inclusion due to a dependency on scipy for the gaussian_kde function. http://pyinsci.blogspot.com/2009/09/violin-plot-with-matplotlib.html Is there a place this could live in the MPL code base without requiring scipy? Perhaps we should just include it as a demo. I note that examples/pylab_examples/demo_agg_filter.py requires scipy, too. Thanks Flávio for sharing -- I have occasionally wondered how my data would look in a violin plot. -Andrew |
|
From: Eric F. <ef...@ha...> - 2009-09-18 02:58:40
|
Reckoner wrote: > thanks. does this mean that > > http://www.scipy.org/Cookbook/Matplotlib/mplot3D > > is out of date? Yes. Eric > > thanks > > > > On Thu, Sep 17, 2009 at 6:22 PM, John Hunter <jd...@gm...> wrote: >> On Thu, Sep 17, 2009 at 6:46 PM, Reckoner <rec...@gm...> wrote: >>> unless I'm misunderstanding something, the website says that >>> >>> matplotlib-0.99.0.win32-py2.5 >>> >>> should contain the axes3d material. It doesn't. Instead, it axes3d.py >>> contains the following: >>> >>> raise NotImplementedError('axes3d is not supported in matplotlib-0.98. >>> You may want to try the 0.91.x maintenance branch') >>> >>> note that I am on a Windows machine and I'm not sure I can build >>> everything from the trunk. >> It looks like you are having tow problems -- first, you apparently >> installed a new matplotlib over an old matplotlib and so there are >> some old files laying around. Blow away site-packages/matplotlib and >> reinstall. See >> >> http://matplotlib.sourceforge.net/faq/installing_faq.html#cleanly-rebuild-and-reinstall-everything >> >> Secondly, you need to be importing mplot3d from mpl_toolkits, it's new >> location. You appear to be importing it from matplotlib.axes3d, it's >> old location which is now deprecated. Eg see >> >> http://matplotlib.sourceforge.net/mpl_toolkits/mplot3d/tutorial.html >> >> Hope this helps, >> JDH >> > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |