Re: strptime() fails to recognize negative hours

Hans-Bernhard Bröker <[email protected]>
Newsgroups gmane.comp.graphics.gnuplot.user
Message-ID <[email protected]>
Am 02.04.2020 um 20:31 schrieb Sergei Naumov via gnuplot-info:

> Well, this whole mess comes from the fact that gnuplot, it seems, can not read
> A COLUMN in an arbitrary formatted way.

No, that's not what this comes from.

> But it would be cool to make a formatted reading available:
> 
> set xdata format "%tH:%tM:%tS"
> set ydata format "%tH:%tM:%tS"
> plot 'datafile' using ($1.1+$1.2/60+$1.3/3600):($2.1+$2.2/60+$2.3/3600)

That would not improve anything because that's exactly what the existing 
code already does behind the scenes (except that it works in seconds,not 
hours).  The actual syntax for that is either (old-style)

	set xdata time
	set ydata time
	set timefmt'%tH:%tM:%tS'
	plot 'datafile' using 1:2

or (new-style)

	plot 'datafile' using 
(timecolumn(1,"%tH:%tM:%tS")):(timecolumn(2,"%tH:%tM:%tS"))

So spelling it out in user-land instead of letting the internal 
machinery handle it will not yield any different result.





_______________________________________________
gnuplot-info mailing list
[email protected]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.