Assigning same color for same value at different plots
이전 댓글 표시
I have 3 tables.
For table1, x=[0.1 0.4 0.6 0.8], y=[0.2 0.3 0.7 0.9], name=[A B C A]
For table 2, x=[0.1 0.2 0.4 0.6 0.5 0.8], y=[0.2 0.5 0.3 0.4 0.7 0.9], name=[A B C A D E]
For table 3, x=[0.1 0.2 0.4 0.6 0.5 0.8 0.2 0.5 0.3 0.4 0.7 0.9 ], y=[0.2 0.5 0.3 0.4 0.7 0.9 0.1 0.2 0.4 0.6 0.5 0.8], name=[A B C A D E B C A D E B E B C A D]
I want to plot these points such that they have the same color and markertype assigned based upon their names for all three figures. I tried ploting them using gscatter plot with the 'name' as the group variable but the colors are different for same name in different figures. Can anyone please help me to assign same marker type and color for each name value and get a common legend for all three plots.
Thank You
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Line Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
