[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: legend location 'outside' not working
From: |
Ben Abbott |
Subject: |
Re: legend location 'outside' not working |
Date: |
Tue, 14 Sep 2010 07:43:48 -0400 |
On Sep 13, 2010, at 11:18 PM, Bob Lounsbury wrote:
> On Mon, Sep 13, 2010 at 8:32 PM, Ben Abbott <address@hidden> wrote:
> On Sep 13, 2010, at 10:15 PM, Bob Lounsbury wrote:
>
> > On Mon, Sep 13, 2010 at 6:17 AM, Ben Abbott <address@hidden> wrote:
> >> On Sep 13, 2010, at 7:56 AM, Bob Lounsbury wrote:
> >>
> >> > On Sun, Sep 12, 2010 at 7:05 PM, Ben Abbott <address@hidden> wrote:
> >> > On Sep 12, 2010, at 8:20 PM, Bob Lounsbury wrote:
> >> >
> >> > > I've searched and searched and not found a clear answer, thought it
> >> > > would be better to email the pro's.
> >> > >
> >> > > Here's my issue ... In Octave 3.0.5:
> >> > >
> >> > > > plot(0:10)
> >> > > > legend('linear','location','eastoutside')
> >> > >
> >> > > works as expected with the legend to the outside of the plot.
> >> > >
> >> > > However, in Octave 3.2.3 the same code produces a legend inside the
> >> > > plot not outside. Has this been fixed in Octave 3.2.4? How do I get
> >> > > the legend to the outside of the plot area?
> >> > >
> >> > > Thanks,
> >> > > Bob
> >> >
> >> > Version 3.2.3 moved closer to compatibility with Matlab. However, the
> >> > behavior of the legend is an exception to that. The developers are
> >> > currently working on this problem.
> >> >
> >> > As a work around, you can modify the axis plotbox position by. For
> >> > example ...
> >> >
> >> > x = 0:0.1:10;
> >> > plot (x, sin (x), x, cos (x))
> >> > set (gca, "position", get (0, "defaultaxesposition") + [0, 0, -1,
> >> > 0] * 0.05)
> >> > xlabel ("Angle, radians")
> >> > ylabel ("Amplitude")
> >> > legend ({"sin(x)", "cos(x)"}, "location", "eastoutside")
> >> >
> >> > Ben
> >> >
> >> >
> >> > In Octave 3.2.3 the legend is still inside the plot with your example.
> >> > See attached figure. Maybe this is a version issue. Do I need to try and
> >> > compile the latest version?
> >> >
> >> > Thanks,
> >> > Bob
> >> > <sincos.eps>
> >>
> >> hmmm ... something is strange.
> >>
> >> That example works form me running both 3.2.3 and the deveoper's sources.
> >>
> >> After the plot, what do you get when you type ...
> >>
> >> get (gca, "position")
> >>
> >> Ben
> >
> > octave-3.2.3:7> get(gca,"position")
> > ans =
> >
> > 0.13000 0.11000 0.72500 0.81500
> >
>
> Those are correct values.
>
> I took a second look at Octave 3.2.3. I'm getting the same result. I
> apologize for my confusion. I see the proper behavior in 3.0.5 and in the
> developers sources, but see the same as you for 3.2.3.
>
> Sorry I don't have a work around for 3.2.3.
>
> Ben
>
> Thanks for the effort anyway. Is it working in 3.2.4? If so, I'll just
> install that.
Unfortunately it i s not.
Ben
- legend location 'outside' not working, Bob Lounsbury, 2010/09/12
- Re: legend location 'outside' not working, Ben Abbott, 2010/09/12
- Re: legend location 'outside' not working, Bob Lounsbury, 2010/09/13
- Re: legend location 'outside' not working, Ben Abbott, 2010/09/13
- Re: legend location 'outside' not working, Bob Lounsbury, 2010/09/13
- Re: legend location 'outside' not working, Ben Abbott, 2010/09/13
- Re: legend location 'outside' not working, Bob Lounsbury, 2010/09/13
- Re: legend location 'outside' not working,
Ben Abbott <=
- Re: legend location 'outside' not working, Bob Lounsbury, 2010/09/14