gridxy2

Plots colored gridlines. (A revision to gridxy needed for imagesc plots in MATLAB 7.10)

You are now following this Submission

Example:
gridxy2(get(gca,'XTick'),get(gca,'YTick'), 'Color','y','Linestyle',':');
plots yellow X & Y gridlines at the same points as originally plotted on an imagesc plot.
The grid line locations can be arbitrary.
It can plot different colors for different axes, when called sequentially for each axis.
Original version hid the lines in MATLAB version 7.10.

Cite As

Carey Smith (2026). gridxy2 (https://www.mathworks.com/matlabcentral/fileexchange/28244-gridxy2), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0