如何在gnuplot上绘制不同类型的线?我得画出不同的颜色.我的脚本加入了几个文件,我认为这就是为什么这些行不是破折号的原因.四个中只有两个是破灭的.谢谢费利佩
#!/usr/bin/gnuplot
set grid
set title 'Estado dos arquivos no BTRIM com peers de comportamento condicionado'
set xlabel 'Tempo discreto'
set ylabel 'Quantidade de arquivos'
set style line 1 lc rgb '#0060ad' lt 1 lw 2 pi -1 ps 1.0
set style line 2 lc rgb '#dd181f' lt 9 lw 2 pi -1 ps 1.0
set style line 3 lc rgb '#29c524' lt 6 lw 2 pi -1 ps 1.0
set style line 4 lc rgb '#7D72F9' lt 7 lw …Run Code Online (Sandbox Code Playgroud) 如何在gnuplot中更改磅值,形状和颜色.
plot "./points.dat" using 1:2 title with dots
Run Code Online (Sandbox Code Playgroud)
我使用上面的命令绘制图形,但它显示非常小的点.
我试着用命令
set pointsize 20
Run Code Online (Sandbox Code Playgroud)
但仍然点大小相同.
我经常在gnuplot提示shell中绘制图形,如下所示:
gunuplot> plot sin(x) with linespoints pointtype 3
Run Code Online (Sandbox Code Playgroud)
这个数字显示出来很棒.
今天,我将图表保存在一个.png文件中,如下所示:
gnuplot> set term png
gnuplot> set output "output.png"
gunuplot> plot sin(x) with linespoints pointtype 3
Run Code Online (Sandbox Code Playgroud)
然后,我打开output.png用eog在Ubuntu,就像这样:
$ eog output.png
Run Code Online (Sandbox Code Playgroud)
我发现,显示的output.png eog不如提示shell中绘制的数字好.
这是为什么?在保存之前我需要调整一些设置output.png吗?
PS
我找到了解决它的方法,首先,
set term postscript
set output "output.ps"
Run Code Online (Sandbox Code Playgroud)
然后在linux shell中
$ convert output.ps output.jpg
Run Code Online (Sandbox Code Playgroud)
这种方式解决了我的问题.
我有以下数据集.我想用python或gnuplot来绘制数据.元组的形式为(x,y).Y轴应为对数轴.IE日志(y).散点图或线图是理想的.
如何才能做到这一点?
[(0, 6.0705199999997801e-08), (1, 2.1015700100300739e-08),
(2, 7.6280656623374823e-09), (3, 5.7348209304555086e-09),
(4, 3.6812203579604238e-09), (5, 4.1572516753310418e-09)]
Run Code Online (Sandbox Code Playgroud) 我有两对数据集,我需要使用Gnuplot进行绘图.
我想要将第一对绘制成红色,一个实体和一个虚线.第二对,我想绘制蓝色,一个实体和一个虚线.
我已set style line多次尝试过,但我无法得到这种确切的行为.我的最后一次尝试(附件)绘制了第一对红色(实心)和第二对蓝色(虚线).
任何帮助将不胜感激.
set style line 1 lt 1 lw 3 pt 3
set style line 2 lt 1 lw 3 pt 3
set style line 3 lt 3 lw 3 pt 3
set style line 4 lt 3 lw 3 pt 3
plot 'data1.dat' using 1:3 w l ls 1,\
'data1.dat' using 1:4 w l ls 2,\
'data2.dat' using 1:3 w l ls 3,\
'data2.dat' using 1:4 w l ls 4
Run Code Online (Sandbox Code Playgroud) 我在一些文本文件中有数据,可以说10000行和2列.我知道我可以轻松地绘制它plot "filename.txt" using 1:2 with lines.然而我想要的只是绘制让我们说1000到2000的行或任何其他合理的选择.是否可以轻松地做到这一点?非常感谢你提前.
基本上,我遇到的问题是图例重叠了我试图绘制的gnuplot图,如下图所示.

以下是我用于绘制数据的命令.
> set log y
> plot "datafile1.txt" using 2:4 with lines,
"datafile1.txt" using 2:6 with lines,
"datafile2.txt" using 2:4 with lines,
"datafile2.txt" using 2:6 with lines
Run Code Online (Sandbox Code Playgroud)
以下是我用于绘制数据的数据文件1的一部分.
Dimension: 259 Timing: 36111 seconds, 9 seconds
Dimension: 260 Timing: 37860 seconds, 9 seconds
Dimension: 261 Timing: 39477 seconds, 6 seconds
Dimension: 262 Timing: 41215 seconds, 5 seconds
Dimension: 263 Timing: 41827 seconds, 5 seconds
Dimension: 264 Timing: 42738 seconds, 11 seconds
Dimension: 265 Timing: 42972 seconds, 14 seconds
Dimension: 266 …Run Code Online (Sandbox Code Playgroud) 我有一个关于GNUPLOT中x轴的日期和时间的快速问题.我会让代码说话:
这是我的数据:
#Time Data in Data out
"2013-07-22 15:59:00" 6286 3730
"2013-07-22 15:58:00" 10695 14589
"2013-07-22 15:57:00" 17868 26464
"2013-07-22 15:56:00" 18880 34012
"2013-07-22 15:55:00" 19206 41192
"2013-07-22 15:54:00" 20365 43218
"2013-07-22 15:53:00" 18459 39298
"2013-07-22 15:52:00" 3420 4686
"2013-07-22 15:51:00" 3256 4942
Run Code Online (Sandbox Code Playgroud)
这是生成图形的代码:
gnuplot> set title "Data usage over the last 24 hours"
gnuplot> unset multiplot
gnuplot> set xdata time
gnuplot> set style data lines
gnuplot> set term png
Terminal type set to 'png'
Options are 'nocrop font "arial,12" …Run Code Online (Sandbox Code Playgroud) 我正在运行Mac OS Mavericks 10.9.4.
通过带有gnuplot 4.6的Homebrew安装了Octave 3.8.1
安装了XQuartz 2.7.6.
一切都完成后我重新启动了我的电脑.
为了在octave-cli中绘图,每个人都说我应该'设置终端x11'但是当我在gnuplot中运行'set terminal'时我甚至没有列出x11
当然octave-cli会抱怨我的终端未知.
octave:1> x=1;
octave:2> plot(x);
gnuplot> set terminal aqua enhanced title "Figure 1" size 560 420 font "*,6" dashlength 1
^
line 0: unknown or ambiguous terminal type; type just 'set terminal' for a list
Run Code Online (Sandbox Code Playgroud)
我做错了什么?我该如何调试这种情况?
rami@ramis-macbook:~> gnuplot
G N U P L O T
Version 4.6 patchlevel 5 last modified February 2014
Build System: Darwin x86_64
Copyright (C) 1986-1993, 1998, 2004, …Run Code Online (Sandbox Code Playgroud) 我的问题在于这个问题的精神非常相似:什么是最好的Python绘图库?
在C中绘制数据的最佳选择是什么? 我最好放弃一个库,只生成我可以直接输入gnuplot的数据吗?
我对这个问题的推动是能够可视化DSP转换,同时研究我早期问题中的优秀资源.所以焦点实际上只是二维图,直方图等; 3D现在不那么重要了.