Hi Denis,

thanks for your request and for the inquiry.

I accept that as feature request and I have added it to the todo list. 
The ETA is some time in the future though: the next two releases are 
planned for other bigger topics.

Regarding your questions:

1. Do you think this is a safe way of doing?

--> Looks good to me. I believe you tested it until you were satisfied?

2. Is there a better way?

--> This is the best approach currently.


3. Could `pgfplots` be able to directly handle data time (without date)
    format?

--> "be made able": yes. I accept that as feature request.


I suggest to stick with the answer(s). Chances are good that I will 
integrate them into pgfplots eventually. Perhaps the current 
developments of a lua backend might help here as well.

Kind regards

Christian


Am 20.10.2014 08:54, schrieb Denis Bitouzé:
> Hi,
>
> on http://tex.stackexchange.com/q/79252/18401, a solution was given to
> let the user have input data of the form `HH:MM:SS` (without
> date). Unfortunately, as pointed out in comments, this solution fails if
> `HH` is `08` or `09` with the error:
>
>    ┌────
>    │ ! Package PGF Math Error: Digit '8' invalid for base 8 (in 
> '08*3600-08*3600+54*60+14.75')
>    └────
>
> A workaround was pointed out on the present list:
>
>    ┌────
>    │ 
> http://pgfplots-features.706524.n3.nabble.com/Pgfplots-features-Octal-numbers-td3124234.html
>    └────
>
> just by removing the leading zeros but it is not always desirable to
> manually change the data. Moreover, the usecase of this post, and hence
> the answer given by Christian, are not relevant for data of the form
> `HH:MM:SS`.
>
> Thanks to http://tex.stackexchange.com/a/52233/18401, a possible
> workaround is, in (see http://tex.stackexchange.com/q/79252/18401), to
> replace the "brut" hours, minutes and second (#1, #2 and #3):
>
> --8<---------------cut here---------------start------------->8---
>      \pgfmathparse{#1*3600-\pgfkeysvalueof{/pgfplots/timeplot 
> zero}*3600+#2*60+#3}
> --8<---------------cut here---------------end--------------->8---
>
> from:
>
> --8<---------------cut here---------------start------------->8---
> \def\transformtime#1:#2:#3!{
>      \pgfkeys{/pgf/fpu=true,/pgf/fpu/output format=fixed}
>      \pgfmathparse{#1*3600-\pgfkeysvalueof{/pgfplots/timeplot 
> zero}*3600+#2*60+#3}
>      \pgfkeys{/pgf/fpu=false}
> }
> --8<---------------cut here---------------end--------------->8---
>   
> by their digital counterparts (`\the\numexpr...\relax`):
>
> --8<---------------cut here---------------start------------->8---
>      \pgfmathparse{%
>        \the\numexpr#1\relax*3600%
>        -\pgfkeysvalueof{/pgfplots/timeplot zero}*3600%
>        +\the\numexpr#2\relax*60%
>        +\the\numexpr#3\relax%
>      }
> --8<---------------cut here---------------end--------------->8---
>
> Now, some questions :)
>
> 1. Do you think this is a safe way of doing?
> 2. Is there a better way?
> 3. Could `pgfplots` be able to directly handle data time (without date)
>     format?
>
> Thanks by anticipation.


------------------------------------------------------------------------------
_______________________________________________
Pgfplots-features mailing list
Pgfplots-features@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgfplots-features

Reply via email to