Plotting two 3D figures (mesh,surf) - set different parameters

Hello everybody,
I'm trying to display two 3D figures into the one plot. What I'd like to do is to set the different parameters for them in order to make the figure clear and readable (since they are overlapping each other). Concretely, the desired goal could be surface with a certain colormap vs single color mesh with lower transparency.
Maybe I'm going to use fill3 instead of mesh but even then I'd like change its properties (transparency, color).
Thank you people. King regards, Vasek

 採用された回答

Jacob Halbrooks
Jacob Halbrooks 2012 年 3 月 22 日
編集済み: John Kelly 2015 年 2 月 26 日

2 投票

There are lots of properties for a surface object that allow you to control transparency.
You can also use ALPHA to quickly apply transparency:
h = surf(peaks);
alpha(h, 0.5)
There are also lots of properties and helper functions for coloring. See Coloring Mesh and Surface Plots.

3 件のコメント

Vasek
Vasek 2012 年 3 月 22 日
Thank you Jacob for the answer. Actually, I'd tried to apply colormap and alpha function before.
The problem is that once you use these functions, the all displayed "figures"(surface, mesh) are influenced.
I set colormap for my surface, and a certain alpha and color for my mesh. It ends in the same colormap and transparency for both of them. What I'd like to achieve is to have mesh and surface in one plot but both of the with different properties
Jacob Halbrooks
Jacob Halbrooks 2012 年 3 月 22 日
The ALPHA function lets you specify a particular surface to apply to:
>> s1 = surf(peaks);
>> hold on;
>> s2 = surf(peaks+5);
>> alpha(s2, 0.1);
However, COLORMAP does not provide this fine of control and applies the map to either the entire figure or axes. To use multiple colormaps in a single figure, there is a technical support guide:
http://www.mathworks.com/support/tech-notes/1200/1215.html
Vasek
Vasek 2012 年 3 月 22 日
Great that's exactly what I'm looking for.
Alpha together with hold_on works great, thank you... I try to go for that multiple colormaps as well, it looks promising.
Thanks.
King regards, Vasek

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeColor and Styling についてさらに検索

質問済み:

2012 年 3 月 22 日

編集済み:

2015 年 2 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by