Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #2611

Re: concatenating xticlabels and y-axis-formatting

Newsgroups comp.graphics.apps.gnuplot
Date 2014-10-02 01:34 -0700
References (4 earlier) <m04251$hsa$1@dont-email.me> <9c639906-7338-481c-a991-74a92164dcf3@googlegroups.com> <m0bu8g$qpe$1@dont-email.me> <ab82d11d-2cf5-458f-9c83-3ce3b8a2b5d8@googlegroups.com> <m0ff6m$gce$1@dont-email.me>
Message-ID <4fe115cd-3128-4e1a-92f9-476158b65384@googlegroups.com> (permalink)
Subject Re: concatenating xticlabels and y-axis-formatting
From Bart Vandewoestyne <bart.vandewoestyne@gmail.com>

Show all headers | View raw


On Wednesday, October 1, 2014 1:43:14 AM UTC+2, Ethan A Merritt wrote:
>
> OK, I think I understand what you want.

I'm glad I've finally made myself clear :-)

> [...]
> 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)

OK.  I understand what you are doing here.  I had played with 'set ydata time' and 'set timefmt' but I didn't think of the fact that I should plot using ($7/1000.)  Thanks for pointing me to that.

> 3) to label the y axis in time units
> 
>    set format y "%H:%M:%.3S"

I just discovered that I even like the following format more:

set format y "%Hh %Mm %.3Ss"

:-)

> 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.)

Could it be that this 'skip 1' does not work with the version of gnuplot that I have, namely gnuplot 4.6 patchlevel 4 that comes with my Ubuntu Ubuntu 14.04.1 LTS?

> 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.

Same behavior here.

> 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.

Exactly what I experienced and figured out while I was playing with the 'set ydata time' and 'set timefmt' commands.

> 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.

OK.  I'm glad to finally discover that what I want to do is apparently not so obvious in the current version of gnuplot.  Please know that i *did* read/study the documentation ;-)

So for now, I'll stick to the plot with milliseconds, or I try to live with the bug (xticlabels gone) and limitation (24 hour wrapping).

Thanks!
Bart

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

concatenating xticlabels and y-axis-formatting Bart Vandewoestyne <bart.vandewoestyne@gmail.com> - 2014-09-25 01:55 -0700
  Re: concatenating xticlabels and y-axis-formatting Bart Vandewoestyne <bart.vandewoestyne@gmail.com> - 2014-09-25 02:29 -0700
    Re: concatenating xticlabels and y-axis-formatting Ethan A Merritt <EAMerritt@gmail.com> - 2014-09-25 19:51 -0700
      Re: concatenating xticlabels and y-axis-formatting Bart Vandewoestyne <bart.vandewoestyne@gmail.com> - 2014-09-26 04:14 -0700
        Re: concatenating xticlabels and y-axis-formatting Ethan A Merritt <EAMerritt@gmail.com> - 2014-09-26 08:53 -0700
          Re: concatenating xticlabels and y-axis-formatting Bart Vandewoestyne <bart.vandewoestyne@gmail.com> - 2014-09-29 01:53 -0700
            Re: concatenating xticlabels and y-axis-formatting Ethan A Merritt <EAMerritt@gmail.com> - 2014-09-29 08:35 -0700
              Re: concatenating xticlabels and y-axis-formatting Bart Vandewoestyne <bart.vandewoestyne@gmail.com> - 2014-09-30 08:10 -0700
                Re: concatenating xticlabels and y-axis-formatting Ethan A Merritt <sfeam@users.sourceforge.net> - 2014-09-30 16:43 -0700
                Re: concatenating xticlabels and y-axis-formatting Bart Vandewoestyne <bart.vandewoestyne@gmail.com> - 2014-10-02 01:34 -0700
                Re: concatenating xticlabels and y-axis-formatting Ethan A Merritt <EAMerritt@gmail.com> - 2014-10-02 08:13 -0700

csiph-web