Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

How to reorder groups and corresponding curves in scatterhist

1 visualización (últimos 30 días)
Ali Y.
Ali Y. el 24 de Jun. de 2016
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
I have the following script aiming to show my data by scatterhist, properly. But it gives an awkward y-histogram, as it seems in the 'scatterhist' the curve correspond to the least frequent occurrences is plotted at the end; I mean in order. So, curves corresponding to more frequent occurrences are suppressed and do not illustrated properly. How can I fix my code.
p= 1:100;
z= zeros(1,2);
n= -1:-1:-40;
a = [z,p,n];
c={zeros(numel(a)),1};
for i= 1:numel(a)
if a(i)>0
c(i)={'p'};
elseif a(i)==0
c(i)= {'z'};
elseif a(i)<0
c(i)={'n'};
end
end
figure(1)
scatterhist(rand(1,numel(a)),a,'Group',char(c),'Marker','s..')

Respuestas (0)

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by