通常在使用交互式 gnuplot 时,我会这样做:
gnuplot> plot "state_log_6548032.data" using 4 with lines lt -1 lw 0.5 title "X axis" ,\
>"state_log_6548032.data" using 5 with lines lt 1 lw 0.5 title "Y axis" ,\
>"state_log_6548032.data" using 6 with lines lt 2 lw 0.5 title "Z axis"
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试使用子进程从 python 执行相同操作时:
gnuplot.write( "plot \"%s\" using 1 with lines lt -1 lw 0.5 title 'X axis' ,\ \n" %filename )
gnuplot.write( "plot \"%s\" using 2 with lines lt 1 lw 0.5 title 'Y axis' ,\ \n" …Run Code Online (Sandbox Code Playgroud) 我正试图在Octave中绘制图表.如何指定轴的步长?例如,默认情况下,x轴的步长为0.5(0 --- 0.5 --- 1 --- 1.5 ---),我想使其为0.1,而y轴的步长为0.01.
我有一些包含内容的数据文件
a1 b1 c1 d1
a1 b2 c2 d2
...
[blank line]
a2 b1 c1 d1
a2 b2 c2 d2
...
Run Code Online (Sandbox Code Playgroud)
我用 gnuplot 绘制这个
splot 'file' u 1:2:3:4 w pm3d.
Run Code Online (Sandbox Code Playgroud)
现在,我想使用二进制文件。我使用未格式化的流访问(直接或顺序访问不能直接工作)使用 Fortran 创建了该文件。通过使用 gnuplot
splot 'file' binary format='%float%float%float%float' u 1:2:3
Run Code Online (Sandbox Code Playgroud)
我得到一个正常的 3D 绘图。但是, pm3d-command 不起作用,因为我在二进制文件中没有空行。我收到错误消息:
>splot 'file' binary format='%float%float%float%float' u 1:2:3:4 w pm3d
Warning: Single isoline (scan) is not enough for a pm3d plot.
Hint: Missing blank lines in the data file? See 'help pm3d' and FAQ.
Run Code Online (Sandbox Code Playgroud)
我有一个用 gnuplot 获得的 3 维图,为此我还计算了等高线:
将 pm3d 设置为 s
设置调色板 rgbformulae 33,13,10
设置轮廓
未设置标签
设置 cntrparam 级别增量 1,1,5
sp "dati.dat" u 1:2:3 wl ls 7 notitle
我真的很想用 3d 图中相应级别中指定的相同颜色绘制轮廓线。我没有找到任何有用的帖子。这在某种程度上可能吗?
我真的很喜欢 gnuplot svg 输出,但是有没有办法定义gnuplot 生成的<title></title>和<desc></desc>标签?
标题默认为<title>Gnuplot</title>和描述为<desc>Produced by GNUPLOT 4.6 patchlevel 5</desc>(或分别使用的版本)。
有没有办法用 gnuplot 脚本代码更改这些,或者是编辑输出 svg 文件的唯一方法?
我正在尝试按照以下示例以相同颜色绘制所有轮廓线:http : //gnuplot.sourceforge.net/demo/contours.25.gnu

但是,该示例有效,但我自己的代码不起作用:
set xyplane 0;
set pm3d
set contour
set cntrparam levels 6
unset surface;
unset key;
set pm3d map
set title "t";
splot for [i=1:1] "-" using 1:2:3 notitle with lines lc rgb "dark-blue";
....data....
Run Code Online (Sandbox Code Playgroud)

你能帮我找出问题吗?
这里下载代码文件:
https://dl.dropboxusercontent.com/u/45318932/contourpm3d.plt
我正在使用 gnuplot4.6.5
我在图表中有一条水平线,在gnuplot中设置了以下终端:
set terminal postscript eps size 8.5cm, 7cm enhanced color font 'Helvetica,10'
set style line 5 lt 2 lc rgb "black" lw 3
f(x)=5.0
plot f(x) w l ls 5
Run Code Online (Sandbox Code Playgroud)
线宽正常,但破折号的长度太短.如何在不将终端模式更改为虚线的情况下增加它?
我一直在寻找好的gnuplot编辑器一段时间没有成功.我正在使用gduplot语法高亮插件的gedit,但它不能很好地工作.有人知道一个好的编辑吗?
我试图用gnuplot绘制扬声器在+/- 90度范围内的离轴响应.我很好地工作,几乎完全是因为在gnuplot中创建麦克风极点模式图
我想扩展这个,所以它提出了前进的"180范围,但我不知道如何做到这一点,并会欣赏一些指示.
到目前为止这是我的代码
gnuplot <<EOF
set terminal pngcairo size ${WIDTH}/2,${HEIGHT}/2 font ',10'
set polar
set angle degrees
set size ratio 1
set tmargin 3
set bmargin 3
set style line 11 lc rgb 'gray80' lt -1
set grid polar ls 11
unset border
unset xtics
unset ytics
set xrange [-30:30]
set yrange [-30:30]
set key
r=1
set rrange [0:r]
set rtics 0.166 format '' scale 0
set label '0°' center at first 0, first r*1.05
set …Run Code Online (Sandbox Code Playgroud)