如何在Gnuplot中将线图设置为多个图的默认样式? [英] How to set a line style as default for multiple plots in Gnuplot?
本文介绍了如何在Gnuplot中将线图设置为多个图的默认样式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用gnuplot创建图.在所有图中,线宽应为3.如果我只做一个图,这是通过以下方式完成的:
I would like to create plot using gnuplot. The line width should be 3 in all plots. If I do it for one plot only this is done by:
set style line 1 linewidth 3
有什么方法可以在全球范围内将其作为默认设置吗?
Is there any way how to do it globally as default?
推荐答案
您可以指定
set terminal <terminal> linewidth 3
这将更改图中所有线(包括图边框)的默认线宽.
This will change the default linewidth for all lines in the plot, including the plot borders.
如果这不是您想要的,则可以指定循环中的所有线(gnuplot 4.6+),其中n
是要绘制的线数:
If that's not what you want, you can specify all the lines in a loop (gnuplot 4.6+), where n
is the number of lines you are plotting:
do for [i=1:n] {
set style line i linewidth 3
}
这篇关于如何在Gnuplot中将线图设置为多个图的默认样式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文