Need to draw a plane

Hello I have a 3d plot like this http://s10.postimage.org/k551sbnah/fig.jpg
in this fig I need to draw plane at z axis at 3.9*10^-3,,,from this plane i can specify which points lies above 0.0039 and below of it
any idea////

 採用された回答

Walter Roberson
Walter Roberson 2012 年 11 月 24 日

0 投票

XL = get(gca, 'XLim');
YL = get(gca, 'YLim');
zpos = 0.0039
patch([XL([1 2 2 1 1]), YL([1 1 2 2 1]), zpos * ones(1,5));

6 件のコメント

joy
joy 2012 年 11 月 24 日
編集済み: joy 2012 年 11 月 24 日
thanx walter
i used ur comment using just a parenthesis removed as it gave error as
XL = get(gca, 'XLim');
YL = get(gca, 'YLim');
zpos = 0.0039
patch(XL([1 2 2 1 1]), YL([1 1 2 2 1]), zpos * ones(1,5));
but i get a fig like this..but in need plane at middle at point 0.0039 along prob of occurrence http://s8.postimage.org/6x3i95h45/untitled.jpg
Walter Roberson
Walter Roberson 2012 年 11 月 24 日
Ah. Stupid thing assumes that a third argument is color rather than z! You need to add a color
patch(XL([1 2 2 1 1]), YL([1 1 2 2 1]), zpos * ones(1,5), [0 .2 .7]);
though probably you would want a lighter color. You might also want to use transparency, which is AlphaData
joy
joy 2012 年 11 月 24 日
thanx walter
I did not get ur views about what the changes I have to do if I need a transparent plane...
regards
Walter Roberson
Walter Roberson 2012 年 11 月 24 日
transparency = 0.2; %mostly clear
patch(XL([1 2 2 1 1]), YL([1 1 2 2 1]), zpos * ones(1,5), [0 .2 .7], 'AlphaData', transparency);
joy
joy 2012 年 11 月 24 日
using this command,I am getting following errors..how to rectify???
??? Error using ==> patch Bad property value found. Object Name : patch Property Name : 'AlphaDataMapping'
Walter Roberson
Walter Roberson 2012 年 11 月 24 日
Sorry, should be 'FaceAlpha' instead of 'AlphaData'

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeData Distribution Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by