我想将一个数字绘制成PNG格式(避免使用转换),但是我的Gnuplot发行版不提供PNGCAIRO终端.我该如何安装/启用它?我在Mac OS X 10.6上使用Gnuplot 4.4,patchlevel 2.
[me]machine @ test $ gnuplot
G N U P L O T
Version 4.4 patchlevel 2
last modified Wed Sep 22 12:10:34 PDT 2010
System: Darwin 10.8.0
Copyright (C) 1986-1993, 1998, 2004, 2007-2010
Thomas Williams, Colin Kelley and many others
gnuplot home: http://www.gnuplot.info
faq, bugs, etc: type "help seeking-assistance"
immediate help: type "help"
plot window: hit 'h'
Terminal type set to 'x11'
gnuplot> set terminal pngcairo
^
unknown or ambiguous terminal type; type just …Run Code Online (Sandbox Code Playgroud) 我的"file.txt"文件中的数据如下所示(显示的示例行)
31 1772911000 6789494.2537881
Run Code Online (Sandbox Code Playgroud)
请注意,第二列是平均值,第三列是我输入样本的标准偏差.因此,对于误差条,我需要x轴值为31的条形,误差条从(第二列值)开始 - (第三列值),并以(第二列值)+(第三列值)结束).我尝试了以下方法:
plot "file.txt" using ($1-$2):1:($2+$1) with errorbars
Run Code Online (Sandbox Code Playgroud)
但结果不合适.有帮助吗?
我正在gnuplot中绘制一个包含六列的数据文件.如果第2列对第1列的图是x(t),我希望图例中的那条线类似于x(t),而不是我目前第二列对第一列得到的那条线"trial.dat" u 1:2.
那么我如何命名传奇线呢?
我试图创建具有多个堆叠柱状图就像例如8情节在这里.但对于我的数据,每个组都有相同的四个类别.

如何更改颜色和键以使每个堆叠的列的颜色变为红色,绿色,蓝色,粉红色?所以关键只有我正在绘制的4件事中的每一件都有一份?
这是我用来绘制的线:
plot newhistogram "1", 'addresses.dat' using 2:xtic(1) t 2, '' u 3 t 3, \
'' u 4 t 4, '' u 5 t 5, newhistogram "2", '' u 6 t 6, '' u 7 t 7, '' u 8 t 8,\
'' u 9 t 9
Run Code Online (Sandbox Code Playgroud)
我的数据格式与我上面链接的示例格式相同:
Address PAL_Code BASH App Kernel PAL_Code BASH App Kernel
FFT 1 1 2 2 1 1 3 4
RADIX 1 2 3 4 1 2 4 5
LU …Run Code Online (Sandbox Code Playgroud) 我有两个文件:一个是x坐标,另一个是y.
有没有办法使用gnuplot在一个图中绘制这两个文件?或者有没有办法逐行连续这两个文件?
谢谢
是否可以动态更改Gnuplot脚本中的条形颜色?我有以下脚本
reset
fontsize = 12
set term postscript enhanced eps fontsize
set output "bargraph_speedup.eps"
set style fill solid 1.00 border 0
set style histogram
set style data histogram
set xtics rotate by -45
set grid ytics linestyle 1
set xlabel "Benchmarks" font "bold"
set ylabel "Relative execution time vs. reference implementation" font "bold"
set datafile separator ","
plot 'bm_speedup.dat' using 2:xtic(1) ti "Speedup" linecolor rgb "#00FF00"
Run Code Online (Sandbox Code Playgroud)
这会产生这个情节:

是否可以使零度以下的条形颜色变为红色?
谢谢,
斯文
我有一个包含以下格式数据的文件:
1351649601.045 421 2945
1351649601.684 1036 28591
1351649603.310 128 1620
1351649603.413 93 0
1351649603.375 132 1762
1351649603.318 218 1761
1351649603.434 412 176
1351649603.441 520 5780
1351649603.480 565 11070
1351649603.556 644 11535
gnuplot> set term png
Terminal type set to 'png'
gnuplot> set output "output.png"
gnuplot> plot "data.txt" using 1:2 with lines
Run Code Online (Sandbox Code Playgroud)
但是,gnuplot无法正确读取日期.你有什么想法?
解决了:
set term png xffffff
set output "output.png"
set size 17,17
set title "HTTP payload size and response time"
set style data fsteps
set xlabel "Date"
set timefmt …Run Code Online (Sandbox Code Playgroud) 我有两个功能,如:
f(x)=2**x
g(x)=1024
Run Code Online (Sandbox Code Playgroud)
我如何使用gnuplot为x从0到10绘制这两个函数并填充它们之间的空间?
我有一个直方图,其中包含一些小值和一些非常大的值.如何将y轴分为两部分?
编辑:

gnuplot样本:
set style histogram columnstacked
set style data histograms
set key autotitle columnheader
plot for [i=2:6] 'test.dat' using i
Run Code Online (Sandbox Code Playgroud)
TEST.DAT:
action device1 device2 device3
load 200 203 190 2 4
process 3 9 6 7 3
save 4 2 7 4 3
Run Code Online (Sandbox Code Playgroud)