Menu

Overriding tick labels in gnuplot

Help
Gnome
2014-08-17
2014-08-17
  • Gnome

    Gnome - 2014-08-17

    1 down vote favorite

    I have a text file containing data like this:

       Date          Hour          Data
    2014/01/01        00            5
    2014/01/01        01            10
    2014/01/01        02            7
    2014/01/01        03            6
    .
    .
    .
    2014/01/01        23            4
    2014/01/02        00            6
    2014/01/02        01            9
    2014/01/02        02            2
    .
    .
    .
    

    I want to plot the file in gnuplot with "Data" on y axis and "Hour" on x axis which I know how to do that. I also want that when "Hour" value is "00" (or at the changing of dates) the related "Date" appears on the x axis instead of "Hour". any idea?

     
  • Ethan Merritt

    Ethan Merritt - 2014-08-17

    plot 'info.dat' using 0:3:xtic(($2==0)?strcol(1):strcol(2))

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.