Save scatter3 plot as u3d or other rotatable figure suitable for pdf

8 ビュー (過去 30 日間)
B de Bruin
B de Bruin 2020 年 8 月 25 日
編集済み: Giulio Cordaro 2022 年 8 月 24 日
I use scatter3 to get a produce a 3d graph but cannot get fig2u3d or u3d_pre to work, and I haven't been able to locate examples that are sufficiently self-explanatory. The underlying document is in LaTeX. Many thanks!
  2 件のコメント
KALYAN ACHARJYA
KALYAN ACHARJYA 2020 年 8 月 25 日
The underlying document?
B de Bruin
B de Bruin 2020 年 8 月 26 日
I'm preparing a LaTeX document in which I was expecting I could embed the pictures.

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

回答 (2 件)

Vinai Datta Thatiparthi
Vinai Datta Thatiparthi 2020 年 9 月 16 日
Hey,
Have a look at this MATLAB Answer.
Hope this helps!

Giulio Cordaro
Giulio Cordaro 2022 年 8 月 24 日
編集済み: Giulio Cordaro 2022 年 8 月 24 日
I'm a beginner, but I had the same issue and I (partially) solved it in this way:
  • once you make your scatter3 image, press View and open Camera Toolbar from the figure menu
  • press the first button, Orbit Camera, then click and drag (slowly) on the image to turn it around the axis you prefer: if you keep moving the mouse when you release the left button, the image will keep on rotating forever
  • open any software for .gif creation (I use ScreenToGif because it has a portable version) and record a .gif file with the frames of your 3D rotating scatter3 graph
Not the best solution, but it works fine. I ended up here because I was looking for how to improve it, especially the click and drag part, which is a bit tricky and requires several tries. Please, Let me know if you know a way to rotate 3D graphs in an easier way!
Edit: This is a more elegant way to rotate the camera automatically, but it still needs ScreenToGif to produce a .gif file:
ax.CameraViewAngle = 10;
for i = 1 : 0.2 : 500
view(i,15)
pause(0.0001)
end

カテゴリ

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

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by