Surf with one specific gridline?

Hi,
Is there a simple way of addding in a gridline to a surface plot yet at only one specific point, such as say x = 0?
Say is I have a simple surface plot such as
figure;
surf(res_z,res_r,res_ion, 'edgecolor','none');
xlim([-0.02 0.3]);
ylim([r_min r_max]);
view([0.5 90]);
colormap jet;
title('zz');
colorbar;
Is there an easy way to add in such a line? Ideally at a location I can control easily at a later sate (say to a different x value); ideally I dont want to be messing about with annotation lines and the such.
Many thanks.

 採用された回答

José-Luis
José-Luis 2016 年 12 月 19 日
編集済み: José-Luis 2016 年 12 月 19 日

0 投票

Is this what you mean?
aH = axes;
plot3(rand(10,1)*0.32-0.02,rand(10,1)*.32-0.02,rand(10,1)*.32-0.02);
hold on
xlim([-0.02 0.3]);
xL = aH.XLim;
yL = aH.YLim;
zL = aH.ZLim;
plot3([0 0],yL,[zL(1), zL(1)],'k--')
box on
aH.XLim = xL;
aH.YLim = yL;
aH.ZLim = zL;

4 件のコメント

David
David 2016 年 12 月 19 日
Hey,
Something like that, yes! However it appears behind the surface plot, not ontop. (It can be seen if it rotate the view yet not on the view I need to set it to).
Thanks
José-Luis
José-Luis 2016 年 12 月 19 日
In that case, you might want to try:
plot3([0 0],yL,[zL(2), zL(2)],'k--')
to place the grid on top.
Please accept the answer that best solves your problem.
David
David 2016 年 12 月 19 日
That works perfectly, thanks very much!
José-Luis
José-Luis 2016 年 12 月 19 日
My pleasure.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

質問済み:

2016 年 12 月 19 日

コメント済み:

2016 年 12 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by