Combine contour plot with Histogram
Ältere Kommentare anzeigen
I have two maps that I need to combine and plot in matlab. The first is an elevation map of land. I made a contour plot of the land. I have a second map that displays gas pockets of the land. I need to make a histogram of the gas pockets and combine it with the contour map. I can do each part seperatly but don't know how to combine the two graphs.
Antworten (1)
Image Analyst
am 22 Okt. 2013
0 Stimmen
I don't know how you would either. All spatial information is lost when you make a histogram from the elevation image, so how could the histogram be on the same image as the elevation image and make sense? Why do you think that you need to combine these? I suggest you don't combine them unless you mean just to put the elevation as either a surface or image with contour lines, and the histogram in an axes next to it.
5 Kommentare
Image Analyst
am 22 Okt. 2013
By the way, maybe this might be interesting: http://www.mathworks.com/matlabcentral/fileexchange/35452-finddepressions
Clayton
am 22 Okt. 2013
Image Analyst
am 22 Okt. 2013
It doesn't make sense to take an elevation map image or a gas pockets image and make them either a surface with surf(), or an image with imshow() or image() and contour(), and then just plop a histogram (bar chart) on top of it. That would look totally goofy and be meaningless, like a fish on a bicycle. I think you're misunderstanding either what is wanted or what a histogram is. Or maybe I'm not visualizing what you want. I think maybe what you're really after is surfc(). This function will allow you to take an image (the elevation/height/topography image) and plot it in a 2.5D perspective view, and then color the surface height according to a second image you pass in (the gas pocket image) rather than the height of the surface (like surf() would do).
Clayton
am 22 Okt. 2013
Image Analyst
am 22 Okt. 2013
A bar chart is not always a histogram, so don't call every bar chart a histogram. In fact the bar chart you mention is not a histogram. A histogram is a frequency of occurrence. I'm not even sure how you would represent bars over an image like how you want it. Do you want a bar at every single pixel? That would be too crowded that you wouldn't be able to see anything at all - the thousands or millions of bars would all obscure each other.
Kategorien
Mehr zu Contrast Adjustment finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!