Bibrak
Bibrak

Reputation: 554

How to set x axis and y axis to be same in gnuplot

I am trying to plot a straight (diagonal) line from the following simple file.

0.1 0.1
0.5 0.5
1   1
2   2
10  10

Here is my gnuplot code it doesn't scale the axis proportionately.

#!/usr/bin/gnuplot

set title "w^2 vs 1/m" font ",22"
set xlabel "1/m" font ",15"
set ylabel "w^2" font ",15"
set xtics font ",15"
set ytics font ",15"
set key right top Left reverse spacing 3 font ",15"
set grid
set term png size 1200, 800
set output "w2_repM_e.png"
plot "../data/w2_repM_e" using 1:xticlabels(2) title "w^2" with linespoints ps 4 pt 1

Here is my graph enter image description here

How to make it look like a straight line?

Thanks

Upvotes: 2

Views: 1481

Answers (1)

Bibrak
Bibrak

Reputation: 554

I got it:

This line fixes

plot "../data/w2_repM_e" using 1:2 title "w^2" with linespoints ps 4 pt 1

Upvotes: 1

Related Questions