showYs(action,varar​gin)

Shows y-values of time series in 2D plots by clicking on the axes.
1.8K Downloads
Updated 10 Mar 2017

View License

Shows y-values of time series in 2D plots by clicking on the axes.
A quick test can be done by typing
showYs('example')
after the file is placed in the Matlab path
It works with one or multiple curves.
By clicking repeatedly on different x positions, the labels and reference line come and go.
After clicking on top of the reference line, it can be dragged together with the text boxes indicating the lines y values.

The selected x value is appended at the end of the x label when the y values are shown.

If the reference line is placed between invalid line points (NaN or +/- Inf values) or outside the data boundaries, the text box edges will be dashed and the value in the text box will be linearly interpolated or extrapolated using the closest valid data for the given line.

File has been tested with Matlab 2014a

Cite As

Pablo Borruel (2024). showYs(action,varargin) (https://www.mathworks.com/matlabcentral/fileexchange/14228-showys-action-varargin), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Labels and Annotations in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.2.0.0

Added ability to link axes

1.1.0.0

- Fixed multiple bugs
- Added interpolation for NaN and Inf values
- Added extrapolation for out of bound points
- Increased speed

1.0.0.0

Added functionallity:
- after clicking on vertical cursor, it can be dragged left and right in real time while textboxes move accordingly
- Any space in axes or over lines can be clicked to show y values