help on some details of scatterplot

1 visualización (últimos 30 días)
matteo bottoni
matteo bottoni el 7 de Jul. de 2020
Respondida: Image Analyst el 7 de Jul. de 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

Respuesta aceptada

Image Analyst
Image Analyst el 7 de Jul. de 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.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by