2

My data file looks like:

0 12.6 303.1 3.4577387486

120 10.5 278.9 2.8814489572

...

640 9.45 301.3 2.5933040615

My code looks like:

set xlabel "Tiempo (min)"
set ylabel "Corriente en el anillo (mA)"
set y2label "Flujo (fotones/s)"
set ytics nomirror
set y2tics
set tics out
set autoscale  y
set autoscale y2
plot 'tan_time_curr_flux.dat' using 1:3 lc rgb 'black' pt 6 lw 2 w lp axes x1y1 title "Corriente", 'tan_time_curr_flux.dat' using 1:4 lc rgb 'blue' pt 5 lw 2 w lp axes x2y2 title "Flujo"

My plot looks like: enter image description here

As you can see, there is a little offset, in x, between respective data points. It is more clear as x grows. For example the actual last point for flux (flujo) is 640,2.59. But the plot shows that point at 700, 2.59. How can I tell gnuplot not to add any offset to the second (blue) line?

Thanks a lot! :)

Ps If I plot time (col. 1) vs either flux (col. 4) or current (col. 3)... The values for x stay normal. (i.e. There is no offset)

1 Answer 1

1

I guess that's a bug.

However, simply use axes x1y2 for your second plot, since you only have one x-value.

Sign up to request clarification or add additional context in comments.

1 Comment

I think it was that ..axes x1y2 make the plot as it should be. Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.