Info

この質問は閉じられています。 編集または回答するには再度開いてください。

how to change DataAspectRatio of my object only, without changing the drawn scales marked along the figure axes?

1 回表示 (過去 30 日間)
Marco
Marco 2014 年 2 月 18 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I have for a same sized real space object calculated one result which occupies 128 x 128 x 64 pixel, and another result which occupies 256 x 256 x 64 pixel. By setting the DataAspectRatio of the 128x128 pixel result properly, both appear on the screen at identical sizes. It was enough to just alter the graphics representation along the X and Y axes, without touching the representation along the Z axes. For the eyes it is now very easy to compare the geometries of the two calculated results of my object. I can easily screen if dependent on the applied calculations something changed in the geometry of my object, and the different resolution does not bother at all. Done! Happy!
But if I now want to also display along my graphical representation of the results the figure axes and their tick labels themselves, then I apparently read from those drawn axes lines on the screen that the different objects in the two subplots would be of different sizes. Obviously axes continue to relate to the pixel index values in my data, and as in my data my roughly same sized object once spans only 128 pixel but another time spans over 256 pixel, the computer thinks there would be a change of factor 2 in between the sizes of my objects. Bad! Unwanted!
Now, after having nicely stretched the graphical representation of my result by the help of the property DataAspectRatio, how could I now draw some axes lines with tick marks along it which show the scaling which I want and do not strictly follow the dimension values of my digital data, because those values are only the pixel index numbers along X and Y, but do not account for the fact that the pixels themselves represent different sizes in real space? Any ideas? Any recommendations?

回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by