Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Ethan A Merritt Newsgroups: comp.graphics.apps.gnuplot Subject: Re: concatenating xticlabels and y-axis-formatting Date: Tue, 30 Sep 2014 16:43:14 -0700 Organization: gnuplot development Lines: 51 Message-ID: References: <53330d1f-097b-49ec-93da-dbf3d5414330@googlegroups.com> <9c639906-7338-481c-a991-74a92164dcf3@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit Injection-Date: Tue, 30 Sep 2014 23:43:18 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="8e86a57dfa599721f116da4577f3d1af"; logging-data="16782"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18e5q2ZSrLJiMONcCaWTMSu" User-Agent: KNode/4.10.5 Cancel-Lock: sha1:mud+oLbZefeu9s0H5zY38hVDhRs= Xref: csiph.com comp.graphics.apps.gnuplot:2610 Bart Vandewoestyne wrote: > In this graph, the Y-values represent timings. Currently, the Y-labels > are 'equally spaced', but are expressed in milliseconds. I would like to > make it easier to read/interpret for the user, and express the Y-labels in > hours, minutes, seconds instead of milliseconds. OK, I think I understand what you want. There are number of changes needed to your script. The bad news is - it doesn't work. The good news is - it almost works. I'll talk you through it, because some of the pieces work even if the whole thing taken together triggers a bug. 1) gnuplot does time in seconds, not milliseconds, so... plot datafile using ($7/1000.) 2) to read the value as time-in-seconds on y set ydata time set timefmt y "%S" # (version 5 accepts "%s" also) 3) to label the y axis in time units set format y "%H:%M:%.3S" 4) the first line of the file contains labels rather than data so we skip it in plotting: plot datafile skip 1 using ($7/1000.) However there is a limitation and a bug. The bug is that for some reason it loses the xticlabels(...) while labelling the y axis in time units. I'll add that to the bug tracker. The limitation is that gnuplot really thinks this is a date, not a time, so the hours will wrap at 24. There's already a bug tracker item requesting a separate time mode to handle time intervals rather than dates. I'm reasonably sure both of these issues can be fixed before version 5 is released, but I'm afraid you're out of luck until then. Ethan