how to use dataaspectratio in scatterplot?
4 views (last 30 days)
Show older comments
Tomaszzz on 15 Dec 2022
Commented: Star Strider on 16 Dec 2022
I have 2D data collected from two diffrent devices that have data of diffrent dimensions as on the picture below.
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
legend ('data1', 'data2')
Star Strider on 15 Dec 2022
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.
More Answers (0)
Find more on Scatter Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!