gnuplot初级

it2022-06-26  97

由于写小论文的需要,需要用到gnuplot,本到用什么学什么的观点,仅仅学了简单的折线图和柱状图

标题

set title ""


坐标轴

标签 set xlabel "" set ylabel "" set xlabel font "Time-Roman,25"

范围 set xrange [:]

主刻度:单位 set xtics set xtics ,, set xtics ("" , ...)

分刻度:主刻度之间 set mxtics

字体 set ytic font "Time-Roman,25"


多组数据

using/u 指定使用那一列数据,使用逗号分隔各组数据 plot "" u : title "", "" u :, ...


图例

不显示图例 unset key

图例位置 set key center at , set key left/right set key top/bottom set key outside

字体 set key font "Time-Roman,25"

图例名 set key title ""


线风格

plot "" with/w linespoints/lp

linestyle 连线风格(包括linetype,linewidth等) linetype 连线种类 linewidth/lw 连线粗细 linecolor/lc 连线颜色 pointtype/pt 点的种类 pointsize/ps 点的大小

显示网格 set grid


填充风格

半透明 set style fill transparent solid

无边线 set style fill transparent solid noborder

为了黑白打印,不同花纹填充 set style fill transparent pattern 1 border


柱状图

set style data histogram set style histogram clustered gap


我的plot

unset title set xlabel "Workload Data Sets" set xlabel font "Times New Roman,15"

set ylabel "System Response Time" set ylabel font "Times New Roman,15"

set xrange [-0.5:2.5] set xtic font "Times New Roman,15"

set yrange [0:1] set ytics 0,0.2,1 set ytic font "Times New Roman,15"

set key top set key outside set key font "Times New Roman,15"

set style fill transparent pattern 1 border

set style data histogram set style histogram clustered gap 1

plot "2g_avg_response_time.dat" u 2:xticlabels(1) title columnheader, "" u 3:xticlabel(1) title columnheader

set output "abc.jpg"

转载于:https://www.cnblogs.com/zhouquanbiao1991/p/6223900.html

相关资源:gnuplot工具包

最新回复(0)