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

19 Ansichten (letzte 30 Tage)
Kate Murphy
Kate Murphy am 27 Mai 2020
Kommentiert: Ameer Hamza am 28 Mai 2020
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.

Akzeptierte Antwort

Ameer Hamza
Ameer Hamza am 28 Mai 2020
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 Kommentare
Kate Murphy
Kate Murphy am 28 Mai 2020
This was very helpful, thank you very much!
Ameer Hamza
Ameer Hamza am 28 Mai 2020
I am glad to be of help!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by