How do I change default plot colors to green and blue for multiple patternCustom polar plots?
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Aaron
le 1 Mai 2025
Réponse apportée : Walter Roberson
le 1 Mai 2025
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 commentaires
Réponse acceptée
Walter Roberson
le 1 Mai 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 commentaires
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!