How do I change default plot colors to green and blue for multiple patternCustom polar plots?
6 views (last 30 days)
Show older comments
When using multiple patternCustom plots, I can't seem to change the default colors to Green and Purple without them getting overwritten. Here is an example of what I have for the figure:
figure;
A = patternCustom( magE_H , theta_H , phi_H, CoordinateSystem="polar", Slice="theta", SliceValue=[100]);
hold on;
B = patternCustom( magE_V , theta_V , phi_V, CoordinateSystem="polar", Slice="theta", SliceValue=[100]);
B.AngleAtTop = 0;
B.TitleTopTextInterpreter = 'tex';
B.TitleTop = '5 GHz \phi = -10\circ'
l = legend(gca); l.delete;
legend(gca, 'H-pol', 'V-pol');
hold off;
0 Comments
Accepted Answer
Walter Roberson
on 1 May 2025
patternCustom() returns an object handle to lines or else to a surface() object.
When you are plotting multiple patternCustom() results to the same axes, you run into the problem that there is only one colormap per axes.
You could potentially take advantage of the File Exchange contribution https://www.mathworks.com/matlabcentral/fileexchange/7943-freezecolors-unfreezecolors
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!