gnuplot - Positioning labels on x axis -
i trying plot simple graph, x , y coordinates, how axis labels not quite wish.
- how can change '1e+08' , on true value, 100000000
- how can shift labels of xtics down don't obscure graph?
- can print coordinates in graph of certian points, example dip between 2014-05-10-04-00 , 2014-05-10-08-00?
- how can 1 add more intervals in labels of x axis?
here input i'm using:
reset clear set output "bytesovertime.png" set title "evolution of bytes on time" set ylabel 'bytes' set xlabel 'time' set key off set term png set xdata time set timefmt "%y-%m-%d-%h-%m" set format x "%y-%m-%d-%h-%m" set xtics rotate 90 nomirror set datafile separator ' ' set logscale y plot "timebytesaverage.out" using 1:2 and file if needed test: http://pastebin.com/raw.php?i=qqpejj4v

how can change '1e+08' , on true value, 100000000
set format y "%f" or, give decimal numbers:
set format y "%.0f" you may have at
set format y "%.0s%cbyte" which create mbyte, gbyte, ... (see right y-axis in plot) however, base of 1000, not 1024.
how can shift labels of xtics down don't obscure graph?
set xtics rotate 90 nomirror right will right-align (left-flush) tic marks
can print coordinates in graph of certian points, example dip between 2014-05-10-04-00 , 2014-05-10-08-00?
if know coordinates, yes:
set xtics add ("high" "2014-05-09-23-30", "low" "2014-05-10-22-30" ) the general syntax is:
set xtics add ( <label1> <position1>, <label2> <position2> , ...) this add list of labels automatically generated labels. if omit word add, there no automatically generated labels, in list.
how can 1 add more intervals in labels of x axis?
set xtics 3600 will generate label every 3600 seconds, i.e. every hour. not work log scale axes.
set mxtics 2 will cause gap between 2 major (labeled) tics being divided 2 smaller gaps, i.e. 1 minor tic mark between 2 major ones. (however, seems not necessary here, gnuplot decides use 2 on it's own)
and here result:

note added
set y2tics set y2range[1e8:1e12] set format y2 "%.0s%cbyte" set logscale y2 to demonstrate special format on right y-axis.
and way: format of labels on y-axis independent format in data file.
set timefmt "%y-%m-%d-%h-%m" defines format inside file
set format x "%y-%m-%d-%h-%m defines format in plot. ou may set format x "%y-%m-%d %h:%m more readable.
Comments
Post a Comment