How do I change default plot colors to green and blue for multiple patternCustom polar plots?
5 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Walter Roberson
2025-5-1
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 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!