Home > Software engineering >  Change grid line colour/contrast in MATLAB polarplot
Change grid line colour/contrast in MATLAB polarplot

Time:11-11

I'm struggling to figure out how to change the grid line colours in a polar plot in MATLAB. I tried to manually change some axes properties that could possibly do that, but couldn't observe any changes. Just to be clear: It's not about the axes themselves, but the grid lines (inner circles) that are drawn for orientations should be black (or have a better contrast) since this light grey is suboptimal for e.g. a presentation shown with a projector.

enter image description here

How can I change the colour of the grid itself?

CodePudding user response:

Assuming you are using polarplot (note that polar is not recommended), you need to set the GridColor and GridAlpha properties of the axes. These properties control color and transparency, respectively. For pure, non-transparent black use

set(gca, 'GridColor', [0 0 0], 'GridAlpha', 1)
  • Related