Put a limit value on contour and plot3

Hi,
The point of my question is how to put color limit on a specific value on a contour plot or plot3. In fact I would like to have :
  • For my contour : if my lines have values from 0 to 10, for exemple I would like to have a specific color for the lines under 5 and a specific color for 5 to 10. Exactly I want to put red color on lines over a limit.
  • For my plot3 : I have multiple points on 3D-space and for the z level, I would like to put a limit value and the points that are over this specific z-level takes the red color.
I don't know if I explained my request well but if somebody knows what I mean and have a function that could do that please tell me.
Baptiste

2 件のコメント

Jan
Jan 2018 年 11 月 19 日
Please explain, what "my lines have values from 0 tp 10" means exactly. Lines do not have values implicitly.
If you post the inputs and the code you have tried so far, suggesting a modification is much easier than with guessing your data and what you exactly want. Please edit the original question to add more details.
Baptiste Tarbouriech
Baptiste Tarbouriech 2018 年 11 月 19 日
I mean it's just the set values for the contour, a line for value 1 to 10 for exemple, so 1 2 3 4 5 6 7 8 9 10, that is set on the contour line.
contour(hanles.X1,handles.Y1,handles.Z1,[0 0.1 0.2 0.3 0.4 0.5 1 2 3 4 5 6 7 8 9],'showtext','on');
For exemple here I have 15 specifics lines and I would like to show the lines that are superior to "5" in Red.

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

回答 (1 件)

Jan
Jan 2018 年 11 月 19 日

0 投票

For plot3 you can use the FEX submission https://www.mathworks.com/matlabcentral/fileexchange/5735-plot3c . For contour whould setting the Colormap of the axes work?

2 件のコメント

Baptiste Tarbouriech
Baptiste Tarbouriech 2018 年 11 月 19 日
Thank's for the function i will give a try with that. Colomap would not solve my problem because I don't want to color the map, I juste want to show in RED the lines thats ares superiors to a specific value.
Baptiste Tarbouriech
Baptiste Tarbouriech 2018 年 11 月 19 日
what do you mean whith FEX submission ?

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

カテゴリ

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

製品

質問済み:

2018 年 11 月 19 日

コメント済み:

2018 年 11 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by