Custom HSV contourf Plot

Hi,
I have 3 2D matrices; Hue, Saturation and Value, and I would like to create a figure (based on the values in these matrices) similar to a contourf plot.
Is there a simple solution i.e. colormap() function, or should I be plotting pixels directly?
Thanks
Chris

回答 (2 件)

Walter Roberson
Walter Roberson 2014 年 3 月 5 日
編集済み: Walter Roberson 2014 年 3 月 5 日

0 投票

pcolor() and colormap(hsv) ?
Chris
Chris 2014 年 3 月 7 日

0 投票

I don't think that is wuite the solution I am looking for.
I have solved the problem using python with the following code
import numpy as np
import pylab as pl
from matplotlib.colors import hsv_to_rgb
# I already have the matrices H, S and V from a previous simulation
HSV = np.dstack((H,S,V))
RGB = hsv_to_rgb(HSV)
pl.imshow(RGB, origin="lower", extent=[0, 360, 0, 1], aspect=150)
pl.xlabel("H")
pl.ylabel("V")
pl.title("$S_{HSV}=1$")
pl.show()
This seems to work well. It would be nice if I could have a similar code in MATLAB so that I can do everything in the one place.

1 件のコメント

Image Analyst
Image Analyst 2014 年 3 月 7 日
Post a screenshot of your desired output so we can see what it creates and we can give you code to do the same thing in MATLAB. Attach a .mat file with H, S, and V stored inside it so we have your exact data.

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

カテゴリ

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

質問済み:

2014 年 3 月 5 日

コメント済み:

2014 年 3 月 7 日

Community Treasure Hunt

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

Start Hunting!

Translated by