Preserve aspect ratio per data inspector

2 ビュー (過去 30 日間)
Jack Daniels
Jack Daniels 2025 年 5 月 30 日
回答済み: Spruha 2025 年 6 月 16 日
Hello,
I am looking for an advice, I'd like to see the circle as real circle and not eclipse when displayed in data inspector or XY graph in simulink. How to configure Simulation Data inspector tool for XY graph in such way to preserve its aspect ratio? Is there any fixed resize option to configure?
  2 件のコメント
David Goodmanson
David Goodmanson 2025 年 5 月 30 日
編集済み: David Goodmanson 2025 年 5 月 31 日
Hi Jack, I don't know how things work in Simulink, but in regular Matlab you can follow up a plot command with the command: axis equal
Jack Daniels
Jack Daniels 2025 年 6 月 2 日
x = linspace(0, 10, 100);
y =
sin(x);
plot(x, y);
axis equal;
Aspect ratio for Matlab plot command works ... but looking for Simulink either XY graph or Data inspector.

サインインしてコメントする。

回答 (1 件)

Spruha
Spruha 2025 年 6 月 16 日
Hi Jack,
To ensure that your circular data appears correctly as a circle (and not as an ellipse) in the Simulation Data Inspector's XY plot, you'll need to manually align the axis scales
  • Open the XY Plot: Double-click on your XY plot within the SDI.
  • Access Visualization Settings: Click on the "Visualization Settings" button (gear icon) located in the toolbar.
  • Disable Autoscaling: In the "Limits"section, uncheck the "Autoscale" option
  • Set Equal Axis Limits: Manually set the "X Axis Limits" and "Y Axis Limits" to be equal. For example, if your data ranges from -5 to 10, set both axes to [-5, 10].
Hope this helps!

カテゴリ

Help Center および File ExchangeView and Analyze Simulation Results についてさらに検索

製品


リリース

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by