Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

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

1 vue (au cours des 30 derniers jours)
Jingli Xie
Jingli Xie le 31 Mar 2020
Clôturé : MATLAB Answer Bot le 20 Août 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

Réponses (1)

Peng Li
Peng Li le 31 Mar 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.

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by