gnuplot 4.4 patchlevel 3. 设置 pm3d
设置网格
设置调色板定义(-1“蓝色”,0“白色”,1“红色”)
设置标题
设置 ztics 0.10
设置 xlabel“标签 1”
设置 ylabel “标签 2”
设置 zlabel “标签 3”
使用 ($1/$2):3:($4+$5) 和 pm3d notitle pause -1 绘制“数据”
设置术语后增强颜色“Serif”20
设置输出“graph.eps”
重绘
我通过在 plot 命令之前设置它来在 gnuplot 中绘制一个箭头:
set arrow from graph -0.01, first cutOff-0.001 rto graph 0.02, first 0.002 lc rgb "blue" lw 5 nohead
plot ...
Run Code Online (Sandbox Code Playgroud)
但它出现在轴下方(即黑色轴明显在我的箭头上方 - 在这种情况下)。我怎样才能反转它,以便箭头(线)在上方?
这是来自 shell 脚本(来自 Hannon 实验室)的 gnuplot 命令,我想使用 rgplot gem 将绘图部分移植到 Ruby,但我未能正确使用语法。
set boxwidth 0.75 absolute
set size 1,1
set style fill solid 1.00 border -1
set xlabel \"read position\"
set title \"Nucleotides distribution $TITLE\"
set ylabel \"% of total (per read position)\"
set key outside right top vertical Left reverse enhanced autotitles columnhead nobox
set key invert samplen 4 spacing 1 width 0 height 0
set style histogram rowstacked
set style data histograms
set noytics
set xtics 1
set yrange …Run Code Online (Sandbox Code Playgroud) 我有一个包含多列的数据文件,前两列表示位置,其他表示其他属性(例如从这里发送的项目数)。例如:
1 1 1 57.11
2 1 2 62.40
3 4 1 31.92
Run Code Online (Sandbox Code Playgroud)
我想要做的是在位置绘制点,但使用其他列中的值来改变点类型和大小(例如)。但是我似乎找不到引用图中列的方法。我知道“变量”的用法,但我找不到使用多个变量的方法。
我想要的是以下内容:
plot "mydata" using 1:2 notitle with points pt ($3) ps ($4/10)
Run Code Online (Sandbox Code Playgroud)
以便 pt 和 ps 分别使用从第三列和第四列中获取的每个点的值。
这在 gnuplot 中甚至可能吗?是否有某种解决方法?
我正在尝试使用 PHP 中的 GNUPLOT 绘制正弦图,但是当我exec用来绘制图形时,出现此错误:
警告:exec() [function.exec]:无法在第 8 行的 /Library/WebServer/Documents/serverSide2.php 中执行空白命令
这是我的代码:
exec(`echo "set term png;set xrange[-2*pi:2*pi]; set output 'output.png'; plot sin(x)" | gnuplot`);
Run Code Online (Sandbox Code Playgroud)
我也使用了 passthru() 但得到了同样的错误:警告:passthru() [function.passthru]: 无法在第 8 行的 /Library/WebServer/Documents/serverSide2.php 中执行空白命令
但是我使用终端来检查代码是否有效,所以我输入了这个代码:
echo "set term png;set xrange[-2*pi:2*pi]; set output 'output.png'; plot sin(x)" | gnuplot
它工作正常并给了我情节。
我知道我该怎么办?
在使用 Google 的出色绘图工具进行了一些试验后,我正在使用 Gnuplot 绘制几个 3D 图形。我喜欢谷歌工具的一件事是它在表面周围绘制的“边界框”,这使我更容易看到尺寸。
有没有办法在 Gnuplot 中绘制这个边界框?
例如,这个函数: z = (15 - x*y) / (100 - x)
用谷歌绘制:https : //www.google.es/search? q=z+%3D+(15+-+x y )%2F(100-x)&aq=f&oq=z+%3D+(15+-+x y) )%2F(100-x)

Gnuplot 的等效脚本:
设置网格
设置 xrange [-10:10]
设置 yrange [-10:10]
设置 zrange [-0.7:1]
设置 isosamples 100
设置 pm3d
设置 hidden3d
设置抽动级别 0.0
设置视图 60, 100
splot (15 - x*y) / (100 - x)
产生以下图:

提前致谢
出于各种原因,执行某个绘图的最简单方法似乎是将我需要的列号存储在变量中,然后执行调用该变量的绘图命令。
这甚至可能吗?
我想实现以下目标:
plot '< paste '.filesString.'' u 1:(columnsString)
Run Code Online (Sandbox Code Playgroud)
此外,变量“columnsString”将具有类似的值
(\$2*\$5+\$(6*2-4)*\$(6*2-1))
Run Code Online (Sandbox Code Playgroud)
例如,因此它需要能够评估字符串中的所有 (6*2-4) 样式总和。我想强调的是,这个问题仅与“columnsString”的评估有关,“filesString”变量工作正常。我该如何管理?
我正在尝试使用以下代码将希腊符号合并到我的图表中,但两次出现类似的错误。
警告:增强的文本模式解析器 - 忽略虚假 }
警告:增强的文本模式解析器 - 忽略虚假 }
reset
# svg
#set terminal svg size 410,250 fname "Times New Roman" \
set terminal svg size 410,250, enhanced fname 'Times New Roman' \
fsize "12" rounded dashed
set output "data1.svg"
set tics nomirror
# color definitions
set style line 1 lc rgb "#8b1a0e" pt 1 ps 1 lt 1 lw 2 # --- red
set style line 2 lc rgb "#5e9c36" pt 2 ps 1 lt 2 lw 2 # …Run Code Online (Sandbox Code Playgroud) 我在x轴上有一个非常密集的数据集,并使用它with boxes作为直方图进行绘制。我的数据表中有x轴标签的条目。x标签变得太密集。我怎么说只打印每十分之一。
plot 'histo.raw' using 3:xtic(2) with boxes lc rgb 'orange' title 'data'
Run Code Online (Sandbox Code Playgroud)
样本数据:
130 " +0.145 -> +0.150" 0 0.00
131 " +0.150 -> +0.155" 0 0.00
132 " +0.155 -> +0.160" 0 0.00
133 " +0.160 -> +0.165" 1 0.00
134 " +0.165 -> +0.170" 2 0.00
135 " +0.170 -> +0.175" 2 0.00
136 " +0.175 -> +0.180" 4 0.00
137 " +0.180 -> +0.185" 9 0.01
138 " +0.185 -> +0.190" 31 0.03
139 …Run Code Online (Sandbox Code Playgroud)