Color map plotting with weightage
조회 수: 1 (최근 30일)
이전 댓글 표시
Dear Experts,
I want to plot (x,y) with the circles associated with the weightage of y depends on the third column of excel sheet. The plot should look like the attached image. Color map will be appreciated.![Screenshot (42).png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/218531/Screenshot%20(42).png)
![Screenshot (42).png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/218531/Screenshot%20(42).png)
채택된 답변
KSSV
2019년 5월 8일
Read about scatter
[num,txt,raw] = xlsread('Book1.xlsx') ;
x = num(:,1) ;
y = num(:,2) ;
w = num(:,3) ;
plot(x,y)
hold on
% remove the nans
idx = isnan(x) ;
x(idx) = [] ; y(idx) = [] ; w(idx) = [] ;
scatter(x,y,w+20,w,'filled') % 20 is added to 20, it can be changed
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!