在不显示不同点类型的情况下无法在gnuplot中绘制直线

时间:2020-09-23 04:04:59

标签: gnuplot

我正在使用gnuplot绘制图形,但是该图形不断为我提供不同的点类型,而不是直线。我只想使用直线绘制它们,但不断获得x或加号或其他符号。这是我的gnuplot脚本。

set terminal pdf
set output "temperatures.pdf"
set style line 1 lc rgb "red" lt 1
set style line 2 lc rgb "blue" lt 1
set style line 3 lc rgb "purple" lt 1
set style line 4 lc rgb "orange" lt 1
set style line 5 lc rgb "cyan" lt 1
set xrange [0:780]
set yrange [0:88]
set xlabel "Time (s)"
set ylabel "Temperature (°C)"
set key bottom right
plot "data.dat" using 6:1 ls 1 notitle, "data.dat" using 6:2 ls 2 notitle, "data.dat" using 6:3 ls 3 notitle, "data.dat" using 6:4 ls 4 notitle, "data.dat" using 6:5 ls 5 notitle, \
    NaN ls 1 title "600 MHz", NaN ls 2 title "800 MHz", NaN ls 3 title "1100 MHz", NaN ls 4 title "1300 MHz", NaN ls 5 title "1500 MHz"

enter image description here

1 个答案:

答案 0 :(得分:1)

有不同的绘图样式,例如if ($hasil >= 80) { $grade = 0.90; $color = 'green'; $ikk = "Cukup Memuaskan"; }elseif($hasil >= 70 && $hasil < 80 ) { $grade = 0.75; $color = 'yellow'; $ikk = "Memadai"; }elseif($hasil >= 1 && $hasil < 70 ) { $grade = 0.50; $color = 'red'; $ikk = "Kurang Memadai"; }else{ $ikk = "Tidak Berkontribusi"; } <td class="font-weight-bold text-danger" style="color:<?=$color;?>"><?php echo $hasil;?></td> with pointswith lines等。您也可以通过with linespointsw pw l来缩写样式。选中w lp。 如果您未指定任何内容,则默认值为help with。那就是你得到的。设置线型或线型并不一定意味着您仅绘制线。您还必须明确使用with points

顺便说一句,您可以通过指定with lines来使用上次使用的文件。为了提高可读性,您可以用''分隔写多行(请注意,\必须是该行的最后一个字符,之后不能有空格或其他字符)。

尝试以下操作:

\
相关问题