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


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

Re: concatenating xticlabels and y-axis-formatting

From Ethan A Merritt <sfeam@users.sourceforge.net>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: concatenating xticlabels and y-axis-formatting
Date 2014-09-30 16:43 -0700
Organization gnuplot development
Message-ID <m0ff6m$gce$1@dont-email.me> (permalink)
References (3 earlier) <53330d1f-097b-49ec-93da-dbf3d5414330@googlegroups.com> <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>

Show all headers | View raw


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

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