Two scales in the same y axis

  • Follow


Pals,
         Is it possible to put two different scales (like kg/s   and
lb/s) one to the left side, the other to the right side of the same
vertical axis (let's say, the yaxis)?
         Thanks for any help.

         Oscar
0
Reply oscar.rotava (1) 11/13/2009 1:05:41 PM

rotava wrote:
>          Is it possible to put two different scales (like kg/s   and
> lb/s) one to the left side, the other to the right side of the same
> vertical axis (let's say, the yaxis)?

Not really.  gnuplot only supports putting separate scales on the left 
and right side of the entire graph, or to both sides of the zeroaxis. 
So the only way this would work is if x=0 happened to be exactly where 
you want that doubly annotated axis to be.  And we don't support 
arbitrary non-linear scales, so the relation between the two scale must 
be linear or logarithmic.

So what you're trying to do might be accomplished like this, assuming 
you know the axis range beforehand:

	f_y2(y) = 0.507 * y # or whatever the linear(!) relation is
	set tics axis
	set yzeroaxis ; set y2zeroaxis
	set ytics nomirror ; set y2tics
	set yrange [ymin:ymax] ; set y2range [f_y2(ymin):f_y2(ymax)]

0
Reply ISO 11/13/2009 2:09:06 PM


On 13 nov, 12:09, Hans-Bernhard Br=F6ker <HBBroe...@t-online.de> wrote:
> rotava wrote:
> > =A0 =A0 =A0 =A0 =A0Is it possible to put two different scales (like kg/=
s =A0 and
> > lb/s) one to the left side, the other to the right side of the same
> > vertical axis (let's say, the yaxis)?
>
> Not really. =A0gnuplot only supports putting separate scales on the left
> and right side of the entire graph, or to both sides of the zeroaxis.
> So the only way this would work is if x=3D0 happened to be exactly where
> you want that doubly annotated axis to be. =A0And we don't support
> arbitrary non-linear scales, so the relation between the two scale must
> be linear or logarithmic.
>
> So what you're trying to do might be accomplished like this, assuming
> you know the axis range beforehand:
>
> =A0 =A0 =A0 =A0 f_y2(y) =3D 0.507 * y # or whatever the linear(!) relatio=
n is
> =A0 =A0 =A0 =A0 set tics axis
> =A0 =A0 =A0 =A0 set yzeroaxis ; set y2zeroaxis
> =A0 =A0 =A0 =A0 set ytics nomirror ; set y2tics
> =A0 =A0 =A0 =A0 set yrange [ymin:ymax] ; set y2range [f_y2(ymin):f_y2(yma=
x)]

          x=3D0 means really 0 or the origin of the xrange (xmin)?

Oscar
0
Reply rotava 11/13/2009 2:59:37 PM

rotava wrote:

>           x=0 means really 0 or the origin of the xrange (xmin)?

The former.  See "help zeroaxis"
0
Reply ISO 11/13/2009 4:07:13 PM

3 Replies
1315 Views

(page loaded in 0.2 seconds)

Similiar Articles:













7/22/2012 8:51:37 AM


Reply: