Menu

#500 Displaying date/time in interactive window according to current format

None
closed-works-for-me
nobody
5
2020-04-12
2020-03-26
theozh
No

Would it be possible to display a date/time format in the status bar in the current date/time format?

Explanation:
If you are moving the mouse over a plot (e.g. wxt terminal probably others as well). You will get the coordinates displayed in the status bar, which is very useful.
However, when the plot contains time data it will show, e.g. 1.58536e9 instead of 28.03.2020 or whatever the current date/time format is.
Attached illustration below.
Thanks for consideration.

1 Attachments

Discussion

  • Ethan Merritt

    Ethan Merritt - 2020-03-26

    Hot keys 1 and 2 (type key while mouse is in the plot window) cycle forward and back through various possible mouse tracking formats. Several of these are time formats, or you can further customize the output. See 'help set mouse mouseformat'.

     
    • theozh

      theozh - 2020-03-26

      Thank you! Ah, sorry, didn't know about this one. I thought it would have to be hardcoded into the interactive terminal. Very good that you can customize it.

      What about mouse coordinates in multiplots? As far as I can tell, only the coordinates of the last multiplot-subplot are accessible. I assume this is a coordinate transformation from screen pixels to graph coordinates. I'm aware that this won't work for multiplots which are on top of each other, but are there any chances that this could somehow work for several multi-subplots which are next to each other?

       
      • Ethan Merritt

        Ethan Merritt - 2020-03-26

        The problem with multiplot is that to do that inverse transformation from screen coords to plot coords you need to keep the scaling and range information separately for wach plot. Right now that just isn't done. There is only one set of state variables describing the axis parameters, and as soon as you issue a new "plot/splot/replot" command they are overwritten with the new values. So you can't do the inverse transformation for earlier plots because that information isn't around anymore.

        Having said that, it's not impossible. In fact the canvas and svg terminals have to write the necessary information into the output file anyway in order for mousing to work at all. The truly interactive terminals don't do that and I'm not sure how that would work. Would the core code have to keep track of axis mappings for all preious plots? All since the most recent "multiplot" command? Could the core code shove this out to the qt/wxt/win/x11 terminal drivers and let them worry about it?

        It's been a verry longstanding request. If you want to tackle the project or persuade someone else to, probably easiest to start with the svg or canvas terminals since the basic mechanism is already there. Experience gained there could then be taken back to implement either a generic or a per-terminal equivalent for the interactive terminals.

         
  • Ethan Merritt

    Ethan Merritt - 2020-04-12
    • status: open --> closed-works-for-me
    • Group: -->
     

Log in to post a comment.