Menu

#373 MOUSE_X xdata time

None
closed
None
5
2013-10-08
2013-09-18
No Za
No

Hi all,

Im trying to set labels in a time plot. For this pupose I want to click to the location where the lable should appear. The position of the click is stored in MOUSE_X but I'm not able to generate a date from a number like 415493835.314208.

This is because there is no documentation about what this number represents
Also it seems not to be possible to change the format as it is possible for the displayed coordinates.

It would help a lot if the MOUSE_X format is the same as the displayed one or at least is configurable.

Thanks
Best NoZa

Discussion

  • Ethan Merritt

    Ethan Merritt - 2013-09-18

    Documentation: "help time"
    Mouse format configure: typing "h" in the plot window will show you the options available. Hotkey "1" toggles the mouse output format to various states, including time/date.
    Further mouse output format options: "help mouse format"

     
    • No Za

      No Za - 2013-09-19

      Sorry I'm talking about the format of the MOUSE_X variable NOT of the format in which the current position is displayed in the terminal.

      From http://www.gnuplot.info/docs_4.6/gnuplot.pdf Page 127

      The
      set mouse format
      command species a format string for sprintf() which determines how the mouse
      cursor [x,y] coordinates are printed to the plot window and to the clipboard. 
      

      Nothing about MOUSE_X

      Best regards
      Norbert

       
  • Ethan Merritt

    Ethan Merritt - 2013-09-20

    The time/date coordinates display during mousing are generated from exactly the same x-coordinate value, time in seconds since the epoch, that is stored in MOUSE_X. You can recreate the default time format used for mouse tracking or choose any other time format you like:

    timefmt = "%d/%m/%Y\t%H:%M"
    print sprintf(timefmt,MOUSE_X)
    
     
    • No Za

      No Za - 2013-10-08

      Thanks a lot Ethan!

      I think we can close this ticket

       

      Last edit: No Za 2013-10-08
  • Ethan Merritt

    Ethan Merritt - 2013-10-08
    • status: open --> closed
    • Group: -->
     

Log in to post a comment.