how to change brightness when using pcolor

3 次查看(过去 30 天)
Hi,
I´m trying to visualize newton fractals with Matlab. For that I´ve created two matrices A and B where A contains the number of the zero and the other the number of iterations. Then I used pcolor to visualize these but unfortunately I´m only able to display either A (then everything is red, green or blue) or B and not both like on this picture for example: http://upload.wikimedia.org/wikipedia/commons/6/6a/Julia-set_N_z3-1.png
How can I adjust the brightness of the points in A corresponding with B?
Thanks a lot!
  2 个评论
Walter Roberson
Walter Roberson 2012-12-24
Should brighter correspond to more iterations or to fewer iterations?
Maximilian
Maximilian 2012-12-24
编辑:Maximilian 2012-12-24
the more iterations the brighter it should be (but it would be interesting to know how to realize the other way, too)

请先登录,再进行评论。

回答(2 个)

Image Analyst
Image Analyst 2012-12-23
I don't know what A and B are, but try using image() instead of pcolor(). One reason being that pcolor does not display all the elments of your matrix as pixels on the screen. Try this
pcolor(magic(4));
How many tiles do you see? 4 by 4 like you'd expect? No, there's only 3 by 3. So use image() or imshow() and then apply a colormap with colormap().

Walter Roberson
Walter Roberson 2012-12-24
For each color type, have a pair of vectors: a base RGB color, and a per-iteration RGB increment (possibly signed).
bases(ColNum,:) + iterations .* increments(ColNum,:)

类别

Help CenterFile Exchange 中查找有关 Colormaps 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by