matlab Caxis problem in 2016
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
[grid_x grid_y] = meshgrid(1:size(peaks(15),1), 1:size(peaks(15),2));
figure; surf(grid_x, grid_y, 0*grid_y ,peaks(15))
shading interp; lighting phong;

in version prior to 2016, color beyond caxis will be displayed as the caxis extremum colors without problem. in 2016, color will be displayed with an erroneous dark shade if renderers other than painters have been used. However, painters gives unwanted overthick lines when render which is not professinoal at all.
Réponses (2)
Walter Roberson
le 7 Juil 2016
I find that a lot of the apparent difference in color range goes away when I ensure that I am using the same colormap between the two (I am testing R2016a and R2012a as you mentioned those.)
There is still a notable difference between the images after that, but I realized that really it is a difference in the algorithm used to decide how to magnify small images to larger windows. peaks(15) is only 15 x 15 and by default when drawn by itself that gets magnified rather than taking only 15 x 15 pixels.
2 commentaires
Walter Roberson
le 7 Juil 2016
In R2016a all I am seeing is differences in how the three choose to interpolate small images into larger areas.
For my test I am using
pcolor(grid_x, grid_y, peaks(15))
shading interp; lighting phong; colorbar(); caxis([-1 1]);
colormap(jet(256))
pcolor and surf are the same basic surface algorithms but pcolor always uses z = 0 (the same as what you were generating) and pcolor uses its third parameter as the color information, and uses view([0 90]) . Also pcolor defaults to 'edgecolor', 'none' whereas your surf() is defaulting to 'edgecolor', 'k'
Voir également
Catégories
En savoir plus sur Surface and Mesh Plots dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

