如何在gnuplot中将x轴和y轴设置为相同

如何在gnuplot中将x轴和y轴设置为相同,gnuplot,Gnuplot,我试图从下面的简单文件中绘制一条直线(对角线) 0.1 0.1 0.5 0.5 1 1 2 2 10 10 这是我的gnuplot代码,它不按比例缩放轴 #!/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 t

我试图从下面的简单文件中绘制一条直线(对角线)

0.1 0.1
0.5 0.5
1   1
2   2
10  10
这是我的gnuplot代码,它不按比例缩放轴

#!/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
这是我的图表

如何使它看起来像一条直线

谢谢

我收到了:

这一行可以修复

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