Adjust the line type and the color of the xgrid, ygrid and zgrid (if necessary) for a specific axis handle. The original grid command changes the color of the axis and axis label, which is avoided with this script.
Cite As
Arnaud Laurent (2026). Adjust grid color (https://nl.mathworks.com/matlabcentral/fileexchange/39210-adjust-grid-color), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2012b
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Graphics > Labels and Styling > Axes Appearance > Limits, Ticks, and Grids > Grid Lines, Tick Values, and Labels >
Find more on Grid Lines, Tick Values, and Labels in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
