Mouse tooltip
Hereafter are presented the available options to interact with the two dimensional graphs in mathlayer®.
Mouse
Options | Description | Values | Default Values |
tooltip | Displays the X and Y coordinates of the mouse inside the canvas. | true or false. | false |
tooltipPosition | Defines the position where the coordinates will be displayed. | 'mouse' or 'top'. | 'mouse' |
xName yName | Define the name of the coordinates X and Y of every data point. | Any name. | 'X' and 'Y' |
xFormat yFormat y2Format | Specify the format of the numers displayed on the axes and on the canvas. | Any format suported by d3 library. | '.4f' |
options = struct% initializing options struct
options.tooltip = true options.tooltipPosition = 'mouse' options.xName = 'xVal' options.yName = 'yVal' options.xFormat = '.3n' x = -15:0.15:5 plot(x, airy(x),options)