Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Ukaz

129 views
Skip to first unread message

Nicolas

unread,
Jun 2, 2016, 6:20:04 AM6/2/16
to
hello,

how to have the values x time ?
with gnuplot it's :
set data time
set timefmt '%H:%M:%S'

but with Ukaz this command is not recognized

Thanks for your help

Alexandre Ferrieux

unread,
Jun 2, 2016, 6:27:51 AM6/2/16
to
A cursory scan of the (concise) source shows no hint of the feature ("time" and "clock" being natural keywords). Guess you can suggest this extra to Christian.
Being a heavy user of gnuplot, I confirm, it is extremely useful. So, count me as +1 :)

-Alex

Christian Gollwitzer

unread,
Jun 2, 2016, 10:19:21 AM6/2/16
to
Hi Nicolas & Alex,

Am 02.06.16 um 12:27 schrieb Alexandre Ferrieux:
> On Thursday, June 2, 2016 at 12:20:04 PM UTC+2, Nicolas wrote:
>> how to have the values x time ? with gnuplot it's : set data time
>> set timefmt '%H:%M:%S'
>>
>> but with Ukaz this command is not recognized
>>
> A cursory scan of the (concise) source shows no hint of the feature
> ("time" and "clock" being natural keywords). Guess you can suggest
> this extra to Christian. Being a heavy user of gnuplot, I confirm, it
> is extremely useful. So, count me as +1 :)

Yes, that's right, there is no option so far to support formatting of
time. You can set the formatstring using e.g.

.g configure -xformat %.3g

(the "set format x/y" is subcommand is just missing, would be easy to
fix), but the formatstring is passed to "format". It would be an easy
addition to have a "formatcmd" option, so that instead of "format", you
can give your own procedure. Then you could do:

set formatcmd x {apply {t} {clock format $t -format %H:%M:%S}}

or something similar.

Christian

Christian Gollwitzer

unread,
Jun 2, 2016, 12:59:59 PM6/2/16
to
Am 02.06.16 um 12:20 schrieb Nicolas:
> how to have the values x time ?
> with gnuplot it's :
> set data time
> set timefmt '%H:%M:%S'
>

Oh, maybe now I see that I have misinterpreted this request. It is not
about formatting tic marks as time values, but about *reading* ascii
files with formatted time stamps? If this is the case: sorry, the part
in ukaz which parses ASCII files is a mere convenience function, which
was added because it is just a screenful of code. You can always parse
the timestamp data yourself using standard Tcl stuff (open, split, clock
scan...) and pass the data as a list to ukaz.

ukaz is mostly meant to display data computed from within Tcl. For a
standalone tool, better use gnuplot directly, which has much more
options (and is faster etc.).

Christian

Nicolas

unread,
Jun 2, 2016, 1:29:18 PM6/2/16
to
> Oh, maybe now I see that I have misinterpreted this request. It is not
> about formatting tic marks as time values, but about *reading* ascii
> files with formatted time stamps? If this is the case: sorry, the part
> in ukaz which parses ASCII files is a mere convenience function, which
> was added because it is just a screenful of code. You can always parse
> the timestamp data yourself using standard Tcl stuff (open, split, clock
> scan...) and pass the data as a list to ukaz.
>
> ukaz is mostly meant to display data computed from within Tcl. For a
> standalone tool, better use gnuplot directly, which has much more
> options (and is faster etc.).
>
> Christian

Thanks Christian for the reply and Alex for +1 !
if I use your example, there is a way to display the values x to H:M:S ?
because if I scan my time values I have very large values and "configure -xformat" allows me to put with an exponent value.

is it possible to put my -xformat by -xformat " %H:%M:%S" ?

package require ukaz
pack [ukaz::graph .g -width 500 -height 400] -expand yes -fill both
set t1 [clock scan "00:04:05"]
set t2 [clock scan "00:08:05"]
set data [list $t1 4.5 $t2 8]
.g plot $data
.g configure -xformat %.3g




Christian Gollwitzer

unread,
Jun 3, 2016, 1:38:26 AM6/3/16
to
Am 02.06.16 um 19:29 schrieb Nicolas:
> is it possible to put my -xformat by -xformat " %H:%M:%S" ?
>
> package require ukaz
> pack [ukaz::graph .g -width 500 -height 400] -expand yes -fill both
> set t1 [clock scan "00:04:05"]
> set t2 [clock scan "00:08:05"]
> set data [list $t1 4.5 $t2 8]
> .g plot $data
> .g configure -xformat %.3g

Not yet, but it is an easy addition. I'll change that and notify you,
when you can update.

Christian

Christian Gollwitzer

unread,
Jun 3, 2016, 9:37:20 AM6/3/16
to
Am 02.06.16 um 19:29 schrieb Nicolas:
> is it possible to put my -xformat by -xformat " %H:%M:%S" ?

I have updated ukaz to allow arbitrary formatting of the tic labels and
time formatting. Get the newest version from github. Your updated
example can be found at
https://github.com/auriocus/ukaz/blob/master/demo/axisformat.tcl

BTW, I am really pleased that somebody else uses ukaz.

Best regards,

Christian

Nicolas

unread,
Jun 3, 2016, 11:35:33 AM6/3/16
to
> I have updated ukaz to allow arbitrary formatting of the tic labels and
> time formatting. Get the newest version from github. Your updated
> example can be found at
> https://github.com/auriocus/ukaz/blob/master/demo/axisformat.tcl
>
> BTW, I am really pleased that somebody else uses ukaz.
>
> Best regards,
>
> Christian

Formidable !!

Thanks Christian
I hope that you will still continue to work on this project, good job !

0 new messages