octave-maintainers
[Top][All Lists]
Advanced

[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: Thu, 25 Jul 2013 18:21:20 +0200

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?

Ben



reply via email to

[Prev in Thread] Current Thread [Next in Thread]