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

时间:2017-02-06 07:26:41

标签: 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 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

这是我的图表 enter image description here

如何让它看起来像一条直线?

由于

1 个答案:

答案 0 :(得分:1)

我明白了:

此行已修复

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