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
(9) |
2
(8) |
3
|
4
(6) |
5
|
6
|
7
(41) |
8
(18) |
9
(25) |
10
(18) |
11
(10) |
12
(13) |
13
(7) |
14
(4) |
15
(12) |
16
(6) |
17
(9) |
18
(7) |
19
(2) |
20
(5) |
21
(7) |
22
(2) |
23
(11) |
24
(11) |
25
(14) |
26
(3) |
27
(3) |
28
(17) |
29
(7) |
30
(16) |
31
(8) |
|
|
Hi Michael, In both cases, I was first hoping someone else has experienced this problem, to know I am not alone in the universe. But since you asked, I am using the macosx backend - but find the same problem also with WXAgg and TkAgg. When you mention included examples, I do not find any in my /Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/matplotlib/mpl-data/example/ folder. Do you mean ones I find on the web at the matplotlib site? Thanks, Andre On Mar 24, 2011, at 4:31 PM, Michael Droettboom wrote: > On 03/24/2011 09:35 AM, Andre' Walker-Loud wrote: >> Hi All, >> >> I am having two slight irritating issues making figures with matplotlib (and have not found a solution with Google) >> >> I am running the Enthought 6.2 distribution (python 2.6, matplotlib 0.99.3, ipython 0.10, ...) which is installed as a Framework on a Mac OSX 10.6 platform. >> >> I currently am using (matplotlibrc file) >> >> backend : macosx (I find the same issues with WXAgg and TkAgg as well) >> ... >> text.usetex : true #use latex for all text handling >> >> >> Both problems began with my Enthought distribution (but for reasons I will spare you, I don't want to switch to a different installation if possible, except upgrade Enthought). >> >> >> Problem 1: >> With all my old installations, which existed on previous Mac OSX version (10.5), I did not need to set >> >> text.usetex : true #use latex for all text handling >> >> My text rendering worked fine. But with the Enthought version, for some reason, I got fatal errors. So I switched to having latex render all text. This wasn't a big deal, and it has been a while, so I don't have the error logs anymore. Just wondering if anyone else experienced this, and understands why? > Without seeing the content of the error, it's very hard to say why it might be failing. Can you set text.usetex back to False and send us the error output? >> >> >> Problem 2: (I believe unrelated to 1) >> >> I use the annotate command to add text to my figures, displaying analysis results. >> >> Frequently, when I save the figure as a PDF, these annotated texts do not appear in the saved PDF. I find that if I fiddle with the matplotlib gui figure-window, adjusting the size on my screen, then I can eventually get the saved PDF to contain this text. But this gets very annoying quickly, as almost never is the default size the one needed to properly capture the text in the saved figure, and it requires lots of fine-tuning with trial and error. >> >> If I instead save as PNG, I almost never have this problem (maybe never). >> >> >> Infrequently, the text doesn't even display in the gui window, until I fiddle with the size of the window. >> >> In both cases, NO errors are produced. My script which does the analysis and produces the figures uses >> >> from pylab import * >> >> but otherwise no "*" imports. >> >> >> My old Fink installation doesn't have this problem - but it was moved from my old Mac OSX 10.5 system, and there are some issues with the upgrade to Mac OSX 10.6, which lead me to need to just re-install everything fresh on the 10.6 OS. >> >> >> I am not sure if this problem is specific to Enthought's distribution (the latex tex rendering problem made me suspect this) or is just some bizarre Mac problem or ??? >> >> >> So, does anyone out there have the same or similar problem? And better yet, understand why and how to fix? > Which backend are you using? Can you provide a standalone plot that produces the error? Do any of the included examples (particularly those related to annotate) fail for you? > > Mike > ________________________________________ > From: Andre' Walker-Loud [wal...@gm...] > Sent: Thursday, March 24, 2011 12:35 PM > To: Matplotlib Users > Subject: [Matplotlib-users] matplotlib figures missing text > > Hi All, > > I am having two slight irritating issues making figures with matplotlib (and have not found a solution with Google) > > I am running the Enthought 6.2 distribution (python 2.6, matplotlib 0.99.3, ipython 0.10, ...) which is installed as a Framework on a Mac OSX 10.6 platform. > > I currently am using (matplotlibrc file) > > backend : macosx (I find the same issues with WXAgg and TkAgg as well) > ... > text.usetex : true #use latex for all text handling > > > Both problems began with my Enthought distribution (but for reasons I will spare you, I don't want to switch to a different installation if possible, except upgrade Enthought). > > > Problem 1: > With all my old installations, which existed on previous Mac OSX version (10.5), I did not need to set > > text.usetex : true #use latex for all text handling > > My text rendering worked fine. But with the Enthought version, for some reason, I got fatal errors. So I switched to having latex render all text. This wasn't a big deal, and it has been a while, so I don't have the error logs anymore. Just wondering if anyone else experienced this, and understands why? > > > Problem 2: (I believe unrelated to 1) > > I use the annotate command to add text to my figures, displaying analysis results. > > Frequently, when I save the figure as a PDF, these annotated texts do not appear in the saved PDF. I find that if I fiddle with the matplotlib gui figure-window, adjusting the size on my screen, then I can eventually get the saved PDF to contain this text. But this gets very annoying quickly, as almost never is the default size the one needed to properly capture the text in the saved figure, and it requires lots of fine-tuning with trial and error. > > If I instead save as PNG, I almost never have this problem (maybe never). > > > Infrequently, the text doesn't even display in the gui window, until I fiddle with the size of the window. > > In both cases, NO errors are produced. My script which does the analysis and produces the figures uses > > from pylab import * > > but otherwise no "*" imports. > > > My old Fink installation doesn't have this problem - but it was moved from my old Mac OSX 10.5 system, and there are some issues with the upgrade to Mac OSX 10.6, which lead me to need to just re-install everything fresh on the 10.6 OS. > > > I am not sure if this problem is specific to Enthought's distribution (the latex tex rendering problem made me suspect this) or is just some bizarre Mac problem or ??? > > > So, does anyone out there have the same or similar problem? And better yet, understand why and how to fix? > > > Thanks, > > Andre > > > > > > > > ------------------------------------------------------------------------------ > Enable your software for Intel(R) Active Management Technology to meet the > growing manageability and security demands of your customers. Businesses > are taking advantage of Intel(R) vPro (TM) technology - will your software > be a part of the solution? Download the Intel(R) Manageability Checker > today! http://p.sf.net/sfu/intel-dev2devmar > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
On 03/24/2011 09:35 AM, Andre' Walker-Loud wrote: > Hi All, > > I am having two slight irritating issues making figures with matplotlib (and have not found a solution with Google) > > I am running the Enthought 6.2 distribution (python 2.6, matplotlib 0.99.3, ipython 0.10, ...) which is installed as a Framework on a Mac OSX 10.6 platform. > > I currently am using (matplotlibrc file) > > backend : macosx (I find the same issues with WXAgg and TkAgg as well) > ... > text.usetex : true #use latex for all text handling > > > Both problems began with my Enthought distribution (but for reasons I will spare you, I don't want to switch to a different installation if possible, except upgrade Enthought). > > > Problem 1: > With all my old installations, which existed on previous Mac OSX version (10.5), I did not need to set > > text.usetex : true #use latex for all text handling > > My text rendering worked fine. But with the Enthought version, for some reason, I got fatal errors. So I switched to having latex render all text. This wasn't a big deal, and it has been a while, so I don't have the error logs anymore. Just wondering if anyone else experienced this, and understands why? Without seeing the content of the error, it's very hard to say why it might be failing. Can you set text.usetex back to False and send us the error output? > > > Problem 2: (I believe unrelated to 1) > > I use the annotate command to add text to my figures, displaying analysis results. > > Frequently, when I save the figure as a PDF, these annotated texts do not appear in the saved PDF. I find that if I fiddle with the matplotlib gui figure-window, adjusting the size on my screen, then I can eventually get the saved PDF to contain this text. But this gets very annoying quickly, as almost never is the default size the one needed to properly capture the text in the saved figure, and it requires lots of fine-tuning with trial and error. > > If I instead save as PNG, I almost never have this problem (maybe never). > > > Infrequently, the text doesn't even display in the gui window, until I fiddle with the size of the window. > > In both cases, NO errors are produced. My script which does the analysis and produces the figures uses > > from pylab import * > > but otherwise no "*" imports. > > > My old Fink installation doesn't have this problem - but it was moved from my old Mac OSX 10.5 system, and there are some issues with the upgrade to Mac OSX 10.6, which lead me to need to just re-install everything fresh on the 10.6 OS. > > > I am not sure if this problem is specific to Enthought's distribution (the latex tex rendering problem made me suspect this) or is just some bizarre Mac problem or ??? > > > So, does anyone out there have the same or similar problem? And better yet, understand why and how to fix? Which backend are you using? Can you provide a standalone plot that produces the error? Do any of the included examples (particularly those related to annotate) fail for you? Mike ________________________________________ From: Andre' Walker-Loud [wal...@gm...] Sent: Thursday, March 24, 2011 12:35 PM To: Matplotlib Users Subject: [Matplotlib-users] matplotlib figures missing text Hi All, I am having two slight irritating issues making figures with matplotlib (and have not found a solution with Google) I am running the Enthought 6.2 distribution (python 2.6, matplotlib 0.99.3, ipython 0.10, ...) which is installed as a Framework on a Mac OSX 10.6 platform. I currently am using (matplotlibrc file) backend : macosx (I find the same issues with WXAgg and TkAgg as well) ... text.usetex : true #use latex for all text handling Both problems began with my Enthought distribution (but for reasons I will spare you, I don't want to switch to a different installation if possible, except upgrade Enthought). Problem 1: With all my old installations, which existed on previous Mac OSX version (10.5), I did not need to set text.usetex : true #use latex for all text handling My text rendering worked fine. But with the Enthought version, for some reason, I got fatal errors. So I switched to having latex render all text. This wasn't a big deal, and it has been a while, so I don't have the error logs anymore. Just wondering if anyone else experienced this, and understands why? Problem 2: (I believe unrelated to 1) I use the annotate command to add text to my figures, displaying analysis results. Frequently, when I save the figure as a PDF, these annotated texts do not appear in the saved PDF. I find that if I fiddle with the matplotlib gui figure-window, adjusting the size on my screen, then I can eventually get the saved PDF to contain this text. But this gets very annoying quickly, as almost never is the default size the one needed to properly capture the text in the saved figure, and it requires lots of fine-tuning with trial and error. If I instead save as PNG, I almost never have this problem (maybe never). Infrequently, the text doesn't even display in the gui window, until I fiddle with the size of the window. In both cases, NO errors are produced. My script which does the analysis and produces the figures uses from pylab import * but otherwise no "*" imports. My old Fink installation doesn't have this problem - but it was moved from my old Mac OSX 10.5 system, and there are some issues with the upgrade to Mac OSX 10.6, which lead me to need to just re-install everything fresh on the 10.6 OS. I am not sure if this problem is specific to Enthought's distribution (the latex tex rendering problem made me suspect this) or is just some bizarre Mac problem or ??? So, does anyone out there have the same or similar problem? And better yet, understand why and how to fix? Thanks, Andre ------------------------------------------------------------------------------ Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Angus McMorland, on 2011年03月24日 15:46, wrote: > Hi all, > > I'm trying to get a grid of grids of plots, where the inner grids have > no inter-plot spacing. Is there a recommended way to go about this? > I'm aware AxesGrid can do the no-spacing requirement, but it's not so > obvious that it can be used to nest one grid within another, as > gridspec can. Can the two work together, or can I achieve what I need > with gridspec alone? > I've tried setting the gridspec hspace and wspace both to 0., but that > doesn't force the spacing to be exactly zero. Hi Angus, I think you can get the desired functionality with gridspec alone. Take a look at doc/users/plotting/examples/demo_gridspec06.py which you can find here https://github.com/matplotlib/matplotlib/blob/f1c8/doc/users/plotting/examples/demo_gridspec06.py See also the thread called "How to make a grid of (plot) grids?" from this list in January, 2011 at [1] or [2]: 1. http://old.nabble.com/How-to-make-a-grid-of-%28plot%29-grids--td30581281.html 2. http://www.mail-archive.com/mat...@li.../msg19710.html best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
Hi all, I'm trying to get a grid of grids of plots, where the inner grids have no inter-plot spacing. Is there a recommended way to go about this? I'm aware AxesGrid can do the no-spacing requirement, but it's not so obvious that it can be used to nest one grid within another, as gridspec can. Can the two work together, or can I achieve what I need with gridspec alone? I've tried setting the gridspec hspace and wspace both to 0., but that doesn't force the spacing to be exactly zero. Thanks for any help, Angus. -- AJC McMorland Post-doctoral research fellow Neurobiology, University of Pittsburgh
Hi All, I am having two slight irritating issues making figures with matplotlib (and have not found a solution with Google) I am running the Enthought 6.2 distribution (python 2.6, matplotlib 0.99.3, ipython 0.10, ...) which is installed as a Framework on a Mac OSX 10.6 platform. I currently am using (matplotlibrc file) backend : macosx (I find the same issues with WXAgg and TkAgg as well) ... text.usetex : true #use latex for all text handling Both problems began with my Enthought distribution (but for reasons I will spare you, I don't want to switch to a different installation if possible, except upgrade Enthought). Problem 1: With all my old installations, which existed on previous Mac OSX version (10.5), I did not need to set text.usetex : true #use latex for all text handling My text rendering worked fine. But with the Enthought version, for some reason, I got fatal errors. So I switched to having latex render all text. This wasn't a big deal, and it has been a while, so I don't have the error logs anymore. Just wondering if anyone else experienced this, and understands why? Problem 2: (I believe unrelated to 1) I use the annotate command to add text to my figures, displaying analysis results. Frequently, when I save the figure as a PDF, these annotated texts do not appear in the saved PDF. I find that if I fiddle with the matplotlib gui figure-window, adjusting the size on my screen, then I can eventually get the saved PDF to contain this text. But this gets very annoying quickly, as almost never is the default size the one needed to properly capture the text in the saved figure, and it requires lots of fine-tuning with trial and error. If I instead save as PNG, I almost never have this problem (maybe never). Infrequently, the text doesn't even display in the gui window, until I fiddle with the size of the window. In both cases, NO errors are produced. My script which does the analysis and produces the figures uses from pylab import * but otherwise no "*" imports. My old Fink installation doesn't have this problem - but it was moved from my old Mac OSX 10.5 system, and there are some issues with the upgrade to Mac OSX 10.6, which lead me to need to just re-install everything fresh on the 10.6 OS. I am not sure if this problem is specific to Enthought's distribution (the latex tex rendering problem made me suspect this) or is just some bizarre Mac problem or ??? So, does anyone out there have the same or similar problem? And better yet, understand why and how to fix? Thanks, Andre
Thanks for your help, Michiel. Two follow up points, one concerning the OSX backend and one concerning the QT4 backend: 1) A colleague can reproduce the OSX problem we have talked about, but has never run into it before. We have identical installs of python/matplotlib/etc through MacPorts, however his OSX plots pop up automatically without turning interactive plotting on (pyplot.ion()). I did not have this behavior; show() was required to bring up a plot up until ion() was called. A fresh install (see item 2) has "fixed" this behavior on my machine so that our two installs now behave identically. 2) With an understanding of the importance of a +framework install when using Python/MPL, I wiped my QT4 and pyqt4 installs (again, through MacPorts) and reinstalled. I also reinstalled MPL. Because I have been using all of them for some time, I had many old versions installed but not activated in MacPorts. I removed every old version for all of the programs listed above and started from scratch. I used the +framework variant (also, +quartz). Everything seems to work smoothly now. I'm not sure why; was it the fresh install? was it the +framework variant? This fresh install also seemed to change the MacOSX backend behavior, however I have done nothing different with how I installed MPL. Hopefully, this info is useful to someone down the line. Thanks again to Michiel for his clarifications and help with the OSX backend; it is one of the better backends if you are on a Mac! -dw On Wed, Mar 23, 2011 at 2:34 PM, Michiel de Hoon <mjl...@ya...>wrote: > OK, thanks. I got the same behavior using Python (instead of ipython). > Non-interactive usage has not yet been implemented in the MacOSX backend. > We should be able to fix the bug that you found when implementing > interactive/non-interactive usage for the MacOSX backend. > > Thanks, > --Michiel. > > --- On *Wed, 3/23/11, Daniel Welling <dan...@gm...>* wrote: > > > From: Daniel Welling <dan...@gm...> > Subject: Re: [Matplotlib-users] Qt4 on OSX > To: "Michiel de Hoon" <mjl...@ya...> > Cc: mat...@li... > Date: Wednesday, March 23, 2011, 12:27 PM > > > Greetings again, Michiel. Please excuse my slow response time... > > First, thanks for explaining the Framework stuff; it clarifies situation. > I'll be sure to never blame the OSX backend where it is not warranted! > > Unfortunately (in terms of easy explanations): > In [3]: MacOS.WMAvailable() > Out[3]: True > > crap. > > Fortunately, I've been able to nail down the problem: > bash-3.2$ ipython > Python 2.6.6 (r266:84292, Jan 18 2011, 14:07:55) > Type "copyright", "credits" or "license" for more information. > > IPython 0.10.1 -- An enhanced Interactive Python. > ? -> Introduction and overview of IPython's features. > %quickref -> Quick reference. > help -> Python's own help system. > object? -> Details about 'object'. ?object also works, ?? prints more. > > In [2]: import matplotlib.pyplot as plt > In [3]: plt.plot([0,1]) > Out[3]: [<matplotlib.lines.Line2D object at 0x118c6be90>] > In [4]: plt.show() > (Here, saving the plot works like normal.) > In [5]: plt.ion() > In [6]: plt.plot([0,1]) > Out[6]: [<matplotlib.lines.Line2D object at 0x118c8bc90>] > (Now, when trying to save the plot, the "save" and "cancel" buttons no > longer respond. I must kill python from another terminal.) > > So that's the situation with OSX. It's something that comes up frequently > enough (typically a quick plot turns into a more thorough customization > followed by the lockup) that TK becomes a more viable option for me though > OSX is faster and has better file navigation features. Again, if QT4 was > working, that is certainly my weapon of choice... > > > On Mon, Mar 21, 2011 at 7:14 AM, Michiel de Hoon <mjl...@ya...<http://mc/compose?to=mjl...@ya...> > > wrote: > > --- On *Sun, 3/20/11, Daniel Welling <dan...@gm...<http://mc/compose?to=dan...@gm...> > >* wrote: > > The OSX backend used to have a bug where you cannot type a > > name in the file name text box.Since that has been fixed, ... > That was not a bug in the MacOSX backend (and therefore was not fixed), but > is related to how Python is installed on your system: If your Python is not > a framework installation, it will not interact correctly with Apple's > windowing manager. This is due to OS X itself and is independent of the > MacOSX backend. > > I have found a new bug: every so often, when you go to save a file, the > "save" and "cancel" button stop responding, trapping the user in file saving > limbo. I'll have to play with it again to figure out what triggers this. > > Can you check if your Python is built as a framework? If it is, > MacOS.WMAvailable() should return True: > > $ python > Python 2.7.1 (r271:86832, Mar 12 2011, 13:44:53) > [GCC 4.0.1 (Apple Computer, Inc. build 5370)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import MacOS > >>> MacOS.WMAvailable() > True > >>> > > > Best, > --Michiel. > > > > >
Actually, I got nice results using: legend (title="blah blah"...) Jae-Joon Lee wrote: > The position of the legend is determined at drawing time, so it is a > bit tricky to get it right. > I recommend you to use "annotate" instead. > > ax = subplot(111) > ax.plot([1,2,3], label="u=2,p=3") > leg = ax.legend() > > ann = ax.annotate("Test 2", xy=(0.5, 1.), xycoords=leg.get_frame(), > xytext=(0,10), textcoords="offset points", > va="center", ha="left", > ) > > ann.set_zorder(leg.get_zorder()+0.1) > # the zorder of ann must be higher than leg so that the position of > leg is known when ann gets drawn > > See here for some more details. > > http://matplotlib.sourceforge.net/users/annotations_guide.html#using-complex- coordinate-with-annotation > > Regards, > > -JJ > > > > On Fri, Mar 18, 2011 at 8:31 PM, Neal Becker <ndb...@gm...> wrote: >> My legend is going to have a series of entries that look like: >> >> u=2,p=3 >> u=1,p=4 >> ... >> >> >> I want to add some (short) text that explains what u and p are. >> >> I'm thinking to get the coordinates of the legend box so I can then annotate? >> >> How would I get the coordinates of the legend box? Or is there some >> better/easier way to do what I want? >> >>
The position of the legend is determined at drawing time, so it is a bit tricky to get it right. I recommend you to use "annotate" instead. ax = subplot(111) ax.plot([1,2,3], label="u=2,p=3") leg = ax.legend() ann = ax.annotate("Test 2", xy=(0.5, 1.), xycoords=leg.get_frame(), xytext=(0,10), textcoords="offset points", va="center", ha="left", ) ann.set_zorder(leg.get_zorder()+0.1) # the zorder of ann must be higher than leg so that the position of leg is known when ann gets drawn See here for some more details. http://matplotlib.sourceforge.net/users/annotations_guide.html#using-complex-coordinate-with-annotation Regards, -JJ On Fri, Mar 18, 2011 at 8:31 PM, Neal Becker <ndb...@gm...> wrote: > My legend is going to have a series of entries that look like: > > u=2,p=3 > u=1,p=4 > ... > > > I want to add some (short) text that explains what u and p are. > > I'm thinking to get the coordinates of the legend box so I can then annotate? > > How would I get the coordinates of the legend box? Or is there some > better/easier way to do what I want? > > > ------------------------------------------------------------------------------ > Colocation vs. Managed Hosting > A question and answer guide to determining the best fit > for your organization - today and in the future. > http://p.sf.net/sfu/internap-sfd2d > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
If you want full control of label coordinates, you need to use "Axis.set_label_coords" method. For example, ax = gca() ax.xaxis.set_label_coords(0.5, -0.1) And alternative way is to adjust the padding between the axis and the label. ax.xaxis.labelpad = 0 Regards, -JJ On Mon, Mar 21, 2011 at 3:27 AM, andes <czu...@ya...> wrote: > x = linspace(0,1,10) > y = x**2 > plot(x, y) > xlabel('xname', position=(0.5,0.1)) #<------ > ylabel('yname', position=(0.1,0.5)) #<------
Unfortunately, ticks in colorbar axes work differently. Use something like below instead. cb.formatter.set_scientific(True) cb.formatter.set_powerlimits((0,4)) cb.update_ticks() Regards, -JJ On Mon, Mar 21, 2011 at 11:26 PM, johanngoetz <jg...@uc...> wrote: > > Is there a way to set the style and scilimits to the colorbar axes? All my > attempts failed. For example, run the following script, I get the error > shown below: > > ### begin example script > import numpy > from matplotlib import pyplot > > n = 5000000 > x = numpy.random.standard_normal(n) > y = 2.0 + 3.0 * x + 4.0 * numpy.random.standard_normal(n) > xmin = x.min() > xmax = x.max() > ymin = y.min() > ymax = y.max() > > hist, edges = numpy.histogramdd([y,x], bins=[25,25], > range=[[ymin,ymax], [xmin,xmax]]) > extent = [xmin, xmax, ymin, ymax] > > fig = pyplot.figure() > ax = fig.add_subplot(1,1,1) > plt = ax.imshow(hist, > extent = extent, > origin = 'lower', > interpolation = 'nearest', > aspect = 'auto') > cb = fig.colorbar(plt, ax=ax) > > # This causes an AttributeError exception > cb.ax.ticklabel_format(style='sci', scilimits=(0,4)) > > pyplot.show() > ### end example script > > > > >> python cb_scilim_test.py > > Traceback (most recent call last): > File "cb_scilim_test.py", line 25, in <module> > cb.ax.ticklabel_format(style='sci', scilimits=(0,4)) > File "/usr/lib64/python2.7/site-packages/matplotlib/axes.py", line 2117, > in ticklabel_format > "This method only works with the ScalarFormatter.") > AttributeError: This method only works with the ScalarFormatter. > > -- > View this message in context: http://old.nabble.com/colorbar-and-scilimits-tp31201133p31201133.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Colocation vs. Managed Hosting > A question and answer guide to determining the best fit > for your organization - today and in the future. > http://p.sf.net/sfu/internap-sfd2d > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >