|
From: jc105 <jch...@np...> - 2013-06-24 06:15:50
|
Hi all,
I am using the following script to draw a multiplot for the parameters
entered by command line, the plot is generated correctly but if two
parameters are entered both are plotted using the same color i.e red. How
can I use different colors for plotting of every parameter?
gawk ' BEGIN {lineType=1;keyPos=1; plotCount=1;
print "set term png small color ";
print "set output \"'$OutFile'\"";
print "set multiplot";
print "set xdata time";
print "set title \"'$DB_name'\"";
print "set ylabel \"\" ";
print "set xlabel \"Time\"";
print "set border";
print "set ytics";
print "set xtics";
print "set mxtics";
print "set grid";
print "set lmargin 10";
print "set rmargin 10"
print "set bmargin 4";
print "set tmargin 4";
print "set origin 0,0";
print "set size 1,1";}
/^[e]/ && FNR>1 {print "e\n";
print "set noborder";
print "set noytics";
if(plotCount==2) print "set y2tics";
else print "set noy2tics";
print "set title \"\"";
print "set xlabel \"\"";
print "set ylabel \"\"";
}
/^[e]/ {
getline;
if(plotCount==1)
print "set ylabel \""$0"\"";
else if(plotCount==2)
{print "set y2label \""$0"\"";
print "set ylabel \"\""; }
else
{print "set y2label \"\"";
print "set ylabel \"\""; }
getline;
getline;
print "set key at screen .9 , ",keyPos-=.025 ;
print "plot \"-\" using ($1 - 946665000): ($2) title \""$0"\" with lines
", 2*(lineType++)-1;
getline;
plotCount++;
}
/^[0-9]/ {if($1-lastEpochSec > 120) print "\n";
lastEpochSec=$1;
print $0;};
END {print "e"};' |
gnuplot
--
View this message in context: http://gnuplot.10905.n7.nabble.com/multiplot-font-color-same-tp17436.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|