Filling a map with colours

9 views (last 30 days)
Suha
Suha on 7 Apr 2018
Commented: Suha on 11 Apr 2018
Dear all
I have a map for a country as .bmp. I then transfer this image to MATLAB using imread, and then visualise it using imagesc. Since this is a map with different regions, I would like to fill those regions with different colours based on a variable. There are 20 regions and I have 20 values for every region. I would like to fill different shades of green in those 20 regions and then assign a colorbar to the map. Could someone please tell me if there is a function for filling colours in different regions on a map?
Thank you for your help.
Suha

Accepted Answer

Walter Roberson
Walter Roberson on 8 Apr 2018
The map for the country that you read: is the value that you read a region number, and 0 for the places that are not inside the map?
  6 Comments
Image Analyst
Image Analyst on 8 Apr 2018
Try imquantize() to get each region down to a unique gray level (index).
Suha
Suha on 11 Apr 2018
Thank you !!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!