is it posible to create matrixplot for several data types?

조회 수: 2 (최근 30일)
Dany
Dany 2014년 5월 28일
댓글: David Sanchez 2014년 6월 6일
Hi, i have a data set on wich i performed a PCA analysis. after getting the "scores" of the analysis im trying to create a matrixplot. i also have two index vector. because the data consists of two groups.
my question is:
is it possible to create a matrixplot that each group (according to the index vectors) will be in a different color? if im writing "matrixplot(X)" it gives me a matrixplot with all the data points in same color, i want to separate the two groups by color and show them on the same matrixplot.
thank you for your help.
Dany
  댓글 수: 2
David Sanchez
David Sanchez 2014년 5월 28일
Could you please paste the code you are using to plot?
Dany
Dany 2014년 5월 28일
i have the data (X) wich is 10000x2.
i have the indx vectors (indx1, indx2) wich are (1000x1 and 9000x1 respectively.
when i do : plotmatrix(X), i get a matrix plot of all 10000 points.
i would like to do: plotmatrix(X(indx1,:),'b.'), which will give me matrix plot of 9000 points and then on top of that enother matrix plot with plotmatrix(X(indx2,:),'r.'), but i would like it to be in the same matrix plot.

댓글을 달려면 로그인하십시오.

답변 (1개)

David Sanchez
David Sanchez 2014년 5월 28일
I think -plotmatrix-does not have the option of holding the plot to add extra data. You can use plot and hold on instead:
plot(X(indx1,1),X(indx1,2)'b.')
hold on
plot(X(indx2,1),X(indx2,2)'r.')
hold off
  댓글 수: 2
Dany
Dany 2014년 5월 28일
yes i can ...... but when it comes to many plots i rather have some built in function to do it, or some other more sofisticated way.
David Sanchez
David Sanchez 2014년 6월 6일
I agree, but if the built-in function does not exist, you have to code it yourself

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Dimensionality Reduction and Feature Extraction에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by