how to use dataaspectratio in scatterplot?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi all,
I have 2D data collected from two diffrent devices that have data of diffrent dimensions as on the picture below.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1232252/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1232252/image.jpeg)
Knowing the dimensions of both (indicated above), can I change the aspect ratio of data2 to fit in with dimensions of data1 to avoid the below when plotted together? Thanks
scatter(xsensor_sq(:,3),xsensor_sq(:,7)); hold on
scatter(bts_sq(:,3),bts_sq(:,7));
legend ('data1', 'data2')
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1232257/image.jpeg)
댓글 수: 0
채택된 답변
Star Strider
2022년 12월 15일
I doubt that daspect is going to have any effect here. The only option is likely to translate one of the plots by subtracting the median in each dimension from the data and then adding whatever offset you want so they are plotted closer to each other.
A more appropriate option (that you appear to have considered already) is to use tiledlayout or something similar to plot them in different axes in the same figure.
추가 답변 (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!