在gnuplot中,我绘制了一个图表,如下所示:
gnuplot> set title "Performance analysis" font ", 16"
gnuplot> set xlabel "Array size" font ", 14"
gnuplot> set ylabel "Time, milliseconds" font ", 14"
gnuplot> set xrange [0:25]
gnuplot> set yrange [0:6300]
gnuplot> set xtics (5, 9, 11, 13, 15, 17, 19, 21, 23)
gnuplot> set ytics (88, 296, 433, 835, 1067, 1516, 2592, 3920, 6214)
gnuplot> set style line 1 linecolor rgb "blue"
gnuplot> plot "file.dat" using 1:2 title "Graph" with lines可以,但是我的图形的线条颜色仍然是红色(默认),您能帮我把它设置为蓝色吗?
发布于 2012-10-11 23:20:54
plot命令缺少一个参数;请尝试
plot "file.dat" using 1:2 title "Graph" with lines ls 1ls 1告诉gnuplot使用linestyle1。如果你不指定线条样式,它将循环使用默认的线条样式。在此期间,您可以设置
set style data lines在打印之前。这样,gnuplot将用线条绘制数据,您不必在每个plot命令中指定它。但是,如果您只绘制一条线,则可以在一个命令中完成所有操作:
plot "file.dat" using 1:2 title "Graph" with lines lc rgb 'blue'https://stackoverflow.com/questions/12842401
复制相似问题