andreas.profous@[EMAIL PROTECTED]
wrote:
> On May 27, 10:19 pm, Hans-Bernhard Bröker <HBBroe...@[EMAIL PROTECTED]
>
> wrote:
>> andreas.prof...@[EMAIL PROTECTED]
wrote:
>>> I should also add that I want both x-axes to be labeled, but according
>>> to km.
>> That makes essentially no sense at all. What _is_ going to be in
miles,
>> now? Nothing I can see.
>
> The lower axis should be in kilometers, the upper axis in miles.
> The tics should have the same distance. E.g. in ascii:
>
>
> ----------|----------|----------|----------|---------- <- miles
>
>
> ----------|----------|----------|----------|---------- <- km
>
> I want both axes to be labeled, for example the first x1 tic to "1"
> the first x2 tic to "1.6".
> Is the problem clear?
You want to have a second axis for the same data? There is no direct
way to have the second axis as a function of the first. However you can
change is manually. See set x2tics
the dumb solution would be just to set appropriate names:
set x2tics ("0" 0, "1.6" 1, "3.2" 2, "4.8" 3)
Scaling the second axis and setting labelspacing is a bit more elegant:
xmax=10
set xrange [0:xmax]
set x2range [0:xmax*1.6]
set x2tics 0, 1.6
you can expand the above example for a xmin, doing the appropriate
calculation of the x2range. In principle this would even work for
autoscaling. You can access GPVAL_X_MIN and GPVAL_X_MAX to get the
xrange. But you would have to replot, because these variables are set by
the autoscaling of plot and you would have to set x2... afterwards.
Tim


|