gnuplot中的轮廓线型为全固体

时间:2014-09-05 09:49:00

标签: gnuplot

请考虑gnuplot 4.6.2中的以下示例脚本(来自演示)。

set terminal epslatex
set output "test.tex"

set view 60, 30, 0.85, 1.1
set samples 20, 20
set isosamples 21, 21
set contour base
set cntrparam levels incremental -100,10,110
set title "3D gnuplot demo - contour plot (every 10, starting at -100)" 
set xlabel "X axis" 
set ylabel "Y axis" 
set zlabel "Z axis" 
set zlabel  offset character 1, 0, 0 font "" textcolor lt -1 norotate
splot x*y

我正在使用epslatex终端,我的问题是绘制的轮廓会得到各种破折号,即使我只想将它们作为纯黑色曲线。

我发现以下解决方案可能有效,

set style line 1 linetype -1
set style line 2 linetype -1
.
.
set style increment user

但是,根据帮助文件,set style increment user已被弃用,而且,我有一个多行的多行,这个解决方案并没有真正帮助。

我也试过

set termoption solid

但没有成功。我还阅读了解决方案,将其写入table并绘制。这可能有用,但是当我使用多重时隙时,我宁愿不这样做。

如何将epslatex终端中的所有等高线都固定(和黑色)?

1 个答案:

答案 0 :(得分:1)

这似乎是epslatex终端中的一个错误,它也出现在4.6.5版本中。通常set termoption solid工作正常。脚本

set terminal postscript eps
set termoption solid
set output 'solid.eps'
plot x, 2*x

正确绘制两条实线(也可以按预期方式使用pngcairowxtsvg终端等。

但是,对于epslatex终端,这会被忽略,您必须在设置终端时直接提供solid

set terminal epslatex solid
set output 'solid.tex'
plot x, 2*x