Gnuplot 使用线条颜色设置绘图
Gnuplot set a plot with linecolors
我遇到了一个我无法克服的奇怪问题。
我正在将 4 个文件中的数据绘制到 1 个文件中,我希望每个图都具有不同的线条颜色。但是命令 lt #some number
不起作用,它给出不同的线型但从不给出颜色。
我正在使用脚本来制作文件,将其通过管道传输到 gnuplot 中以生成一个 .ps 文件。
set terminal postscript
set encoding iso_8859_1
set title 'energy difference for a polymer'
set xlabel 'n, polymer length'
set ylabel '{/Symbol D}E, eV'
set key bottom left
set xzeroaxis
set output 'deltaE_PQL.ps'
set boxwidth 0.9 relative
set style fill solid 1.0
plot 'deltaE_plotm2' u 1:2 with lines lt 1 title '| -2 {/Symbol 1}', \
'deltaE_plotm1' u 1:2 with lines lt 2 title '| -1 {/Symbol 1}', \
'deltaE_plot1' u 1:2 with lines lt 3 title '| 1 {/Symbol 1}', \
'deltaE_plot2' u 1:2 with lines lt 4 title '| 2 {/Symbol 1}'
感谢任何想法这里有什么问题。
在 gnuplot 控制台输入并检查 help postscript
并使用:
set terminal postscript color
我遇到了一个我无法克服的奇怪问题。
我正在将 4 个文件中的数据绘制到 1 个文件中,我希望每个图都具有不同的线条颜色。但是命令 lt #some number
不起作用,它给出不同的线型但从不给出颜色。
我正在使用脚本来制作文件,将其通过管道传输到 gnuplot 中以生成一个 .ps 文件。
set terminal postscript
set encoding iso_8859_1
set title 'energy difference for a polymer'
set xlabel 'n, polymer length'
set ylabel '{/Symbol D}E, eV'
set key bottom left
set xzeroaxis
set output 'deltaE_PQL.ps'
set boxwidth 0.9 relative
set style fill solid 1.0
plot 'deltaE_plotm2' u 1:2 with lines lt 1 title '| -2 {/Symbol 1}', \
'deltaE_plotm1' u 1:2 with lines lt 2 title '| -1 {/Symbol 1}', \
'deltaE_plot1' u 1:2 with lines lt 3 title '| 1 {/Symbol 1}', \
'deltaE_plot2' u 1:2 with lines lt 4 title '| 2 {/Symbol 1}'
感谢任何想法这里有什么问题。
在 gnuplot 控制台输入并检查 help postscript
并使用:
set terminal postscript color