1

我怎样才能在 Gnuplot 中绘制像这里看到的那样的图:http ://www.fftw.org/accuracy/G4-1.06GHz-gcc3.4/ ,即带有明确的 x 轴?我有一个这样的数据集:

2   1066.7
4   3122.9
8   4715.2
16  5538.5
32  5757.3
64  5891.4
128 5398.3
256 5280.2
512 5178.4
1024    4048.6
2048    4383
4096    3794.4

每次绘制时,x 轴都是线性比例,因此我的所有值都集中在 y 轴上。我希望每个 x 值都是等距的,就像在链接图中一样。谢谢。

4

2 回答 2

13

在 gnuplot 中,您需要告诉它使用对数坐标轴(以 2 为底)

set logscale x 2
set xtics 2 #label powers of 2 instead of the default
plot 'dataset.dat' w lines
于 2012-08-22T14:52:49.077 回答
2

你的 x 轴应该有一个对数刻度。您可以将其设置为 2

set logscale x 2
于 2012-08-22T14:53:50.827 回答