Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gnuplot x-axis scaling

Sorry about the poorly articulated title, I couldn't think of a title that would suffice without explaination.

I have a graph with an x axis with an irrelevant scale. What I want to do is have a second x-axis, which I know is possible, that is scaled strangely.

The second axis is not used in plotting anything, I just need the top values to align with the axis that "matters." Let's say that my axis is devided into 10 different tics, going from 0 - 1000.

0--100--200--300--400--500--600--700--800--900--1000

I would like the second x-axis to do this(heres the tricky part):

0---0----0----0----0----0----0----0---100--200--500

What I was thinking was having the values actually be 0-1000 as well, but have the label be different (having "0" as a label for 0,100,...,700 and then "100" , "200" , "500" as labels for their respective values.

I know it's possible in histograms, but I'm not dealing with histograms.

Thanks!

like image 792
Joshua Avatar asked Nov 20 '25 14:11

Joshua


1 Answers

Perhaps you are looking for this:

set x2range [0:1000]
set x2tics("0" 0, "0" 100, "0" 200, "0" 300, "0" 400, "0" 500, "0" 600, "0" 700, "100" 800, "200" 900, "500" 1000)
like image 161
llm Avatar answered Nov 24 '25 11:11

llm



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!