很简单的东西.我想要一个函数,比如函数f,用特定的颜色绘制.我还想要一个标有"功能f颜色"的标签,它也以该颜色显示.
到目前为止我正在尝试这个:
set style line 1 lw 3 lc 1
set label "AC" at 0, 70 textcolor 1
Run Code Online (Sandbox Code Playgroud)
但显然"lc"和"textcolor"遵循不同的规格,它抱怨:
"trolo4.pl", line 8: colorspec option not recognized
Run Code Online (Sandbox Code Playgroud)
任何帮助都会很棒!
在gnuplot中,我们绘制箭头:
set arrow from 0,0 to 1,1
Run Code Online (Sandbox Code Playgroud)
我想用箭头制作一个情节而没有其他数据.我怎样才能做到这一点.现在,在设置箭头后,我需要给出一些绘图,因为没有箭头就不会被绘制.是否有可能在没有任何数据的情况下绘制一个空的"情节"?
我正在生成一些声音文件,这些声音文件以不同的频率播放音调,并具有一定数量的谐波.
最终,这些声音将在带有小扬声器的设备上播放.
我有扬声器的频率响应曲线,并希望在Python中执行以下操作:
gnuplot有人知道吗 :
我正在使用gnuplot创建两个彼此相邻的图.我想给整个事情一个标题,但是如果我使用标准set title "blah"命令我得到两个标题 - 每个标题一个.我怎样才能获得一个标题(位于图上方)?
我正在使用以下gnuplot命令创建一个图:
#!/bin/bash
gnuplot << 'EOF'
set term postscript portrait color enhanced
set output 'out.ps'
plot 'data_file' u 3:2 w points , '' u 3:2:($4!=-3.60 ? $1:'aaa') w labels
EOF
Run Code Online (Sandbox Code Playgroud)
这里data_file看起来是这样的:
O4 -1.20 -0.33 -5.20
O9.5 -1.10 -0.30 -3.60
B0 -1.08 -0.30 -3.25
B0.5 -1.00 -0.28 -2.60
B1.5 -0.90 -0.25 -2.10
B2.5 -0.80 -0.22 -1.50
B3 -0.69 -0.20 -1.10
Run Code Online (Sandbox Code Playgroud)
我希望gnuplot 用列中找到的字符串标记所有点1,除了列4等于-3.60的那个点,在这种情况下我想要aaa字符串.什么我得到的是,$4=-3.60数据点被正确标记为aaa,但其余的没有被标记 …
我试图从一个图(文本标签和小垂直线)中删除xtics并替换为我自己的自定义xtics(标签垂直线).我可以添加文本标签和箭头而不是xtics(http://gnuplot.sourceforge.net/demo/textrotate.html),但必须有一个更简单的解决方案.
我试过这个:
unset xtics
set xtics format ""
set xtics scale 0
set xtics add ("someTicLabel1" someFloat1)
set xtics add ("someTicLabel2" someFloat2)
Run Code Online (Sandbox Code Playgroud)
它摆脱了默认的xtics标签,但保留了xtic垂直线.我怎么摆脱他们?
我正在使用Xubuntu 13.10,我通过编译来安装gnuplot.但是,当我测试"情节"的功能时,它出错:
$ python PlotSccDistr.py
set terminal png size 1000,800
^
"scc.example.plt", line 16: unknown or ambiguous terminal type; type just 'set terminal' for a list
Run Code Online (Sandbox Code Playgroud)
如果我想设置终端png,但我在列表中找不到"png":
$ gnuplot
G N U P L O T
Version 4.6 patchlevel 5 last modified February 2014
Build System: Linux x86_64
Copyright (C) 1986-1993, 1998, 2004, 2007-2014
Thomas Williams, Colin Kelley and many others
gnuplot home: http://www.gnuplot.info
faq, bugs, etc: type "help FAQ"
immediate help: type "help" (plot window: hit 'h')
Terminal type …Run Code Online (Sandbox Code Playgroud) 我有类似的东西:
set grid xtics lt 0 lw 1 lc rgb "#a9a9a9"
set grid ytics lt 0 lw 1 lc rgb "#a9a9a9"
Run Code Online (Sandbox Code Playgroud)
或者没有"xtics"标签,并且工作正常!但如果我补充:
unset xtics
Run Code Online (Sandbox Code Playgroud)
然后网格也消失了:(
我怎么才能有一个网格,没有抽搐?
我正在使用gnuplot脚本
#qe.conf
set terminal png truecolor
set output "qe.png"
set xrange ["400" : "700"]
set yrange ["0" : "1"]
set style data lines
plot "qe.txt" using 1:2 title "%Red", '' using 1:3 title "%G-r", '' using 1:4 title "%G-b", '' using 1:5 title "%R"
Run Code Online (Sandbox Code Playgroud)
我正在通过shell脚本执行gnuplot脚本qe.conf它给了我以下错误
gnuplot>情节"qe.txt"使用1:2标题"%Red",''使用1:3标题"%Gr",''使用1:4标题"%Gb",''使用1:5标题" %R"^第0行:警告:跳过没有有效点的数据文件
gnuplot>情节"qe.txt"使用1:2标题"%Red",''使用1:3标题"%Gr",''使用1:4标题"%Gb",''使用1:5标题" %R"^第0行:警告:跳过没有有效点的数据文件
gnuplot>情节"qe.txt"使用1:2标题"%Red",''使用1:3标题"%Gr",''使用1:4标题"%Gb",''使用1:5标题" %R"^第0行:警告:跳过没有有效点的数据文件
gnuplot>情节"qe.txt"使用1:2标题"%Red",''使用1:3标题"%Gr",''使用1:4标题"%Gb",''使用1:5标题" %R"^第0行:警告:跳过没有有效点的数据文件
但是当我手动执行qe.conf时,我工作正常
数据文件在这里.
400.0 0.3625060772
410.0 0.445987595886
420.0 0.503862994331
430.0 0.534251869841
440.0 0.576047041939
450.0 0.594211326218
460.0 0.58079588866
470.0 0.506666961836
480.0 0.495652452097
490.0 0.426107864611
500.0 0.342632041157
510.0 0.251232093174
520.0 …Run Code Online (Sandbox Code Playgroud) 如何在具有这种数据结构的Gnuplot中绘制(2D绘图)矩阵,使用第一行和列作为ax和y ticks(第一行的第一个数字是列数)并表示其余值通过颜色映射,可以在2D平面上看到它?
4 0.5 0.6 0.7 0.8
1 -6.20 -6.35 -6.59 -6.02
2 -6.39 -6.52 -6.31 -6.00
3 -6.36 -6.48 -6.15 -5.90
4 -5.79 -5.91 -5.87 -5.46
Run Code Online (Sandbox Code Playgroud)