How can I create three different subplots of a patch model, with different camera views?

2 ビュー (過去 30 日間)
Oliver Pellumbaj
Oliver Pellumbaj 2021 年 1 月 18 日
編集済み: Adam Danz 2021 年 1 月 20 日
This is my patch model:
v2 = [0 0 0; 0 230 0; 230 0 0; 230 230 0; 115 115 147];
f2 = [1 2 3; 2 3 4; 1 2 5; 1 3 5; 2 4 5; 3 4 5];
patch('Faces',f2,'Vertices',v2,'Facecolor',[242, 209, 107]/256);
view(60,45);
How could I make three different subplots out of this?
  1 件のコメント
dpb
dpb 2021 年 1 月 18 日
Write a loop over the three desired view coordinates, maybe?
What have you tried and where did you have a problem?

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

回答 (1 件)

Adam Danz
Adam Danz 2021 年 1 月 18 日
編集済み: Adam Danz 2021 年 1 月 20 日
  1. Create the first subplot using subplot or tiledLayout.
  2. Plot your patch object(s) and set up the subplot to its final appearance.
  3. Use copyobj() to copy the axes twice so you'll have 3 subplots that all look the same. Alternatively you could copy the patch object to two additional subplots.
  4. Use linkaxes and/or linkprop to equate your selected axis properties between all 3 axes so if one changes, the otherse are updated. Do not link any properties associated with camera view.
  5. Set the camera view for each subplot.

カテゴリ

Help Center および File ExchangeSubplots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by