フィルターのクリア

Color ranging from blue, green, and red using fill

4 ビュー (過去 30 日間)
Eric
Eric 2015 年 12 月 22 日
回答済み: Image Analyst 2015 年 12 月 22 日
Hey everybody,
Does anyone know how to plot colors ranging from blue (-1) - green (0) - red (+1)? I'm currently only able to blot completely blue or red using the fill function with 'r' or 'b'.
Best,
Eric

回答 (2 件)

Walter Roberson
Walter Roberson 2015 年 12 月 22 日
fill() creates a patch so it is limited to what a patch can do. For that see http://www.mathworks.com/help/matlab/visualize/specifying-patch-coloring.html
Note that to do the interpolated coloring for faces you need multiple faces, whereas fill() only creates one face. You will be wanting to create a triangular mesh or quad mesh to color more closely.
Or you could create an image of the colors you want and apply the image as a texture map over a surface object created with surf(). You might want to use this File Exchange contribution

Image Analyst
Image Analyst 2015 年 12 月 22 日
Not sure what you want, but see if either of the two attached demos does it.

カテゴリ

Help Center および File ExchangeGreen についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by