Quick question about imagesc, colormaps and colorbars
1 次查看(过去 30 天)
显示 更早的评论
Hello, I have a question about an imagesc plot I create animations for, and why I get such a wildly changing colorbar.
Basically, what I do to set it up is set up a n x n x 10 matrix of images, which I first plot the first slice of (:,:,1) using iamgesc. For each subsequent frame of the animation, I set the cdata property of the imagesc plot I made to the new data values.
After that, I find the highest and lowest values along the 10 frames. After I do that, I set both the caxis and the Limits property of the colorbar to those limits.
Now to my problem. Here is a gif of the animation I created , the problem is for some reason the colormap isn't consistent... its like its redrawing the map every slice. I tried everything from manually declaring the climits and caxis every frame, but i either get the color of the colorbar changing with the ticks/range the same or the tick labels of the colorbar changing with the colors the same.
Any ideas on how best to address this? Thanks!
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 White 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!