How do I change default plot colors to green and blue for multiple patternCustom polar plots?
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Aaron
el 1 de Mayo de 2025
Respondida: Walter Roberson
el 1 de Mayo de 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 comentarios
Respuesta aceptada
Walter Roberson
el 1 de Mayo de 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 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!