フィルターのクリア

Stop GIF plot from resizing

7 ビュー (過去 30 日間)
Pelajar UM
Pelajar UM 2022 年 4 月 19 日
コメント済み: Richard Quist 2022 年 5 月 2 日
I am plotting the displacement of a 3D object. When I save it as GIF, the object size changes frame by frame, pushing away the colorbar further away (overall image size is the same, but colorbar is pushed out of the frame).
Is there a way to avoid this?
I tried with Resize = "off" or Clipping = "on" and they didn't work. I know you can define the OuterPosition in pixels, but I don't want to do that because I am using the resolution feautre in exportgraphics to allow the user to define a custom size.
  1 件のコメント
Richard Quist
Richard Quist 2022 年 5 月 2 日
It would help if you can share the code you're using that reproduces the problem, including how you are creating the plot and saving the GIF

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

回答 (1 件)

Pelajar UM
Pelajar UM 2022 年 4 月 19 日
Putting this out here in case someone else needs it. This will do the work:
ax.PositionConstraint = "innerposition";
  1 件のコメント
Pelajar UM
Pelajar UM 2022 年 4 月 20 日
Update: This works only in certain views. :(
As I rotate the object to its side, the problem reappears....

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

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by