MATLAB Answers

How to add one colorbar for three images for different range in matlab

2 views (last 30 days)
Tanmoyee Bhattacharya
Tanmoyee Bhattacharya on 30 Sep 2017
Edited: Image Analyst on 30 Sep 2017
I have a file having temperature data for three different time period
77.1500000000000 31.5000000000000 31.2848032786885 20.8521463414634 22.8482041666667
77.2000000000000 31.5000000000000 31.0782049180328 20.7838699186992 22.7519666666667
77.2500000000000 31.5000000000000 30.8706229508197 20.7152032520325 22.6533300000000
77.3000000000000 31.5000000000000 30.6625491803279 20.6463170731707 22.5531983333333
77.3500000000000 31.5000000000000 30.4542295081967 20.5773252032520 22.4525625000000
77.4000000000000 31.5000000000000 30.2460163934426 20.5084065040650 22.3522041666667
77.4500000000000 31.5000000000000 30.0381885245902 20.4396341463415 22.2529875000000
I want to plot 3,4,5 column with respect to lat lon. So I wrote this code
[lon,lat,temp] = xyz2grid(z(:,1),z(:,2),z(:,3));
pcolor(lon,lat,temp);
shading flat
h = colorbar;
set(h, 'ylim', [32.450000000000000 31.284803278688520])
Then image is coming. Then the picture is added.
My question is: if I want to make the image for all the columns and put one colorbar in a single frame what change do I have to make?

  0 Comments

Sign in to comment.

Answers (0)

Categories

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!