How do I make a heat map on top of worldmap using hist3 in MATLAB?

11 vues (au cours des 30 derniers jours)
Prasanta Saikia
Prasanta Saikia le 9 Oct 2015
My x-axis is latitudes, y-axis is longitudes, and z-axis is the hist3 of the two. It is given by:
z=hist3(location(:,1:2),[180,360]);
where location(:,1) is the latitude column, and location(:,2) is the longitude column. This is how it looks: https://scontent-hkg3-1.xx.fbcdn.net/hphotos-xat1/v/t35.0-12/12084965_10153615474887731_540232475_o.jpg?oh=b9d6055e3b05a82068627ab62bd47e83&oe=5616AF42
What I now want is, instead of plotting on a self-created XY plane, I want to plot the same on a worldmap. And instead of representing the frequency of each latitude-longitude pair with the height of the bars of hist3, I want to represent the frequency of each location by a heat map on top of the world map, corresponding to each latitude-longitude pair's frequency on the dataset. I have been searching a lot for this, but have not found much help. How to do this? I could only plot the skeleton of the worldmap like this:
worldmap world
load geoid
geoshow(geoid, geoidrefvec, 'DisplayType', 'texturemap');
load coast
geoshow(lat, long)
I don't know what the colour in the map using the above code is being produced based on. I basically want, in other words, that my hist3 graph, should be superimposed on top of the world map. But while doing so, if we look at the bars of the histogram from top view, their height is not visible, right? So, I want that the bars be replaced by colors, and their intensity should be proportional to the heights of the bars. I want the map to be like this: http://www.outline-world-map.com/map-images-original/blank-transparent-thick-world-map-b1c.png. And I want the bars to be replaced by colors with the exact same proportional intensity as the heights of the bars.
Additionally, if possible, I would also like to know how to plot the hist3 on a 3D map of the world (or globe), where each bar of the hist3 would correspond to the frequency of each location (i.e., each latitude-longitude pair). And then, I would like to rotate the globe and zoom in to look at the 'skyscrapers' I made in more detail for each location. Thank you.

Réponses (0)

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by