How to insert a background image into a 3d plot?

조회 수: 26 (최근 30일)
Kate Murphy
Kate Murphy 2020년 5월 27일
댓글: Ameer Hamza 2020년 5월 28일
Hi, I'm wondering how to go about inserting a 2d image into the background of a 3d plot, with the inserted image not interfering with the plot. Any advice would be greatly appreciated.

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 5월 28일
Try something like this
img = imread('peacock.jpg');
ax1 = axes();
imshow(img, 'Parent', ax1);
ax2 = axes('Color', 'none');
ax2.XAxis.LineWidth = 2;
ax2.YAxis.LineWidth = 2;
ax2.ZAxis.LineWidth = 2;
hold on
plot3(rand(1,10), rand(1,10), rand(1,10), 'r', 'LineWidth', 4)
view(3)
  댓글 수: 2
Kate Murphy
Kate Murphy 2020년 5월 28일
This was very helpful, thank you very much!
Ameer Hamza
Ameer Hamza 2020년 5월 28일
I am glad to be of help!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by