I have two data files, qebands.agr and ex1_band.dat. When I plot them using OriginLab I got directly this figure:
On the other hand, someone used Gnuplot with the following script:
set xtics nomirr
set x2tics
set xrange [*:*] noextend
set x2range [*:*] noextend
plot 'qebands.agr' w l, 'ex1_band.dat' axes x2y1 w l
and get:
I haven't used Gnuplot before. Could anyone tell me why the two figures are different? i.e., why the scale the x-axis is different in both figures?
Depending on which image is the desired one...
Remove axes x2y1
in the second part of the gnuplot command and you will get a similar plot as the Origin one.
You are explicitly specifying that 'ex1_band.dat'
is plotted to axes x2y1
(x2 = top x-axis, y1 = left y-axis).
Per default, gnuplot autoscales both x-axes independently, unless you link them (check help link
).
Origin is plotting both files relative to x1y1
axes.