colors - Gnuplot 用线条颜色设置绘图
问题描述
我遇到了一个我无法克服的奇怪问题。我将 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 \361}', \
'deltaE_plotm1' u 1:2 with lines lt 2 title '| -1 {/Symbol \361}', \
'deltaE_plot1' u 1:2 with lines lt 3 title '| 1 {/Symbol \361}', \
'deltaE_plot2' u 1:2 with lines lt 4 title '| 2 {/Symbol \361}'
欣赏这里有什么问题的任何想法。
解决方案
在 gnuplot 控制台中输入并检查help postscript
和使用:
set terminal postscript color
推荐阅读
- javascript - JS 获取取消未将 CancellationToken 传递给 asp.net WebApi
- powershell - 如何在脚本块中传递变量以与 Invoke-Command 一起使用,该命令将调用将变量作为开关参数的可执行文件
- node.js - 有人可以帮我理解并解决这个“无法安装@parcel/transformer-image”吗?(JS)
- sql - 如何在 Oracle SQL 中使用 REGEXP_SUBSTR 或 INSTR 从字符长度不同的列中获取特定字符串
- networking - 通过 VPN 连接到计算机时无法解析主机名
- html - 如何选择没有类的 div 元素?
- jmeter - 如果来自先前线程组的请求在 JMETER 测试计划中失败,如何停止线程组执行?
- java - 将(总和)多个 Firebase 子值加在一起以给出总值?
- scala - 创建具有嵌套结构的 DataFrame 并从输入表中填充数据
- cypress - 赛普拉斯自定义命令:如何从 cy.get().within() 包装中产生 cy.wrap() 值?