为GNUPLOT设置线样式
我正在使用Epslatex终端,并且正在尝试为即将推出的纸张定义特定的线条样式。我创建了以下样式:
set style line 1 lc rgb '#0060ad' pt 1 lt 1 lw 2 # blue
set style line 2 lc rgb '#dd181f' pt 2 lt 2 lw 2 # red
set style line 3 lc rgb '#ff9933' pt 3 lt 3 lw 2 # orange
set style line 4 lc rgb '#ffcc33' pt 4 lt 4 lw 2 # light orange
set style line 5 lc rgb '#336600' pt 5 lt 5 lw 2 # green
set style line 6 lc rgb '#9900CC' pt 6 lt 6 lw 2 # purple
set style line 7 lc rgb '#000000' pt 7 lt 7 lw 2 # black
但是,当我使用以下样式的时刻,它们的外观会发生变化。在使用同一终端时,我该怎么做才能保持地块的线样式标准,而不会更改?我使用具有点样式的线。另外,我无法更改我使用的样式中的线条厚度。
I am using the epslatex terminal, and I am trying to define specific line styles for my upcoming paper. I created the following styles:
set style line 1 lc rgb '#0060ad' pt 1 lt 1 lw 2 # blue
set style line 2 lc rgb '#dd181f' pt 2 lt 2 lw 2 # red
set style line 3 lc rgb '#ff9933' pt 3 lt 3 lw 2 # orange
set style line 4 lc rgb '#ffcc33' pt 4 lt 4 lw 2 # light orange
set style line 5 lc rgb '#336600' pt 5 lt 5 lw 2 # green
set style line 6 lc rgb '#9900CC' pt 6 lt 6 lw 2 # purple
set style line 7 lc rgb '#000000' pt 7 lt 7 lw 2 # black
However, the moment that I use the following styles in a different Figure, their appearance changes. What can I do to keep my plots' line style standard without changing when using the same terminal? I use lines with points style. Also, I can not change the thickness of the lines in the styles I use.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
标准的gnuplot样式存储在某个地方(肯定是在GNUPLOT目录中的某个地方),我相信您可以修改它们,以便在GNUPLOT启动后,您将在GNUPLOT启动之后将其作为标准样式。 (检查
帮助Linestyles vs LineTypes
)。无论如何,以下内容简单而灵活。只需将所需的样式写入文本文件并在脚本期间加载它(检查
help load load
)。样式文件:
so72347937_styles.gp
脚本:
结果:
The standard gnuplot styles are stored somewhere (certainly somewhere in the gnuplot directory) and I am sure you can modify them such that after starting up of gnuplot you will have these as standard styles after gnuplot startup. (check
help linestyles vs linetypes
).Anyway, the following is simple and flexible. Simply write your desired styles into a text file and load it during your scripts (check
help load
).Style file:
SO72347937_Styles.gp
Script:
Result: