stdin我知道我可以使用数据源来绘制数据'-',但是有什么方法可以以相同的方式绘制命令的数据输出吗?即,我可以在 gnuplot 脚本本身中指定命令,而不是运行命令并通过管道传输到 gnuplot 脚本吗?
像这样的东西(但这不起作用):
set terminal pngcairo
set output 'test.png'
cmd = "`./mycmd`" # running ./mycmd in terminal gives my data to stdout.
# the command can be several other commands, piped together.
# i'm only interested in whatever comes to stdout after running
# the entire thing.
plot cmd u 2:3 w lines # etc...
Run Code Online (Sandbox Code Playgroud)
上面的 makecmd包含一个长行,所有输出行都被粉碎在一起。
wxt 和 windows 终端有什么区别?
Linux、Windows 和 Mac 都支持它们吗?
还有其他好的终端来显示绘图吗?
我在我的情节中设置了这样的范围
set yrange[ 0.000 : 0.040 ]
Run Code Online (Sandbox Code Playgroud)
并且图形在 y 轴上的间隔为 0.005。y 轴读作
0.04
0.035
0.03
0.025
0.02
0.015
0.01
0.005
0
Run Code Online (Sandbox Code Playgroud)
在图表的一侧。这看起来完全不一致。
我怎样才能让它显示每个 tic 的千分之一的精度?
我试图在 gnuplot 脚本中绘制参数表达式,其系数存储在文本文件的最后一行。为此,首先我尝试了这个:
plot "<awk 'END{print $1"*cos(t)*cos("$2")-"$3"*sin(t)*sin("$4"), "$1"*cos(t)*sin("$2")+"$3"*sin(t)*cos("$4")"}' manip_file.csv"
Run Code Online (Sandbox Code Playgroud)
但是 gnuplot 说undefined variable: t。所以接下来我尝试了以下内容:
plotCMD = 'awk 'END{print "plot " $1"*cos(t)*cos("$2")-"$3"*sin(t)*sin("$4"), "$1"*cos(t)*sin("$2")+"$3"*sin(t)*cos("$4")"}' manip_file.csv'
eval(plotCMD)
Run Code Online (Sandbox Code Playgroud)
但这次 gnuplot 说';' expected. 如果我awk在命令行中运行命令,它会给我一个正确的方程,gnuplot 绘制它没有问题。因此,丢失一些单/双引号不是问题。试图逃避美元符号 ( \$1) 也没有解决问题。有什么想法吗?
如何在不使用“退出”的情况下输出图形?这让我发疯,因为当尺寸出错时,我必须从头开始。我做了所有的东西,比如 set term pdf 等等。请告诉我我能做什么。
在 gnuplot 中,我使用
set style line 11 lc rgb '#222222' lt 1;
set border 3 back ls 11;
set zeroaxis linetype 1 linecolor rgb '#222222';
set xtics axis;
set ytics axis;
set border 0;
set style line 12 lc rgb '#808080' lt 0 lw 1
set grid back ls 12
set xtics add ('' 0)
set ytics add ('' 0)
set xlabel 'x' font 'Times-Italic,14'
set ylabel 'y' rotate by 0 font 'Times-Italic,14'
Run Code Online (Sandbox Code Playgroud)
这会将轴从边界移动到轴的 0 值。但是, xlabel 和 ylabel 保留在边界处,使它们处于奇怪的位置。是否有将轴标签设置为轴零值位置的通用方法?
我想在sftp的帮助下使用远程PC(linux下)的gnuplot,但抛出以下错误消息:
gnuplot: unable to open display ''
gnuplot: X11 aborted.
Run Code Online (Sandbox Code Playgroud)
有人可以帮助我如何在没有 X11 转发的情况下使用 gnuplot 吗?
通常我喜欢 gnuplot 图的外观。但是,我必须为一群只见过 x=0 和 y=0 轴的旧式/传统 xy 坐标系的人准备一个情节。为了不混淆他们,我会坚持他们喜欢的风格。
我如何在 gnuplot 中实现这一点?
我发现set xzeroaxis这给了我 x 轴。(类似于 y 轴)。我仍然需要:
我怎样才能做到这一点?
是否可以在 Gnuplot 中模拟模拟示波器的绘图风格,这意味着在更大的幅度上更薄+更暗的线条,像这样:?

当谷歌搜索“水平 gnuplot 条形图”时,我能找到的第一个结果http://www.phyast.pitt.edu/~zov1/gnuplot/html/histogram.html建议旋转(!)最终的条形图,这看起来相当巴洛克. 尽管如此,我尝试了这种方法,但标签被切断了。
reset
$heights << EOD
dad 181
mom 170
son 100
daughter 60
EOD
set yrange [0:*] # start at zero, find max from the data
set boxwidth 0.5 # use a fixed width for boxes
unset key # turn off all titles
set style fill solid # solid color boxes
set colors podo
set xtic rotate by 90 scale 0
unset ytics
set y2tics rotate by 90
plot '$heights' using 0:2:($0+1):xtic(1) with boxes lc …Run Code Online (Sandbox Code Playgroud)