![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/291594/image.png)
How do I change the properties of a series od data in a plot with multiple series of data in it ?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
andrea
am 9 Mai 2020
Beantwortet: Mehmed Saad
am 9 Mai 2020
I have 3 series of datain the same plot, and I would like to change properties such as color and marker type on each different data series from command line, i.e without the property editor.
I attached a matlab figure to be more clear, for example how do I cange the marker type of the different data series ?
0 Kommentare
Akzeptierte Antwort
Mehmed Saad
am 9 Mai 2020
Open the figure
f =openfig('W_1e-6_5e-9.fig');
access its axis either by gca or by figure handle f
axes = gca;
Axes has three lines i.e. 3 childrens
axes.Children
ans =
3×1 Line array:
Line ( W = 250 nm)
Line ( W = 500 nm)
Line ( W = 1e-6 m)
To access 1st line color (and other properties)
axes.Children(1).Color
ans =
0.9290 0.6940 0.1250
to change marker type and color of plot
axes.Children(1).Marker = 'diamond';
axes.Children(1).Color = 'm';
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/291594/image.png)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Line Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!