How can I add different background colours of different areas a 3d matrix avoiding overlay?

2 ビュー (過去 30 日間)
Elisa
Elisa 2013 年 11 月 25 日
コメント済み: Elisa 2013 年 11 月 26 日
First of all, thanks a lot for reading...
I've a 3d matrix that I normally plot using plot3 with '.' (points instead of lines)
I would like to fill part of the same figure area with one colour and some other area with another colour (as a background), without covering the most important graph.
All the functions that I found seems to be really difficult for me to use and other doesn't work.
Please help me!!!
Thanks a lot in advance for any help provided!!!
example :
important_figure = [-60 -60 0; -60 -60 10; -60 -60 20; -60 -60 30; -60 -50 -10; -60 -50 0; -60 -50 10; -60 -50 20; -60 -50 30; -60 -40 -10;]
area1_to_highlight = important_figure(1:5,:)
area2_to_highlight = important_figure(6:end,:)

回答 (1 件)

Walter Roberson
Walter Roberson 2013 年 11 月 25 日
編集済み: Walter Roberson 2013 年 11 月 25 日
One way: create an image() over the entire area. Set the colors of the various parts of the image as desired. Create an alpha area that is 1.0 in the places you want the background to be visible, and 0 in places you want the graph underneath to be visible. Set that alpha array as the AlphaData property of the image.
Warning: this will not work if you rotate the 3D image. image() objects have no thickness. You can texture map surfaces with transparent surfaces, but if you are rotating the plot you need to think more about what "background" means.
  3 件のコメント
Walter Roberson
Walter Roberson 2013 年 11 月 26 日
Consider changing your approach to use scatter() with a color matrix.
Elisa
Elisa 2013 年 11 月 26 日
Thanks again Walter,
However, I still don't see how can can I use that. scatter() create a bubble plot, while I need to leave the data points displayed, as they are and filling the area that they share with a lighter colour.
thanks a lot

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

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by