From: Sarah on 21 Jul 2010 17:08 "Edoardo" <speedo77(a)email.it> wrote in message <gg41lp$1d0$1(a)fred.mathworks.com>... > I want to plot a "heatmap" of four matrices A, B, C, D using the imagesc and arranginf them in a 4x1 subplot > > subplot(4,1,1) > imagesc(A) > > subplot(4,1,2) > imagesc(B) > > subplot(4,1,3) > imagesc(C) > > subplot(4,1,4) > imagesc(D) > > How can I insert a unique colorbar referring to all the four matrices? I success only in inserting four different colorbars, one for each subplot, but, obiously they have different scale, so I can not compare the 4 different matrices. > > Many thanks > Edoardo Hello, I come up with the exact same problem. The image sources consist of matrices in *.txt format and there are 8 subplots in one figure (4 by 2) just for a reporting purpose. The universal colorbar was inserted in the figure by using handle graphics. The colorbar covers all the ranges of numbers from 8 images by using "caxis" command. The problem is that the colorbar does not match with the values. It seems that the colorbar can only match with the last subplot in the algorithm (I did experiment by switching the order of subplot in the algorithm and it did match only with the last one). Can any expert share the idea of how to overcome this problem without using imagesc(...,clims) command? "clims" might enhance the output image but it does not seem to solve the real problem that I have. I wish I have a better understanding in colorbar. I read most of mesages posted here, but couldn't have any luck. Any kind of help is appreciated. Thank you very much. Sarah
|
Pages: 1 Prev: simulation loop vectorization and slowdown Next: Colorbar not drawing correctly |