Quick question about imagesc, colormaps and colorbars
조회 수: 3 (최근 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!