Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

How can I make plot3 show on the top of the images?

1 Ansicht (letzte 30 Tage)
Jingli Xie
Jingli Xie am 31 Mär. 2020
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
The black line seems to on the top of the imagesc.
Howerever, the white line seems to on the bottom of the imagesc.
I want to plot white line on the above the imagesc ~ How can I do it?
That is to say that the white line will show completely in the interval [-1, 1].
my code is:
surf(ps, ts, SE_tp, 'edgecolor', 'flat'); hold on; view(2)
plot3([ps(1),ps(end)],[ts(t_idx1),ts(t_idx1)], [SE_tp(1,t_idx1) SE_tp(end,t_idx1)],'-w','linewidth',2.5); hold on
plot3([ps(1),ps(end)],[ts(t_idx2),ts(t_idx2)], [SE_tp(1,t_idx2) SE_tp(end,t_idx2)],'-w','linewidth',2.5); hold on

Antworten (1)

Peng Li
Peng Li am 31 Mär. 2020
Below example works fine
C = [0 2 4 6; 8 10 12 14; 16 18 20 22];
clims = [4 18];
imagesc(C,clims)
hold on;
plot3([1 4], [1 3], [0 0], 'LineWidth', 4, 'Color', 'w');
This is a bit misleading i think as the color is not part of the colormap. It makes the heat image hard to interpret.

Diese Frage ist geschlossen.

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by