[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to initialize "tightinset" for new axes?
From: |
Ben Abbott |
Subject: |
Re: how to initialize "tightinset" for new axes? |
Date: |
Sat, 27 Jul 2013 21:42:19 -0400 |
On Jul 27, 2013, at 8:41 PM, Michael Goffioul wrote:
> On Sat, Jul 27, 2013 at 12:37 PM, Ben Abbott <address@hidden> wrote:
> On Jul 25, 2013, at 2:29 PM, Ben Abbott wrote:
>
> > On Jul 25, 2013, at 6:52 PM, Michael Goffioul wrote:
> >
> >> On Thu, Jul 25, 2013 at 12:21 PM, Ben Abbott <address@hidden> wrote:
> >>
> >> On Jul 25, 2013, at 2:32 PM, Michael Goffioul wrote:
> >>
> >>> On Thu, Jul 25, 2013 at 8:13 AM, Ben Abbott <address@hidden> wrote:
> >>>
> >>> On Jul 25, 2013, at 1:28 PM, Michael Goffioul wrote:
> >>>
> >>>> On Thu, Jul 25, 2013 at 5:52 AM, Ben Abbott <address@hidden> wrote:
> >>>> The tightinset property for axes is not being initialized properly for
> >>>> new axes. I'm unfamiliar with how should be done .... but .... do we
> >>>> essentially need to add
> >>>>
> >>>> sync_positions ();
> >>>>
> >>>> ... to graphics.cc(axes::initialize)?
> >>>>
> >>>> void
> >>>> axes::initialize (const graphics_object& go)
> >>>> {
> >>>> base_graphics_object::initialize (go);
> >>>>
> >>>> xinitialize (xproperties.get_title ());
> >>>> xinitialize (xproperties.get_xlabel ());
> >>>> xinitialize (xproperties.get_ylabel ());
> >>>> xinitialize (xproperties.get_zlabel ());
> >>>> }
> >>>>
> >>>> Since sync_positions() is out of the scope of axes::initialize, how can
> >>>> that be done?
> >>>>
> >>>> I'm not sure, but the above seems like a valid candidate. Just give it a
> >>>> try.
> >>>>
> >>>> Michael.
> >>>
> >>> I get a scoping error.
> >>>
> >>> corefcn/graphics.cc: In member function 'virtual void
> >>> axes::initialize(const graphics_object&)':
> >>> corefcn/graphics.cc:6901:19: error: 'sync_positions' was not declared in
> >>> this scope
> >>>
> >>> sync_positions is defined in the properties, so it has to be
> >>> "xproperties.sync_positions ()". But even then, sync_positions is
> >>> declared private, so it might not work out of the box. You may need to
> >>> move it to the public section.
> >>>
> >>> Michael.
> >>
> >> I'm not exactly following along :-(
> >>
> >> I think I can figure out the public/private part, but I don't see how the
> >> xproperties works. Is there another public function which I can use as an
> >> example to get started?
> >>
> >> First, it would be easier that you provide what you're tried so far.
> >>
> >> Michael.
> >
> > Ok. I tried several things, but didn't do anything systematic. I may not
> > have time to document what I've tried for a few days, but i"ll get to it as
> > soon as I have the spare time.
>
> My problem was determining where the public section was. Without the
> attached patch ...
>
> close all
> axes
> get (gca, 'tightinset')
> ans = 0 0 0 0
>
> ... And with the changeset
>
> close all
> axes
> get (gca (), "tightinset")
> ans = 0.046429 0.042868 0.000000 0.023810
>
> If the patch looks ok, I'll push.
>
> Looks fine to me.
>
> Michael.
Thanks. I pushed the change.
http://hg.savannah.gnu.org/hgweb/octave/rev/786bcce466e9
Ben
- how to initialize "tightinset" for new axes?, Ben Abbott, 2013/07/25
- Re: how to initialize "tightinset" for new axes?, Michael Goffioul, 2013/07/25
- Re: how to initialize "tightinset" for new axes?, Ben Abbott, 2013/07/25
- Re: how to initialize "tightinset" for new axes?, Michael Goffioul, 2013/07/25
- Re: how to initialize "tightinset" for new axes?, Ben Abbott, 2013/07/25
- Re: how to initialize "tightinset" for new axes?, Michael Goffioul, 2013/07/25
- Re: how to initialize "tightinset" for new axes?, Ben Abbott, 2013/07/25
- Re: how to initialize "tightinset" for new axes?, Ben Abbott, 2013/07/27
- Re: how to initialize "tightinset" for new axes?, Michael Goffioul, 2013/07/27
- Re: how to initialize "tightinset" for new axes?,
Ben Abbott <=