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
(12) |
3
(7) |
4
(23) |
5
(5) |
6
(7) |
7
(4) |
8
(7) |
9
(25) |
10
(17) |
11
(25) |
12
(11) |
13
(8) |
14
(6) |
15
(1) |
16
(22) |
17
(11) |
18
(12) |
19
(22) |
20
(32) |
21
(9) |
22
(4) |
23
(16) |
24
(5) |
25
(9) |
26
(26) |
27
(21) |
28
(14) |
29
(6) |
30
(8) |
31
(4) |
|
|
|
|
From: Benjamin R. <ben...@ou...> - 2010-08-19 23:21:18
|
On Thu, Aug 19, 2010 at 5:05 PM, Bala subramanian <bal...@gm... > wrote: > Friends, > > I would like to place grid lines (precisely draw lines) at specific (x,y) > coordinates. If i am not wrong, grid() function will take only True/False > arguments. Someone kindly write me if there is any way to do this. > > Thanks, > Bala > > Perhaps the Major/Minor Locators would be of use to you? http://matplotlib.sourceforge.net/api/ticker_api.html http://matplotlib.sourceforge.net/examples/pylab_examples/major_minor_demo1.html When turning on the grid, you can control whether you turn on the minor or major lines by specifying the 'which' keyword. Use major lines if you want tick labels for them, use minor lines if you don't. I hope this helps, Ben Root |
From: Bala s. <bal...@gm...> - 2010-08-19 22:05:21
|
Friends, I would like to place grid lines (precisely draw lines) at specific (x,y) coordinates. If i am not wrong, grid() function will take only True/False arguments. Someone kindly write me if there is any way to do this. Thanks, Bala |
From: Friedrich R. <fri...@gm...> - 2010-08-19 22:02:12
|
2010/8/19 Rob Schneider <rm...@rm...>: > I'm sorry you took anything I said as "blame". Not intended that way. Just stating that using figure() and close() resolved the issue. As I look back on the material I've used to learn how to use Matplotlib, they sometimes call these functions and sometimes not. I've concluded that it is required to call these functions. The message to this list is that it *appears* at least to me that it is required to call these functions. Hopefully that will help someone. Ok, I took it wrongly. My mistake. Sorry. I want to second Ben, with hoping that you will be a vivid member of the matplotlib community. Friedrich |
From: Friedrich R. <fri...@gm...> - 2010-08-19 21:53:19
|
2010/8/19 Michael Droettboom <md...@st...>: > On 08/18/2010 06:03 PM, Friedrich Romstedt wrote: >> Is the attached issue with a plain polar axes already fixed? I never >> encountered this before. 344 degrees happens to be 6.0 rad. I'm on >> svn 8626. > > How are you creating that graph? By default, polar plots don't do that. Yeah, it's my issue, but I'm not happy with fixing it. Currently, matplotlib forces the xticks (i.e., the theta ticks) to be at sensible values via .set_xticks() and .set_xlabels() (projections/polar.py). I'm coding a matplotlib extension package which has to clear the axes often, but restoring the major locators, the title and stuff after clearing. It was agnostic to the specialities of polar axes so far. I could say, "if nothing is requested specially, treat it as a running system", but I see this as clumsy and error-prone at all. I would rather suggest to insert a new Locator class being aware of radians. It would suffice to return tick positions dividing 2 pi into an integer number of bins. It's not necessary to cover all the peculiarities of the old historic division system into 360 parts. Accompanying would be formatters in radians and degrees with adjustable precision (no autodetect necessary). Friedrich |
From: Virgil S. <vs...@it...> - 2010-08-19 21:34:45
|
I have been unable to build/install Matplotlib 1.0.0 on a 64-bit Ubuntu 10.04 system for Python 2.6.5. The build process starts ok, but after sometime the following message *creating /usr/local/lib/python2.6/dist-packages/mpl_toolkits * is displayed and the build comes to a halt. I looked in this folder and it is empty. Note, I need vers. 1.0.0 since the previous version (0.99.1.2) that is available with the Synaptic Package Manager, does not contain some modules that I need for my applications. Any suggestions would be appreciated --- I do need Matplotlib 1.0.0 on my Ubuntu 10.04 system. --V |
From: R. P. S. <R.S...@um...> - 2010-08-19 18:07:49
|
I've got a figure I'm working on in which certain points where some externally derived conditions are met are called out from a larger figure. Up to now, I've simply been overlaying a plot of those points on the graph, but several of the different series of points overlap with each other and I'm getting feedback that this makes the figure hard to read. Does anyone have any suggestions on how I might make it easier to distinguish each of the series of points? One suggestion that's been made to me locally was to use call-out boxes which pointed to sites where multiple series had points and in which the different point series could be laid out in a non-overlapping fashion, but I don't know how that might be done. The attached figure (if it goes through) shows the state of the graph as I currently have it. -- R. Padraic Springuel Research Assistant Department of Physics and Astronomy University of Maine Bennett 309 Office Hours: By Appointment Only |
From: Nicholas K. <n....@us...> - 2010-08-19 17:18:17
|
> > Note that you can put a wx.Panel in a wx.Panel, which is what you may > want to do it your case. > > -Chris > > Hello Chris, Thank you for your response; I think this is what I would like to do. Once again, thank you. Nicholas |
From: Christopher B. <Chr...@no...> - 2010-08-19 17:14:25
|
Nicholas Kinar wrote: > Chris, thank you very much for your response, and for the link. I've > taken a look at the wxMPL library and it looks extremely useful and > interesting. But how would I work with the class MyPanel(wx.Panel), and > embed wxMPL directly into MyPanel? Could you give an extremely simple > example (i.e. 2D plot of a sine wave)? sorry -- very short on time -- look at the wxMPL examples, understand them with pure Python, and they it should be straightforward to transfer to your situation. Note that you can put a wx.Panel in a wx.Panel, which is what you may want to do it your case. -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: Nicholas K. <n....@us...> - 2010-08-19 16:43:25
|
On 10-08-19 10:08 AM, C M wrote: >> I've been following the sample code given in the wxPython distribution >> to embed a wxPython window in wxGTK. The following links to the >> wxPython SVN demonstrate this technique: >> >> http://svn.wxwidgets.org/viewvc/wx/wxPython/trunk/samples/embedded/embedded_sample.py?revision=47031&view=markup >> http://svn.wxwidgets.org/viewvc/wx/wxPython/trunk/samples/embedded/embedded.cpp?revision=52947&view=markup >> > Not sure what that is, but it doesn't look very helpful for your > needs. Instead, see below... > > >> The main program (embedded.cpp) interacts with an embedded wxPython >> script (embedded_sample.py). What I would like to do is embed >> matplotlib within a wxPanel of this wxPython script. The following code >> snippet shows exactly what I would like to do: >> >> >> # Begin Python code snippet >> import matplotlib >> matplotlib.interactive( True ) >> matplotlib.use( 'WXAgg' ) >> >> import numpy as num >> import wx >> >> >> class MyPanel(wx.Panel): >> def __init__(self, parent): >> wx.Panel.__init__(self, parent, -1, style=wx.SUNKEN_BORDER) >> >> # what do I do down here to be able to embed matplotlib >> within the wxPanel? >> > See this page: > http://www.scipy.org/Matplotlib_figure_in_a_wx_panel > > Basically the idea is you make a matplotlib canvas, and then add that > to a wxPanel. > > Che > > Hello Che-- Thank you very much for your response; this is greatly appreciated, and thank you for the link to the scipy website. I've read over the example, but I cannot understand how I would start with just a wxPanel and then add the embedded matplotlib just to the panel (as per the code snippet above). In the example on the scipy website, it appears that class DemoPlotPanel(PlotPanel) takes as input class PlotPanel. How would I do this with the MyPanel class as shown above? Nicholas |
From: Nicholas K. <n....@us...> - 2010-08-19 16:42:34
|
> As in embedding some wxPython in a C++ wxGTK program? > Yes, that is exactly what I am doing. > >> What I would like to do is embed >> matplotlib within a wxPanel of this wxPython script. >> > once you've got wxPython working, using MPL should be exactly t he same > as with a pure wxPyton app -- take a look at the "embedded_in_wx" > examples, and/or use wxMPL -- it provides a nice interactive MPL window > out of the box: > > http://agni.phys.iit.edu/~kmcivor/wxmpl/ > > -Chris > > Chris, thank you very much for your response, and for the link. I've taken a look at the wxMPL library and it looks extremely useful and interesting. But how would I work with the class MyPanel(wx.Panel), and embed wxMPL directly into MyPanel? Could you give an extremely simple example (i.e. 2D plot of a sine wave)? Nicholas |
From: Christopher B. <Chr...@no...> - 2010-08-19 16:18:17
|
Nicholas Kinar wrote: > I've been following the sample code given in the wxPython distribution > to embed a wxPython window in wxGTK. As in embedding some wxPython in a C++ wxGTK program? > What I would like to do is embed > matplotlib within a wxPanel of this wxPython script. once you've got wxPython working, using MPL should be exactly t he same as with a pure wxPyton app -- take a look at the "embedded_in_wx" examples, and/or use wxMPL -- it provides a nice interactive MPL window out of the box: http://agni.phys.iit.edu/~kmcivor/wxmpl/ -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: Nicholas K. <n....@us...> - 2010-08-19 15:58:20
|
Hello-- I've been following the sample code given in the wxPython distribution to embed a wxPython window in wxGTK. The following links to the wxPython SVN demonstrate this technique: http://svn.wxwidgets.org/viewvc/wx/wxPython/trunk/samples/embedded/embedded_sample.py?revision=47031&view=markup http://svn.wxwidgets.org/viewvc/wx/wxPython/trunk/samples/embedded/embedded.cpp?revision=52947&view=markup The main program (embedded.cpp) interacts with an embedded wxPython script (embedded_sample.py). What I would like to do is embed matplotlib within a wxPanel of this wxPython script. The following code snippet shows exactly what I would like to do: # Begin Python code snippet import matplotlib matplotlib.interactive( True ) matplotlib.use( 'WXAgg' ) import numpy as num import wx class MyPanel(wx.Panel): def __init__(self, parent): wx.Panel.__init__(self, parent, -1, style=wx.SUNKEN_BORDER) # what do I do down here to be able to embed matplotlib within the wxPanel? # end code snippet In a similar fashion to the Matlab imagesc() function, I would like to embed a matplotlib image which displays a 2D matrix as a colormapped image. How might I be able to do this? Nicholas |
From: Jeremy C. <jlc...@gm...> - 2010-08-19 15:22:13
|
On Wed, Aug 18, 2010 at 10:11 PM, Jae-Joon Lee <lee...@gm...> wrote: > > Try > > > cbar.formatter.set_useOffset(False) > cbar.formatter.set_scientific(True) > cbar.formatter.set_powerlimits((0,2)) > > It gives me > > offsetText -> "x 10^3" > and tick labels = ["5.0002", "5.0004",...] Yes that is exactly what I want. Thanks for being persistent in getting that through my thick skull. Jeremy |
From: Benjamin R. <ben...@ou...> - 2010-08-19 14:09:17
|
On Thu, Aug 19, 2010 at 6:49 AM, Rob Schneider <rm...@rm...>wrote: > > On Wed, Aug 18, 2010 at 3:32 PM, Friedrich Romstedt > > <fri...@gm...> wrote: > >> 2010/8/14 Rob Schneider <rm...@rm...>: > >>>> Agreed. The only thing I can think of is that the second figure is > >>>> reusing the first. You can try calling plt.figure() at the beginning > >>>> of the functions to create a new figure, or call plt.figure() in > >>>> between the calls to CreateMemberStatCategoryFigure() and > >>>> CreateMemberStatFigure(). I can't be sure since you didn't include the > >>>> code that actually calls these functions. > >> > >> Still, there shouldn't be artists rendered outside of the axes. I > >> often replot things and do not create a new figure. I believe there > >> is something under the hood! It *should* be unnecessary to create a > >> new fig, although it surely fixes the thing, and is an easy enough > >> fix. > > > > One bar chart was categorical, the other based on dates. That threw > > the axes scaling completely off. There weren't any misdrawn artists, > > unless you're referring to the jumble of text. These are actually > > tightly packed ticklabels for x-axis. Since the scaling is fubar-ed, > > it looks messed up. > > > > Not sure what could be reasonably expected in such a case. > > > > Ryan > > > > -- > > Ryan May > > Graduate Research Assistant > > School of Meteorology > > University of Oklahoma > > > > I think the graphs were composed correctly, else why would they ever work? > They were fixed by calling the figure() and close() functions. i'm > reporting that to the list with the hope that others can value from it. > > > Just to add my 2 cents... In python, explicit is preferred over implicit. So, it would be a good idea to call figure() or any other figure-handling function when you mean to use them. However, because we strive to cater to those who come from Matlab, we need to make matplotlib a little bit more robust and allow it to implicitly make assumptions when the programmer does not explicitly state their intentions. So, while the following code example works just fine: from pylab import * > scatter([0.0, 0.5, 2.4, 1.2], [1.4, 0.7, 2.1, 0.3]) > title("This is a scatter plot") > show() > The "better", more robust way would be this: import matplotlib.pyplot as plt > fig = plt.figure() > ax = fig.gca() > ax.scatter([0.0, 0.5, 2.4, 1.2], [1.4, 0.7, 2.1, 0.3]) > ax.set_title("This is a scatter plot") > plt.show() > This way, you explicitly state that you want to do a particular action on a particular axes that belongs in a particular figure. With this approach, you can make functions that take a 'ax' parameter and make specialty graphs on whatever axes you tell it. You can have multiple figures made simultaneously with multiple axes (think subplots) and be able to open and close whichever ones you want whenever you like. In the documentation, you see a variety of styles because of this flexibility. Whether this is wise or not, that is probably a different question. I hope this clears up any confusion you and other future matplotlib-ers have! I hope you continue to use and enjoy matplotlib! Ben Root |
From: Michael D. <md...@st...> - 2010-08-19 13:15:44
|
It looks like you're running an earlier version of matplotlib from before the "get_sample_data" function existed. What does: >>> import matplotlib >>> matplotlib.__version__ give you? Mike On 08/19/2010 04:34 AM, Virgil Stokes wrote: > In the on-line Matplotlib documentation there is an example: > > scatter_demo2.py > > which shows a very nice scatter plot --- one that I would like to be able to > reproduce. However, I have been unsuccessful in getting it to execute on my system. > > I get the following error: > > AttributeError: 'module' object has no attribute 'get_sample_data' > File "D:\Python Code Testing\MatPlotLib_Example_02.py", line 14, in<module> > datafile = cbook.get_sample_data('goog.npy') > > Has anyone succeeded in getting this interesting example to run on their system? > If yes, I would appreciate information on how they accomplished this. > > --V. Stokes > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Space Telescope Science Institute Baltimore, Maryland, USA |
From: Ryan M. <rm...@gm...> - 2010-08-19 13:15:22
|
On Thu, Aug 19, 2010 at 6:49 AM, Rob Schneider <rm...@rm...> wrote: >> On Wed, Aug 18, 2010 at 3:32 PM, Friedrich Romstedt >> <fri...@gm...> wrote: >>> 2010/8/14 Rob Schneider <rm...@rm...>: >>>>> Agreed. The only thing I can think of is that the second figure is >>>>> reusing the first. You can try calling plt.figure() at the beginning >>>>> of the functions to create a new figure, or call plt.figure() in >>>>> between the calls to CreateMemberStatCategoryFigure() and >>>>> CreateMemberStatFigure(). I can't be sure since you didn't include the >>>>> code that actually calls these functions. >>> >>> Still, there shouldn't be artists rendered outside of the axes. I >>> often replot things and do not create a new figure. I believe there >>> is something under the hood! It *should* be unnecessary to create a >>> new fig, although it surely fixes the thing, and is an easy enough >>> fix. >> >> One bar chart was categorical, the other based on dates. That threw >> the axes scaling completely off. There weren't any misdrawn artists, >> unless you're referring to the jumble of text. These are actually >> tightly packed ticklabels for x-axis. Since the scaling is fubar-ed, >> it looks messed up. >> >> Not sure what could be reasonably expected in such a case. >> >> Ryan >> >> -- >> Ryan May >> Graduate Research Assistant >> School of Meteorology >> University of Oklahoma >> > > I think the graphs were composed correctly, else why would they ever work? They were fixed by calling the figure() and close() functions. i'm reporting that to the list with the hope that others can value from it. The graphs *were* composed just fine, that wasn't my point. The problem was that the original code tried (by accident) to take two fundamentally different graphs and put them on the same axes. Matplotlib assumes that unless you tell it otherwise [by creating a new figure or calling hold(false)], everything should be on the same figure. Hence, adding a call to figure() fixes the problem by putting the second graph on its own figure. Now, if there is not an existing figure, the commands from pyplot will create one for you, but that's only in the case where there are no existing (live, not closed) figures. Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma |
From: Michael D. <md...@st...> - 2010-08-19 13:14:01
|
On 08/18/2010 06:03 PM, Friedrich Romstedt wrote: > 2010/8/18 Michael Droettboom<md...@st...>: > >> This bug (that the r-axis labels are in the wrong place) should now be fixed >> in r8651. This doesn't, unfortunately, address the original question about >> annular plots. >> > Is the attached issue with a plain polar axes already fixed? I never > encountered this before. 344 degrees happens to be 6.0 rad. I'm on > svn 8626. > How are you creating that graph? By default, polar plots don't do that. Mike -- Michael Droettboom Science Software Branch Space Telescope Science Institute Baltimore, Maryland, USA |
From: Rob S. <rm...@rm...> - 2010-08-19 11:52:27
|
> > You know, we are all volunteering our time here on the list to help, > and I think blaming us to not be able to read hundred lines of code is > not productive at all. It's not our side of the task to track whole > parts of programs down. And, usually one has to play with the code > and to run it to see if it fixes the problem! > > You can help improving matplotlib by providing the things the core > developers or experienced Python users like me need to track the error > down inside of matplotlib. > > Friedrich > > P.S.: Try to not think in experts and customers terms. > I'm sorry you took anything I said as "blame". Not intended that way. Just stating that using figure() and close() resolved the issue. As I look back on the material I've used to learn how to use Matplotlib, they sometimes call these functions and sometimes not. I've concluded that it is required to call these functions. The message to this list is that it *appears* at least to me that it is required to call these functions. Hopefully that will help someone. |
From: Rob S. <rm...@rm...> - 2010-08-19 11:50:02
|
> On Wed, Aug 18, 2010 at 3:32 PM, Friedrich Romstedt > <fri...@gm...> wrote: >> 2010/8/14 Rob Schneider <rm...@rm...>: >>>> Agreed. The only thing I can think of is that the second figure is >>>> reusing the first. You can try calling plt.figure() at the beginning >>>> of the functions to create a new figure, or call plt.figure() in >>>> between the calls to CreateMemberStatCategoryFigure() and >>>> CreateMemberStatFigure(). I can't be sure since you didn't include the >>>> code that actually calls these functions. >> >> Still, there shouldn't be artists rendered outside of the axes. I >> often replot things and do not create a new figure. I believe there >> is something under the hood! It *should* be unnecessary to create a >> new fig, although it surely fixes the thing, and is an easy enough >> fix. > > One bar chart was categorical, the other based on dates. That threw > the axes scaling completely off. There weren't any misdrawn artists, > unless you're referring to the jumble of text. These are actually > tightly packed ticklabels for x-axis. Since the scaling is fubar-ed, > it looks messed up. > > Not sure what could be reasonably expected in such a case. > > Ryan > > -- > Ryan May > Graduate Research Assistant > School of Meteorology > University of Oklahoma > I think the graphs were composed correctly, else why would they ever work? They were fixed by calling the figure() and close() functions. i'm reporting that to the list with the hope that others can value from it. |
From: Virgil S. <vs...@it...> - 2010-08-19 09:04:48
|
In the on-line Matplotlib documentation there is an example: scatter_demo2.py which shows a very nice scatter plot --- one that I would like to be able to reproduce. However, I have been unsuccessful in getting it to execute on my system. I get the following error: AttributeError: 'module' object has no attribute 'get_sample_data' File "D:\Python Code Testing\MatPlotLib_Example_02.py", line 14, in <module> datafile = cbook.get_sample_data('goog.npy') Has anyone succeeded in getting this interesting example to run on their system? If yes, I would appreciate information on how they accomplished this. --V. Stokes |
From: Jae-Joon L. <lee...@gm...> - 2010-08-19 04:11:32
|
On Tue, Aug 17, 2010 at 11:06 PM, Jeremy Conlin <jlc...@gm...> wrote: > On Mon, Aug 16, 2010 at 6:13 PM, Jae-Joon Lee <lee...@gm...> wrote: >> Using the set_powerlimits method didn't help? > > I couldn't get set_powerlimits or set_scientific to change anything in > my colorbar scaling. If I used setOffset(False) then there was no > scaling; an improvement, but not ideal. > >> >> As far as I know, the current implementation does not allow a custom >> scale factor. >> But if the scale factor is power of 10 (10, 100, 1000, ...), I believe >> using set_powerlimits method (as in my previous example, or some >> variation) is good enough. > > Unfortunately in my simple example (and in my real world case), the > scale factor is some number (i.e. 5) times a power of 10. > > Am I missing something? I'm running matplotlib version 1.0.0. > > Thanks, > Jeremy > > > > import numpy > import matplotlib.pyplot as pyplot > > a = 5000 > b = 5002 > > M = (b-a)*numpy.random.random((5,5))+a > > fig = pyplot.figure() > pc = pyplot.pcolor(M) > > cbar = fig.colorbar(pc) > cbar.formatter.set_scientific(False) > cbar.formatter.set_powerlimits((0,2)) > # cbar.formatter.set_useOffset(False) > > cbar.update_ticks() > Try cbar.formatter.set_useOffset(False) cbar.formatter.set_scientific(True) cbar.formatter.set_powerlimits((0,2)) It gives me offsetText -> "x 10^3" and tick labels = ["5.0002", "5.0004",...] which I believe is what you want? In case you want a scaling factor other than some power of tens, I guess the easiest way is to scale the image itself and then use "annotate" command to put the offsetText. For example, import numpy import matplotlib.pyplot as pyplot a = 5000 b = 5002 M = (b-a)*numpy.random.random((5,5))+a fig = pyplot.figure() pc = pyplot.pcolor(M/5000) cbar = fig.colorbar(pc) cbar.formatter.set_useOffset(False) cbar.ax.annotate(r"$\times 5000$", (0.5, 1), xytext=(0, 5), xycoords="axes fraction", textcoords="offset points") cbar.update_ticks() -JJ |
From: Jae-Joon L. <lee...@gm...> - 2010-08-19 03:28:22
|
On Wed, Aug 18, 2010 at 10:03 PM, Nils Wagner <nw...@ia...> wrote: > I would like to plot an annulus. > With mpl_toolkits.axisartist, it is possible to make an axes of annulus. But, the resulting axes is not fully compatible with the original matplotlib axes. Most of the tick-related commands won't work and you need to use new commands provided by the axisartist module. Attached is a sample script and a screeshot. Also see these examples, http://matplotlib.sourceforge.net/examples/axes_grid/demo_floating_axes.html -JJ |