help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subplots with Gnuplot: Two y-axes?


From: Tatsuro MATSUOKA
Subject: Re: Subplots with Gnuplot: Two y-axes?
Date: Tue, 25 Aug 2015 20:14:42 +0900 (JST)

----- Original Message -----

> From: Martin Kunz 
> To: help-octave
> Cc: 
> Date: 2015/8/25, Tue 18:36
> Subject: Subplots with Gnuplot: Two y-axes?
> 
> Hi,
> 
> I would like to create a column of three subplots where the second plot
> has its y-axis on the right-hand side. Example code:
> 
> graphics_toolkit ("gnuplot");
> 
> figure(1)
> clf;
> hAx(1) = subplot(3,1,1);
> plot(5,5);
> hAx(2) = subplot(3,1,2);
> plot(10:-1:1);
> hAx(3) = subplot(3,1,3);
> plot(10:20)
> set(hAx(2),"yaxislocation","right")
> 
> For some reason the third plot has a correct y-axis on the left side,
> but additionally the y-axis of the second plot on the right (see
> attached screenshot). Scrolling in the third subplot vertically moves
> both y-axes, so they seem to belong to one axis object, not two on top
> of each other.
> I cannot even find the duplicate yticklabels:
> 
>>>  get (1,"children")
> ans =
> 
>   -201.90
>   -207.46
>   -213.86
> 鉢>> get(get(1,"children")(1),"yticklabel")
> ans =
> {
>   [1,1] = 10
>   [1,2] = 12
>   [1,3] = 14
>   [1,4] = 16
>   [1,5] = 18
>   [1,6] = 20
> }
> 
> (Note that the first child of the figure is the lowest axis object)
> 
> Is this a bug in Gnuplot? Do you have any ideas for a workaround?
> 
> I am using Octave 3.0.0-rc4 under Windows 7 with the bundled Gnuplot 4.6
> binary.
> Thanks for any help!
> Martin


I have execute the commandon qt and fltk graphics toolkit. 
Subplots work as expected.
I do not know that this is gnuplot a bug or an error in octave handling of 
gnuplot.

Workaround is to use qt or fltk graphics toolkit.


BTW, "Octave 3.0.0-rc4 under Windows 7"=> perhaps Octave 4.0.0-rc4? right ?


Tatsuro



reply via email to

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