|
From: theozh <th...@gm...> - 2018-10-12 19:00:20
|
Hello,
is there a way to plot as function of the weekday or as function of weekday+daytime?
I can plot as function of day and as function of daytime, but haven't yet found a way for weekday or weekday+daytime.
Probably, I have to define a function to convert weekday into a number from 0 to 6 (or 1 to 7) and add the daytime as a fraction? Or maybe I overlooked a simple, obvious way?
In the below example I get "warning: Bad time format in string". Could this be a conflict with locale/language settings?
Thank you for hints.
Theo.
The following code should illustrate for testing purpose.
### plot as a function of weekday
# generate some random test data
set print $BirthData
do for [i=1:100] {
RandomDate = rand(0)*1.5e9
RandomNumber = rand(0)*100
print(strftime("%a %d.%m.%Y %H:%M:%S", RandomDate)." ".sprintf("%g",RandomNumber))
}
set print
print $BirthData
set multiplot layout 3,1
set xdata time
set format x "%Y"
plot $BirthData u (timecolumn(2,"%d.%m.%Y")):4
set format x "%H:%M"
plot $BirthData u (timecolumn(3,"%H:%M")):4
set format x "%a"
plot $BirthData u (timecolumn(1,"%a")):4 # does not work! "warning: Bad time format in string"
unset multiplot
### end of code
|