From: chombee <ch...@ne...> - 2008-02-05 20:17:48
|
Could anyone advise me or give me an example of how to prevent a legend from obscuring a plot, or how I could do this better: http://www.23hq.com/seanh/photo/2862125/view-large I tried moving the legend out of the way using (x,y) coords but if I move it out of the axes viewport it also moves out of the figure, and it looks silly anyway. I also tried increasing the limits of the axes beyond those of the data, but that looked silly too. And I tried to change the font size of the legend but couldn't get it to work. I think what I need is legends that are outside of the axes viewport but still inside the figure (the figure needs to get larger) and that are in a smaller font. Btw I know I should round off my statistical numbers but that isn't going to fix it completely. Thanks! |
From: John H. <jd...@gm...> - 2008-02-05 21:20:41
|
On Feb 5, 2008 2:17 PM, chombee <ch...@ne...> wrote: > Could anyone advise me or give me an example of how to prevent a legend > from obscuring a plot, or how I could do this better: > > http://www.23hq.com/seanh/photo/2862125/view-large > > I tried moving the legend out of the way using (x,y) coords but if I > move it out of the axes viewport it also moves out of the figure, and it > looks silly anyway. I also tried increasing the limits of the axes > beyond those of the data, but that looked silly too. And I tried to > change the font size of the legend but couldn't get it to work. You could use custom axes (rather than subplots) and a figlegend, eg http://matplotlib.sf.net/examples/figlegend_demo.py JDH |
From: chombee <ch...@ne...> - 2008-02-06 16:57:49
|
On Tue, 2008-02-05 at 15:20 -0600, John Hunter wrote: > On Feb 5, 2008 2:17 PM, chombee <ch...@ne...> wrote: > > Could anyone advise me or give me an example of how to prevent a legend > > from obscuring a plot, or how I could do this better: > > > > http://www.23hq.com/seanh/photo/2862125/view-large > > > > I tried moving the legend out of the way using (x,y) coords but if I > > move it out of the axes viewport it also moves out of the figure, and it > > looks silly anyway. I also tried increasing the limits of the axes > > beyond those of the data, but that looked silly too. And I tried to > > change the font size of the legend but couldn't get it to work. > > You could use custom axes (rather than subplots) and a figlegend, eg > > http://matplotlib.sf.net/examples/figlegend_demo.py > > JDH Thanks for that. Once I also rounded my statistical results using builtin round it worked perfectly: http://img215.imageshack.us/img215/7664/figure1pr2.png |