我有以下图表:
- 第一个数据集显示搜索。
- 第二个数据集显示点击。
y1
显示搜索比例,y2
显示点击比例。在x1
我有时间值显示。
x2
我希望在(上轴)上显示点击值(每小时)。当我添加命令set x2tics
时,它会显示搜索数据,而不是我希望的点击。
如何更改它以显示点击单位?
Gnuplot 脚本:
set xlabel "Time"
set ylabel "Times"
set y2range [0:55000]
set y2tics 0, 1000
set ytics nomirror
set datafile separator "|"
set title "History of searches"
set xdata time # The x axis data is time
set timefmt "%Y-%m-%d %H:%M" # The dates in the file look like 10-Jun-04
set format x "%d/%m\n%H:%M"
set grid
set terminal png size 1024,768 # gnuplot recommends setting terminal before output
set output "outputFILE.png" # The output filename; to be set after setting
# terminal
load "labelsFILE"
plot 'goodFILE' using 1:3 lt 2 with lines t 'Success' , 'clicksFILE' using 1:2 lt 5 with lines t 'Clicks right Y' axis x1y2
replot
图形: