how to change brightness when using pcolor
5 views (last 30 days)
Show older comments
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 Comments
Walter Roberson
on 24 Dec 2012
Should brighter correspond to more iterations or to fewer iterations?
Answers (2)
Image Analyst
on 23 Dec 2012
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().
0 Comments
Walter Roberson
on 24 Dec 2012
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,:)
0 Comments
See Also
Categories
Find more on Colormaps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!