GNUPlot绘制曲线

发现gnuplot在mac上编译安装相当方便,在线下为了測试java老堆和lucene索引大小,须要绘制两条线,可是直接点连的线很难看,所以后面使用贝塞尔曲线。

脚本例如以下:


#! /usr/local/bin/gnuplot -p


set terminal canvas;
set output "canvas.html"
set title "Illustration";
set xlabel "Time(Unit:second)";
set ylabel "Old Generation Heap Size/Index Size(Unit:GB)";

plot "OldGenerationHeap" using 1:2 smooth bezier, "IndexSize" using 1:2 smooth bezier;


秀秀最后成果:


非常不错哦!

原文地址:https://www.cnblogs.com/brucemengbm/p/7100072.html