Credits Overview Plotting Styles Commands Terminals

mouseformat

Syntax:

     set mouse mouseformat i
     set mouse mouseformat "custom format"
     set mouse mouseformat function string_valued_function(x, y)

This command controls the format used to report the current mouse position. An integer argument selects one of the format options in the table below. A string argument is used as a format for sprintf() in option 7 and should contain two float specifiers, one for x and one for y.

Use of a custom function returning a string is EXPERIMENTAL. It allows readout of coordinate systems in which inverse mapping from screen coordinates to plot coordinates requires joint consideration of both x and y. See for example the map_projection demo.

Example:

     set mouse mouseformat "mouse x,y = %5.2g, %10.3f"

Use set mouse mouseformat "" to turn this string off again.

The following formats are available:

 0   default (same as 1)
 1   axis coordinates                    1.23, 2.45
 2   graph coordinates (from 0 to 1)    /0.00, 1.00/
 3   x = timefmt     y = axis           [(as set by `set timefmt`), 2.45]
 4   x = date        y = axis           [31. 12. 1999, 2.45]
 5   x = time        y = axis           [23:59, 2.45]
 6   x = date time   y = axis           [31. 12. 1999 23:59, 2.45]
 7   format from `set mouse mouseformat <format-string>`
 8   format from `set mouse mouseformat function <func>`