Have you ever tried to change the color of the grid in a plot? right, the color of the axis changes as well. it is not possible to set the color of the grid separately. There is a good workaround here.ezplot('x')
grid on
set(gca,'Xcolor',[0.85 0.85 0.85])c_axes = copyobj(gca,gcf);
set(c_axes, 'color', 'none', 'xcolor', 'k', 'xgrid', 'off', 'ycolor','k', 'ygrid','off');
this will generate gray grids, like in the picture above.
Friday, June 20, 2008
How to change the color of the grid without changing the color of the ticks
Posted by otmezger at 11:31 AM
Labels: matlab plots
Subscribe to:
Post Comments (Atom)
1 comment:
sytax: gridaxeshandle=cgrid(colorarg, stylearg, colorargy)
gridaxishandle=cgrid('g-');
Post a Comment