plotyy problems and change proposal

John W. Eaton jwe at bevo.che.wisc.edu
Mon Dec 3 13:40:15 CST 2007


On  3-Dec-2007, David Bateman wrote:

| Michael Goffioul wrote:
| > On 12/2/07, David Bateman <adb014 at gmail.com> wrote:
| >   
| >> What I meant is that there is nothing to stop you changing the
| >> properties of one of the axis objects and that without listeners there
| >> is no way to get these changes automatically reflected in the second set
| >> of axis. In fact its probably better for the gnuplot code to calculate
| >> the size of the axis automatically for first axis and use that to force
| >> the size of the second axis..
| >>     
| >
| > You can also screw up the plot in Matlab:
| >
| > h = plotyy(1:10, rand(1,10), 1:10, rand(1,10))
| > set(h(1), 'position', [0.5 0.5 0.4 0.4])
| >
| > There's no listener on the position property. However, both axes are given
| > the same position in normalized units (not the outerposition). This means
| > that when resizing the figure window, the axes will still be aligned; no
| > listener is needed.
| >
| >   
| >> Alright, then what about the attached. Does this do what you want?
| >>     
| >
| > This looks good. Although I would avoid hardcoding twice the axes position
| > and use something like set(ax(2), 'position', get(ax(1), 'position')).
| >
| > Michael.
| >
| >   
| Ok, then use this instead.

Please check in this change.

Thanks,

jwe


More information about the Octave-maintainers mailing list