# Is the gplotmatrix function capable of plotting with more than the 7 built in colors?

조회 수: 1 (최근 30일)
Brad 2019년 8월 16일
편집: Brad 2019년 8월 22일
I'm attempting to produce a group plot matrix using the following syntax;
[h, ax, bigax] = gplotmatrix(xvars, yvars, group, Color, 's', 10, 'off', 'none', xname, yname);
Where group is a 13 x 1 double consisting of:
[1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 2; 1; 2]
And where Color is a 13 x 3 double consisting of:
[1 0 0; 1 0 0; 1 0 0; 1 0 0; 1 0 0; 1 0 0; 1 0 0; 1 0 0; 1 0 0; 1 0 0; 0 1 0; 1 0 0; 0 1 0]
The colors are the RGB triplet color codes corresponding to the values in the group.
When I attempt to build the gplotmatrix, all 13 of the group entries are RED. But the values of 2 should be GREEN.
When I substitute the RGB colors with the built in colors, the data points in the plots are properly color coded.
In reading the documentation pertaining to gplotmatrix, clr is a character array or string array of colors recognized by the plot function.
I use this approach when dealing with data series greater than 6, thus allowing for an expanded color pallett. But it appears gplotmatrix will not do this. Or should it?
Is this a known issue with this function?

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

### 채택된 답변

Image Analyst 2019년 8월 16일
Not sure but you might try a strategy similar to the attached emo where I plot more than the standard 7 or 8 colors with line plots.
##### 댓글 수: 1이전 댓글 -1개 표시이전 댓글 -1개 숨기기
Brad 2019년 8월 16일
편집: Brad 2019년 8월 22일
Image Analyst - First off, thanks for the reply. Second, the emo you attached is a pretty good demo!! As it turns out, I am able to modify my approach and achieve the desired plot matrix. It appears there is no bug when attempting to apply more than the 7 built in colors to a group plot matrix. It's not as intuitive as I thought it would be, put perfectly useful!! Now if I can figure out how to implement the marker face colors programatically.......
Thanks again....

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

### 카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

R2016b

### Community Treasure Hunt

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

Start Hunting!

Translated by