Info

This question is closed. Reopen it to edit or answer.

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

1 view (last 30 days)
Jingli Xie
Jingli Xie on 31 Mar 2020
Closed: MATLAB Answer Bot on 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

Answers (1)

Peng Li
Peng Li on 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.

Products

Community Treasure Hunt

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

Start Hunting!