How do I create density contours on a polar plot?

9 views (last 30 days)
I have a polar plot where I need to show where the greatest densities are located for field data I collected this summer. My file is attached...data file is the data, location 1 is the actual code with the plot.
I need to be able to show a contour or several contours around the main clustered area on the polar plot to show where to highest densities are located. I know this is very easy on a scatterplot, but how do you do it on a polarplot? You do not have to use contours, any visualization of the cluster density will work. Thank you.
  3 Comments
dpb
dpb on 18 Nov 2016
Show us the plot and if possible and example that's similar to desired...
Zach Kornse
Zach Kornse on 2 Dec 2016
the plot is the "location1" file. I want that plot with a density contour similar to the one located in the file "scatplot". Similar to the image attached

Sign in to comment.

Answers (1)

dpb
dpb on 2 Dec 2016
Edited: dpb on 3 Dec 2016
I was afraid that's what you were looking for -- there's nothing out-of-the-box in Matlab that'll do it. I see the following submission at FEx <fileexchange/48224/PolarContour.m>. Not much in the way of useage provided, but it's quite short -- it shows converting given polar coordinates to cartesian and then using contour. That is, in fact, how polar works; there is no polar coordinate system inherent in HG; everything is x-y only; the polar stuff has to be simulated.
ADDENDUM
Had some time this AM to look at this again...I don't have HG2 but to try to understand your data and what to do with it, I recreated your scatter plot from your location script. I got the following--
Does that look like what you expect? If so, you're going to have a very difficult time generating a contour as you only have a cluster of observations in three general locations -- unless the coordinates aren't being reflected in proper locations on this plot.
  1 Comment
Zach Kornse
Zach Kornse on 9 Dec 2016
Sorry, I have not gotten a notification. This is exactly what it should look like. I wanted density contours on this then.

Sign in to comment.

Categories

Find more on Contour Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!