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
(4) |
2
(20) |
3
(8) |
4
(10) |
5
(4) |
6
(8) |
7
(4) |
|
8
(9) |
9
(11) |
10
(12) |
11
(13) |
12
(3) |
13
(17) |
14
(4) |
|
15
|
16
(10) |
17
(9) |
18
(11) |
19
(4) |
20
(17) |
21
(6) |
|
22
(9) |
23
(35) |
24
(17) |
25
(9) |
26
(16) |
27
(17) |
28
(14) |
|
From: lionel k. <lio...@gm...> - 2009-02-27 22:29:49
|
Hello all, I'd like to create a "matplotlib.pyplot.figure(...)" object and specify the size while I'm at it. I see this argument list from the matplotlib's documentation: pyplot.figure(num=None, figsize=(8, 6), dpi=80, facecolor='w', edgecolor='k') The on-screen size is being computed using inches (for height and width) and dpi. But I don't know what the dpi is in advance. What can I do? In case it's relevant, I'm using Python 2.5 and the latest download of matplotlib. Thanks in advance. -L |
|
From: David H. <dav...@gm...> - 2009-02-27 22:05:26
|
I'd also be interested in a workaround. I tried to remove the tick labels from the second axe, but it also removed the labels from the first axe. Thanks, David On Sun, Feb 8, 2009 at 9:14 AM, Christoffer Aberg < Chr...@fk...> wrote: > Hi all, > > I have noticed a funny behaviour when using twinx to do two plots on the > same axes: the xticklabels are printed twice, once for each axes. This > shows up as slightly thicker labels than for a single axes. It is > particularly visible for ps or pdf output, but can be seen also in an > interactive session. > > I can also see this in the figure shown for the two_scales.py example > (http://matplotlib.sourceforge.net/_images/two_scales.png), where the > xticklabels are thicker than the yticklabels (though it is not so > apparent due to different colours. I therefore assume it is not just my > installation. (Adding > > for tl in ax2.get_xticklabels(): > tl.set_fontsize(16) > > just before the last plt.show() in two_scales.py makes it even more > visible) > > Does anyone know of a reasonable work-around? Surely it is not the > intended behaviour? > > Thanks for any help, > Christoffer Åberg > > > > ------------------------------------------------------------------------------ > Create and Deploy Rich Internet Apps outside the browser with > Adobe(R)AIR(TM) > software. With Adobe AIR, Ajax developers can use existing skills and code > to > build responsive, highly engaging applications that combine the power of > local > resources and data with the reach of the web. Download the Adobe AIR SDK > and > Ajax docs to start building applications today- > http://p.sf.net/sfu/adobe-com > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Eric F. <ef...@ha...> - 2009-02-27 21:25:31
|
Hansen, Dr. Jim wrote: > Hello All > > I'm making the transition from Matlab to Python/Pylab/matplotlib, etc. > > In Matlab contour plots I can specify the rotation angle of contour labels (e.g. rotation=0). I'm unable to figure out the equivalent in matplotlib's clabel. The inline documentation doesn't mention the option, but I'm confident there's a workaround. with ipython -pylab: CS = contour(rand(20,30)) tl = CS.clabel() setp(tl, rotation=0) Eric |
|
From: Hansen, D. J. <jim...@nr...> - 2009-02-27 21:14:17
|
Hello All I'm making the transition from Matlab to Python/Pylab/matplotlib, etc. In Matlab contour plots I can specify the rotation angle of contour labels (e.g. rotation=0). I'm unable to figure out the equivalent in matplotlib's clabel. The inline documentation doesn't mention the option, but I'm confident there's a workaround. Best, Jim |
|
From: Jae-Joon L. <lee...@gm...> - 2009-02-27 20:31:46
|
I recommend you to use the Wedge class in matplotlib.patches.
from matplotlib.patches import Wedge
# draw a wedge in the axes coordinate. (0.5, 0.5) in axes coordinate
corresponds to (0,0) in polar coordinate.
trans = ax.transAxes
center, R = (0.5, 0.5), 0.5
twopi=360.
pie1 = Wedge(center, R, 0, r1*twopi, fc="g")
pie2 = Wedge(center, R, r1*twopi, r2*twopi, fc="y")
pie3 = Wedge(center, R, r2*twopi, twopi, fc="r")
for mypie in [pie1, pie2, pie3]:
mypie.set_transform(trans)
mypie.set_alpha(0.25)
mypie.set_ec("none")
ax.add_patch(mypie)
-JJ
On Thu, Feb 26, 2009 at 5:00 PM, bubye <joe...@gm...> wrote:
>
> I made a little more progress, but i'm not sure i'm doing this the right way.
> Suggestions?
>
> from pylab import *
> import numpy as np
>
> #generate random temperature data
> snp=[]
> for i in range(0,65):
> snp.append(np.random.randint(35,122))
>
> #hide the labels. I don't want them.
> rc('xtick', labelsize=0)
> rc('ytick', labelsize=0)
>
> fig=figure(figsize=(8,8),facecolor='0.0')
>
> ax = fig.add_subplot(111,polar=True,frameon=False)
> tempTuple=array(snp)
> r = tempTuple/10
> theta = ((tempTuple*2.9508)*pi)/180
> area = r**2*(tempTuple/5.4)
> colors = theta
>
> #this is the fancy green,yellow,red background
> #it's actually a scatter plot that sits behind (zorder)
> #of the rest of the scatter plots.
>
> #radius
> r1 = 0.7 # 20%
> r2 = r1 + 0.2 # 40%
>
> # define some sizes of the scatter marker
> sizes = [55000]
> x = [0] + np.cos(np.linspace(0, 2*math.pi*r1, 100)).tolist()
> y = [0] + np.sin(np.linspace(0, 2*math.pi*r1, 100)).tolist()
> xy1 = zip(x,y)
>
> x = [0] + np.cos(np.linspace(2*math.pi*r1, 2*math.pi*r2, 100)).tolist()
> y = [0] + np.sin(np.linspace(2*math.pi*r1, 2*math.pi*r2, 100)).tolist()
> xy2 = zip(x,y)
>
> x = [0] + np.cos(np.linspace(2*math.pi*r2, 2*math.pi, 100)).tolist()
> y = [0] + np.sin(np.linspace(2*math.pi*r2, 2*math.pi, 100)).tolist()
> xy3 = zip(x,y)
>
> ax.scatter([0,0,0], [0,0,0], marker=(xy1,0), s=sizes,
> facecolor='green',alpha=.25,zorder=1)
> ax.scatter([0,0,0], [0,0,0], marker=(xy2,0), s=sizes, facecolor='yellow'
> ,alpha=.25,zorder=1)
> ax.scatter([0,0,0], [0,0,0], marker=(xy3,0), s=sizes,
> facecolor='red',alpha=.25,zorder=1)
> ax.scatter(theta, r, c=colors, s=area,zorder=2)
> ax.grid(False)
>
> show()
>
> --
> View this message in context: http://www.nabble.com/polar-graph-tp22230232p22234721.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Kasper P. <kas...@ae...> - 2009-02-27 18:09:07
|
Hi all, (A bit off-topic, hope this is ok, please redirect me if this is more appropriate on a different list). I am interested in using the mathtext rendering functionality separate from the plotting part of matplotlib. To be precise, I would like to use mathtext as a replacement mathematics renderer in the notebook front-end of my symbolic computer algebra system 'cadabra', http://www.aei.mpg.de/~peekas/cadabra/ (right now I am using latex/dvipng to render mathematical expressions, which is slow and not very flexible). I would prefer to use mathtext to render onto a cairo drawing surface (since I already have plans to use cairo to improve the front-end). Are there any examples showing how to do this, or could someone perhaps post a small code snippet to get me started? Thanks! Cheers, Kasper |
|
From: Christopher B. <Chr...@no...> - 2009-02-27 17:30:34
|
Michael Droettboom wrote: > Which backend are you using? I don't see any explicit calls to chdir in > matplotlib that would make this happen. It would certainly be > unintentional if it is. I don't know about any other back-ends, but the wx FileDialog has an option to change the working dir when the user selects a file I also don't know if this flag is set in the MPL code, but it shouldn't be. > Søren Nielsen wrote: >> my program can >> no longer locate the icons (used in my GUI) that I am using in my >> .\ressources directory. So saving the plot changed the working >> directory of my program? >> How do I change it back? Isn't this an error in matplotlib? I'd say yes, but it's also an error in the design of your code -- as you've discovered, the working dir is a tenuous concept -- you should set that resources dir in your code start-up and keep it around for when you need it. wxPython has wx.StandardPaths which can be helpful for finding your aps data, etc -- I'm sure the other toolkits have something, too. -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: Eric F. <ef...@ha...> - 2009-02-27 16:48:28
|
Matthias Michler wrote: > On Thursday 26 February 2009 20:52:17 Christopher Brown wrote: >> Hi, >> >> If I have a figure: >> >> h = pp.figure(num=14) >> >> What is the best way to check to see if Figure 14 exists? I'm writing a >> function that adds plots to a figure window. I want the function to >> check if the figure exists, and if so, turn off autoscaling (using >> Eric's suggested axes.set_autoscale_on(False)) in case the user has zoomed. > > Hi Christopher, > > I don't know if my suggestion is the best way, but at least it may be > useful ... I think your suggestion is the only way at present, but it suggests that we should provide this capability as part of the API; we don't want to force people to access the private _pylab_helpers module directly. Eric > > regards Matthias > > example code: > > import matplotlib > import matplotlib.pyplot as plt > > > for i in range(5)+[14]: > plt.figure(i) # generating some figures > > # get the figure numbers of all existing figures > fig_numbers = [x.num > for x in matplotlib._pylab_helpers.Gcf.get_all_fig_managers()] > > if 14 in fig_numbers: > print "figure 14 exists" > > if plt.figure(14).number in fig_numbers: > print "figure 14 exists" > > > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Michael D. <md...@st...> - 2009-02-27 13:44:02
|
Which backend are you using? I don't see any explicit calls to chdir in matplotlib that would make this happen. It would certainly be unintentional if it is. Mike Søren Nielsen wrote: > Hi, > > When I save a plot using the toolbar save function, and I save to a > different directory than the one where my program is, my program can > no longer locate the icons (used in my GUI) that I am using in my > .\ressources directory. So saving the plot changed the working > directory of my program? > > How do I change it back? Isn't this an error in matplotlib? > > Thanks > Soren > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: Michael D. <md...@st...> - 2009-02-27 13:38:18
|
Gökhan SEVER wrote: > Hello, > > My first message in the list. I would like to mention a few things > about the matplotlib PDF document. > > Firstly, the download link for the pdf document (@ > http://matplotlib.sourceforge.net/contents.html) is for release > 0.98.5.1, compiled on December 17, instead of 0.98.5.2, on Dec-18. Thanks. I don't recall the current policy under which documentation is being pushed to the site, so I'll leave that for others to address. > > Next, is there a way to get functions separately listed under each > bookmark listing in the pdf file? For example if I go IV Matplotlib > API section from the bookmarks menu and click the matplotlib.pyplot > seb-menu I would like to see the function names listed. In addition to > module indexing (where keywords highlighted back to original names) > this would be a nice feature to add the pdf documentation. This sounds like something to be added/fixed within the documentation system we use -- Sphinx. If you want to tackle this yourself, I would head over there and read some documentation and mailing lists and see if it's been done -- otherwise pursue what it might take to make it work. We would definitely welcome this change. Mike -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: Michael D. <md...@st...> - 2009-02-27 13:36:01
|
There are obviously geometric solutions to this that wouldn't require interpolation -- though the interpolation is a good easy workaround. I think it would be great to file a bug for this in the tracker so it doesn't get forgotten. Mike Ryan Wagner wrote: > > Is this a bug in fill_between, or is there a known workaround? > > In the attached picture, I’m calling fill_between as follows, and I > can’t fill the entire area between the line (50+thresh) and the > signal, s. I realize that the areas that aren’t filled are boundary > conditions, but there should be some sort of interpolation I can do to > fix this I would think… > > ax.fill_between(stockData.inds, s[stockData.rinds], 50+thresh, > where=s[stockData.rinds]>50+thresh, color=color, alpha=0.3 ) > > So for example: stockData.inds = range(6), s[stockData.rinds] = > [20,30,70,80,40,20] and thresh = 0. I need the areas filled with color > where stockData.rinds is greater than 50. It does fully fill in the > xrange(2,3), but the border conditions xrange(1,2) and xrange(3,4) are > not fully filled under the line. > > I had the same problem with fill_over and was hoping it would be > resolved with the move to fill_between. Any ideas? > > -Ryan > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: Michael D. <md...@st...> - 2009-02-27 13:34:56
|
It seems the Freetype rendering backend wasn't doing subpixel alignment
on the text, but was being rounded to the nearest pixels. Taking the
fractional part into account seems to resolve this. Fixed on branch and
trunk.
Mike
Ryan May wrote:
> And here's the image I promised.
>
> On Wed, Feb 25, 2009 at 3:13 PM, Ryan May <rm...@gm...
> <mailto:rm...@gm...>> wrote:
>
> Hi,
>
> When I combine mathtext with the stixsans fonts while
> mathtext.default is set to 'regular', horizontal text is not
> vertically aligned properly, like the baseline is moving. I've
> attached an image of what I see when I run the following code. It
> should be noted that I don't see anything like this on the
> vertical axis, and it all goes away if I stop using mathtext.
>
> import matplotlib.pyplot as plt
> from matplotlib import rcParams
> rcParams['font.size'] = 12.0
> rcParams['mathtext.default'] = 'regular'
> rcParams['mathtext.fontset'] = 'stixsans'
>
> fig = plt.figure()
>
> plt.xlabel('ItLooksToMeLikeTheBaselineMoves $(g m^{-3})$')
> plt.ylabel('ItLooksToMeLikeTheBaselineMoves $(db km^{-1})$')
> plt.show()
>
>
> Thoughts? Am I doing something bad? Can anyone else reproduce this?
>
> Ryan
>
> --
> Ryan May
> Graduate Research Assistant
> School of Meteorology
> University of Oklahoma
> Sent from: Norman Oklahoma United States.
>
>
>
>
> --
> Ryan May
> Graduate Research Assistant
> School of Meteorology
> University of Oklahoma
> Sent from: Norman Oklahoma United States.
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> ------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
|
|
From: mochuk <to...@gm...> - 2009-02-27 12:52:12
|
Hi all, Johan Ekh-2 wrote: > > > What is the most convenient way to get Matplotlib to use the same fonts as > my main document and also to quickly switch between the > different document types? > > Take a look at: http://dtrx.de/od/tex/sfmath.html You have to load the package in the preambel of LaTeX. For matplotlib this can be done by adding "text.latex.preamble : \usepackage{sfmath}" to your matplotlibrc. Best regards, Tobias -- View this message in context: http://www.nabble.com/Switching-between-different-font-settings-tp21279388p22245329.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: mochuk <to...@gm...> - 2009-02-27 12:48:55
|
Hi all, Johan Ekh-2 wrote: > > > What is the most convenient way to get Matplotlib to use the same fonts as > my main document and also to quickly switch between the > different document types? > > Take a look at: http://dtrx.de/od/tex/sfmath.html Best regards, Tobias -- View this message in context: http://www.nabble.com/Switching-between-different-font-settings-tp21279388p22245251.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Søren N. <sor...@gm...> - 2009-02-27 09:27:02
|
Hi, When I save a plot using the toolbar save function, and I save to a different directory than the one where my program is, my program can no longer locate the icons (used in my GUI) that I am using in my .\ressources directory. So saving the plot changed the working directory of my program? How do I change it back? Isn't this an error in matplotlib? Thanks Soren |
|
From: Søren N. <sor...@gm...> - 2009-02-27 07:29:49
|
Thanks JJ! It does, and you are exactly right, letting the legend "grow" downward while holding the value of the lower left corner doesn't make sense.. I tried calculating an offset, but the patch is a much nicer fix! Soren On Thu, Feb 26, 2009 at 9:27 PM, Jae-Joon Lee <lee...@gm...> wrote: > On Thu, Feb 26, 2009 at 4:51 AM, Søren Nielsen > <sor...@gm...> wrote: > > I've tried placing a legend using the loc = (x,y) .. and the legend is > moved > > where I want it. the problem is, when I add new lines to the plot.. the > > legend grows, but upwards.. so the lower left point of the legend box is > > constant.. but that's not the logical way for a legend box to grow.. > > shouldn't it grow downwards, just like when I use the standard loc = 1 > > (upper right position) . > > Well, technically, legend never grows. Whenever you call legend(), a > new legend instance is created and the old one is just destroyed. > Anyhow, as far as I can tell, the (x,y) coordinates given to the *loc* > parameter has been the coordinate of the lower left corner of the > legend (but I don't think this is clearly specified in the > documentation). Therefore, I don't think it is a good idea to make the > legend grow(?) downward while you're supplying a fixed coordinate of > the lower left corner. This is hardly possible and it seems to make > little sense to me. > > Anyhow, I just submitted a patch to the svn that add an optional > *bbox_to_anchor* argument for the legend class. This lets you specify > the bbox that the legend will be anchored (the default is the bbox of > the parent). > > For example, > > legend(loc="upper left", bbox_to_anchor=[0.0, 0.5]) > > will create an legend with its upper left corner at (0.0, 0.5), and it > will grow downward. Note that when len(bbox_to_anchor)==2, a bbox with > zero width and zero height is created. > > I hope this suits your need. > > -JJ > > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, > CA > -OSBC tackles the biggest issue in open source: Open Sourcing the > Enterprise > -Strategies to boost innovation and cut costs with open source > participation > -Receive a $600 discount off the registration fee with the source code: > SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |