Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#166 color-code by date - cb data in exclusive column

None
closed
nobody
None
5
2014-08-23
2014-03-12
Anonymous
No

Hello, as I had little success finding help via search and this does look like a bug or missing feature, I'm creating this ticket.

It appears that there was a similar report in 2005: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=325052
This was apparently fixed in 4.2~rc2-1.

The version:

gp465-win32-mingw-rc2.exe from the 'testing (pre-release) binaries' on Win 7 x64 Pro in PowerShell.

The issue:

I have 3- or 4-dimensional data of type:

x y {z} date

I want to color-code the data according to the associated date, i.e. from earliest to latest.

Using this code for 4-dimensional data

reset
set cbdata time
set timefmt '%H:%M:%S'

splot '-' using 1:2:3:4 with line palette
1 1 1 12:15:00
2 2 2 12:16:00
3 3 3 12:17:00
e

produces the warning

Warning: empty cb range [12:12], adjusting to [11.88:12.12]

and colors the line uniformly.

The same happens for 3-dimensional data with

reset
set cbdata time
set timefmt '%H:%M:%S'

plot '-' using 1:2:3 with line palette
1 1 12:15:00
2 2 12:16:00
3 3 12:17:00
e

Discussion

  • Ethan Merritt
    Ethan Merritt
    2014-03-12

    Ticket moved from /p/gnuplot/bugs/1354/

     
  • Ethan Merritt
    Ethan Merritt
    2014-03-12

    Not a bug.
    I don't have time right now to answer fully, but this may get you started:

    timefmt = '%H:%M:%S'
    splot '-' using 1:2:3:(strptime(timefmt,strcol(4))) with line palette
    1 1 1 12:15:00
    2 2 2 12:16:00
    3 3 3 12:17:00
    e

     
  • Ethan Merritt
    Ethan Merritt
    2014-06-18

    • status: open --> closed
    • Group: 5.0 -->