[R] setting the values of a secondary "y" axis

Antonio Silva aolinto.lst at gmail.com
Sat May 6 23:50:13 CEST 2017


I want to make a plot with two "y" axes. The labels at axis 4 should be the
values from axis 2 multiplied by a scale factor (as 3.5).

In the example below I draw axis 4 exactly as axis 2. But I could not find
a way to multiply its values by 3.5 (e.g.).

axis(4) # I'd like to have these values multiplied by a scale factor

I will produce plots for different data sets in a looping and y values will
vary so I  cannot "freeze" axis 4 labels because they (values and scale
factor) will vary  from plot to plot.

Thanks in advance for any help. All the best.


	[[alternative HTML version deleted]]

More information about the R-help mailing list