Filter löschen
Filter löschen

help on some details of scatterplot

2 Ansichten (letzte 30 Tage)
matteo bottoni
matteo bottoni am 7 Jul. 2020
Beantwortet: Image Analyst am 7 Jul. 2020
I would like that the last graph shows the 4 legends (that I put wrongly). Indeed I don't want any legend for line(Total_Matrix(:,1),Total_Matrix(:,2))
I would like also that the x coordinate on Total_Matrix(12,1) will appear not like a number (that is a number) but like the string 'adults'
Obviously Total_matrix is only a dobule matrix
subplot(3,2,1)
scatter(Total_Matrix(1:4,1),Total_Matrix(1:4,2),'r','filled')
legend '<= 1 y.o'
hold on
scatter(Total_Matrix(5:11,1),Total_Matrix(5:11,2),'g','filled')
legend '<= 2 y.o.'
scatter(Total_Matrix(12,1),Total_Matrix(12,2),'k','filled')
legend 'adults'
line(Total_Matrix(:,1),Total_Matrix(:,2))
hline = refline([0 0.68]);
legend 'ST ideal' %refers to refline
hline.Color = 'y';
ylabel ST
xlabel AGE

Akzeptierte Antwort

Image Analyst
Image Analyst am 7 Jul. 2020
legend(subset,___) only includes items in the legend for the data series listed in subset. Specify subset as a vector of graphics objects. You can specify subset before specifying the labels or with no other input arguments.

Weitere Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by