how to create a scatter plot and add contourlines for a specific level
조회 수: 1 (최근 30일)
이전 댓글 표시
I have to create a scatter plot from a copulapdf command and adding contourlines for the level [0.1:0.1:0.9]. I wrote this script to make a contour but i'm not able to specify the level. Which part of this script i have to modify and how?
rho = 0.5;
n= 1000;
s3 = copularnd('Frank',rho,n);
figure
scatterhist(s3(:,1),s3(:,2))
hold on
[n,c] = hist3([s3(:,1),s3(:,2)]);
contour(c{1},c{2},n)
댓글 수: 0
답변 (1개)
jonas
2018년 8월 30일
편집: jonas
2018년 8월 30일
contour(c{1},c{2},'levellist',[1 5 10])
sets the levels to z=[1 5 10]
참고 항목
카테고리
Help Center 및 File Exchange에서 Scatter Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!