我正在使用Gnuplot绘制图表.在图中我绘制了三条属于三个数据集的平滑曲线.
目前我正在使用以下Gnuplot脚本.
reset
set terminal png
set xlabel "Square matrix size"
set ylabel "Time (in milliseconds)"
set yrange [0:750]
set title "Lower Triangular Matrix"
set key reverse Left outside
set grid
set output 'matrixlt.png'
set style data linespoints
plot "matrixlowertriangle.dat" using 1:2 lt 1 lw 2 smooth bezier title 'MatPro', \
"matrixlowertriangle.dat" using 1:3 lt 2 lw 2 smooth bezier title 'C#' , \
"matrixlowertriangle.dat" using 1:4 lt 3 lw 2 smooth bezier title 'C++'
Run Code Online (Sandbox Code Playgroud)
通过上面的脚本,我得到了以下图表.
现在我想使用唯一的点样式绘制属于同一曲线的每个点.(例如,使用一种点类型属于C#的每个点和不同样式的C++数据点.)
我尝试了一些教程,但仍然没有运气.有人可以帮助我完成这项任务吗?
我正在使用gnuplot并且有一些具有2个以上参数的数据.我不想使用3D图表.因此,我将在同一个图中将数据分成几行.
在一种情况下,我的数据看起来像这样:
#k #N #time
1 1 0.000556134
2 1 0.00099
4 1 0.00201011
8 1 0.00376214
16 1 0.00675843
1 2 0.000717646
2 2 0.000794106
4 2 0.0016033
8 2 0.0033602
16 2 0.00795338
1 4 0.000476448
... ... ...
Run Code Online (Sandbox Code Playgroud)
首先是我使用的流的数量,第二个是缓冲区大小,最后一个是此操作的时间使用.
我想要一个图表,其中缓冲区大小为X,时间Y,并且每个"使用的流量"都有一行.我的代码到现在为止:
reset
set autoscale # scale axes automatically
unset log # remove any log-scaling
unset label # remove any previous labels
set xtic auto # set xtics automatically
set ytic auto # set ytics automatically
#set logscale x …Run Code Online (Sandbox Code Playgroud) 我在2d数据文件中有节点的位置,这是由我的程序编写的
x0 = 0.12
y0 = 0.22
x1 = 0.12
y2 = 0.22 ..... 18 records for 9 node locations
Run Code Online (Sandbox Code Playgroud)
我的数据文件中也有一个邻接矩阵,由我的程序编写
G00 = 1
G10 = 1
G70 = 0 ........81 records for 9 node locations
Run Code Online (Sandbox Code Playgroud)
你们能帮助我绘制那些与相邻节点连接的网络节点吗?
非常感谢您对此进行调查.
运行以下脚本时,收到错误消息:
set terminal postscript enhanced color
set output '| ps2pdf - histogram_categorie.pdf'
set auto x
set key off
set yrange [0:20]
set style fill solid border -1
set boxwidth 5
unset border
unset ytic
set xtics nomirror
plot "categorie.dat" using 1:2 ti col with boxes
Run Code Online (Sandbox Code Playgroud)
我得到的错误消息是
smeik:plots nvcleemp$ gnuplot categorie.gnuplot
plot "categorie.dat" using 1:2 ti col with boxes
^
"categorie.gnuplot", line 13: x range is invalid
Run Code Online (Sandbox Code Playgroud)
文件的内容categorie.dat是
categorie aantal
poussin 13
pupil 9
miniem 15
cadet 15
junior …Run Code Online (Sandbox Code Playgroud) 如何更改gnuplot中的点大小.我的所有搜索都表明我可以使用
plot .... with points <point_type> <point_size>
Run Code Online (Sandbox Code Playgroud)
例如,with points 1 10工作正常.但是没有这样的选择with dots,它说这里不允许这样做.有什么建议吗?
我习惯用set format x '%.0e'科学格式的x轴数字。问题是,0显示为0E+00。如何排除0科学格式?
另外,其他数字的位数也为两位数。而不是2E+01我想要 2E+1。
我有这一点:
0.00049 1.509
0.00098 1.510
0.00195 1.511
0.00293 1.509
0.00391 1.510
0.00586 1.523
0.00781 1.512
0.01172 1.514
0.01562 1.510
0.02344 1.511
0.03125 1.510
0.04688 7.053
0.06250 7.054
0.09375 7.187
0.125 7.184
0.1875 7.177
0.25 7.207
0.375 16.588
0.5 24.930
0.75 39.394
1 56.615
1.5 77.308
2 84.909
3 89.056
4 88.485
6 88.678
8 89.022
12 88.513
16 88.369
24 88.512
32 88.536
48 87.792
64 87.716
96 87.589
128 87.608
192 87.457
256 87.388
Run Code Online (Sandbox Code Playgroud)
这个gnuplot脚本:
#! /usr/bin/gnuplot
set terminal …Run Code Online (Sandbox Code Playgroud) 我想在pngcairo终端可用的时候将终端设置为pngcairo而不是png,我不想手动检查它的可用性并且每次都更新我的脚本.
当pngcairo终端不可用时,我的脚本中出现以下错误:
set terminal pngcairo
^
"./script.gnuplot", line 7: unknown or ambiguous terminal type; type just 'set terminal' for a list
Run Code Online (Sandbox Code Playgroud)
如何在我的gnuplot脚本中测试pngcairo的可用性,以便在不存在时将终端设置为png?
我有gnuplot的以下数据文件
1 0.5 0.9
2 -0.1 0.5
3 0.7 0.4
Run Code Online (Sandbox Code Playgroud)
其中第一列是x轴,2,3列是两个不同的图.x轴的坐标总是自然数,它们代表句子中单词的位置,2和3列只是句子中单词的函数结果.
我想知道是否可以在x轴上用句子中的单词标记"1","2",....
如果我愿意的话
1 A 0.5 0.9
2 green -0.1 0.5
3 apple 0.7 0.4
Run Code Online (Sandbox Code Playgroud)
然后代替1,2,3我会有"A""绿色""苹果".
如果可以使用gnuplot,请告诉我.
我有一个a.dat每隔几秒更新一次的数据文件.我希望每隔几秒就在gnuplot中绘制它以查看更改
plot "a.dat"
Run Code Online (Sandbox Code Playgroud)
最简单的方法是什么?谢谢.