Hi!
i want to print ot my data of the last seven days with gnuplot.
in a script i put my gnuplot-script and at the top i generate my date-variable.
#/bin/bash -e
# Gnuplot script "API_Status.txt"
# set terminal postscript color landscape dl 2 lw 2 'Helvetica' 15 ;
# set output "status.eps"
# Variable - TIME
Z=7 # Zeitspanne
M=$`date +%m`
D=$`date +%d`
Ma=$`date --date="$Z days ago" +%m`
Da=$`date --date="$Z days ago" +%d`
gnuplot -persist << EOF
#set terminal postscript eps color
set key off #
#unset log # remove any log-scaling
#unset label # remove any previous labels
#set title "METE-Daten - "
set xdata time
set timefmt "%m/%d/%y-%H%M%S"
set format x "%d.%m\n00:00"
set grid noxtics nomxtics ytics nomytics noztics nomztics \
nox2tics nomx2tics noy2tics nomy2tics nocbtics nomcbtics
set xtics 86400 # x-Achsen-raster ein Tag in sec
set mxtics 4 # Aufteilung des Tages in 4 * 6h
set xrange [ "Ma/Da/12":"M/D/12" ] # Zeitfenster festlegen
# set xlabel "Zeit (h)"
#Multiplot
#-----------------------
set multiplot
....
It give me the grafik, but over the complete month. My idea is, that
$`date --date="$Z days ago" +%m`
will not work properly. i tried allready to put it into brackets but without success. Maybe an alternetiv spefication of the time-variable?
Can someone help me?
Thanks in advance!
IMPe