|
From: Alan C. <ala...@gm...> - 2018-10-12 19:36:59
|
I don't begin to understand all that but see %u and %w in the strftime
man page. You can get an integer 1-7 or 0-6.
On 10/12/18, theozh <th...@gm...> wrote:
> 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
>
>
>
>
>
>
> _______________________________________________
> gnuplot-info mailing list
> gnu...@li...
> Membership management via:
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
--
-------------
No, I won't call it "climate change", do you have a "reality problem"? - AB1JX
Cities are cages built to contain excess people and keep them from
cluttering up nature.
Impeach Impeach Impeach Impeach Impeach Impeach Impeach Impeach
|