图中的两个Y轴

时间:2019-04-18 03:44:05

标签: gnuplot

请问如何使用两个Y轴?当我绘制此图时,我会多次获得键名称不同的点类型的文件名,而文件中没有点。谢谢

set xrange [-0.4:1.8]
set yrange [25:0]
set y2range [17:-8]
set y2tics

set linetype 101   ps 3.0 pt 7 lc rgb "#ff0000"
set linetype 102   ps 2.6 pt 7 lc rgb "#ff2222"
set linetype 103   ps 2.2 pt 7 lc rgb "#ff4444"
set linetype 104   ps 1.8 pt 7 lc rgb "#ff6666"
set linetype 105   ps 1.4 pt 7 lc rgb "#ff8888"
set linetype 106   ps 1.0 pt 7 lc rgb "#ffaaaa"
set linetype 107   ps 0.6 pt 7 lc rgb "#ffcccc"
set linetype 108   ps 0.2 pt 7 lc rgb "#ffeeee"

set linetype 109   ps 3.0 pt 7 lc rgb "#00b3b3"
set linetype 110   ps 2.6 pt 7 lc rgb "#00cccc"
set linetype 111   ps 2.2 pt 7 lc rgb "#00e6e6"
set linetype 112   ps 1.8 pt 7 lc rgb "#00ffff"
set linetype 113   ps 1.4 pt 7 lc rgb "#1affff"
set linetype 114   ps 1.0 pt 7 lc rgb "#fffaaa"
set linetype 115   ps 0.6 pt 7 lc rgb "#33ffff"
set linetype 116   ps 0.2 pt 7 lc rgb "#fff7dc"
set border back
plot for [LT=101:108] 'file.txt' axes x1y1 using 2:1 with point lt LT notitle, 'file2.txt' axes x1y2 using 2:($1 + 8.) with linespoints lc rgb 'white' notitle, for [LT=109:116] 'file2.txt' axes xy2 using 2:($1 + 8.) with point lt LT notitle

0 个答案:

没有答案