Creating a plot with 2 x -axis
이전 댓글 표시
Hello everyone,
I would like to create a bar or a line plot with two x-axes from the xlsx file attached to this question. How do I do this? I would like the droplet size to be on the bottom x-axis and the distance to be on the top x-axis with the frequency on the y-axis. What is the easy way to do this?
Thanks
답변 (1개)
Sara Boznik
2020년 8월 16일
0 개 추천
Read about plotyy.
댓글 수: 5
asd ad
2020년 8월 16일
Sara Boznik
2020년 8월 16일
AX = plotyy(...);
set(AX(2),'XAxisLocation','Top')
asd ad
2020년 8월 16일
Sara Boznik
2020년 8월 16일
AX=plotyy(DropletSizemicrons,Frequency,'-b.','Markersize',25)
xlabel('Droplet size [microns]')
set ( gca, 'xdir', 'reverse' )
set(AX(2),'XAxisLocation','Top')
ylabel('Frequency')
I get error with Unrecognized function or variable 'DropletSizemicrons'.
asd ad
2020년 8월 16일
카테고리
도움말 센터 및 File Exchange에서 Two y-axis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!