Hi Georg,

I did this by following Joe Kington's answer at
http://stackoverflow.com/questions/4700614/how-to-put-the-legend-out-of-the-plotand
also taking a quick glance at the matplotlib1DViewer.py code in fipy
(to figure out how to reference the axes). Here's example fipy-based script
with the legend off to the right: http://pastebin.com/vD2hF4WY

Cheers,
Ray


On Wed, Jun 12, 2013 at 12:11 PM, Georg Walther <[email protected]>wrote:

> Hi,
>
>
> I have searched the mailing list for the term 'legend' and have not yet
> found the answer to my question.
>
> I run FiPy 3.0 and for 1D plots would like to place the legend outside
> the plotting area so as not to obstruct any lines.
>
> My FiPy seems to be set up to interface with Matplotlib.
>
> When calling this:
>
> fp.Viewer(vars=(variable_1, variable_2),
>                       datamin=-.1, datamax=1.1)
>
> the legend usually ends up obstructing lines in my graph.
>
> I am aware of the legend='right', etc. options but all of these will
> place the legend inside the axes.
>
>
> I can call this:
>
> fp.Viewer(vars=(active, inactive, heterodimer),
>                       datamin=-.1, datamax=1.1, legend=((1.0, 0.5)))
>
> to place the legend outside the axes but this cuts off the legend as the
> resultant figure is not resized to show both the plot and the legend.
>
>
> Thank you for a generally fantastic package!
>
>
> Georg
>
> _______________________________________________
> fipy mailing list
> [email protected]
> http://www.ctcms.nist.gov/fipy
>   [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
>
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to