Contour plot for river cross sections

3 views (last 30 days)
I have a dataset that contains Latitude, Longitude, and a z-value that represents the AME of some data that I have at very specific cross sections of a river. I am trying to visualize the AME data as contours along the river for a spatial representation and comparison to the AME of another set of data at those same cross sections. I have tried using the contour function in conjunction with meshgrid and griddata but the interpolation creates a plot of the entire mesh (even though NaN values are created in the griddata mesh) instead of a contour plot of only the river. I have also tried plotting the data using a function called ffgrid, but this only represents the values as points and not as contours as I would like. Do you have a suggestion of functions to accomplish this or another way to manipulate my dataset so that can I can plot the data within boundaries of the river only and not the entire mesh grid? I have attached a sample of the data, the contour plot I have created so far, a scatter plot of the data and a sketch of how I would like the data visualized.

Accepted Answer

Kelly Kearney
Kelly Kearney on 18 Aug 2014
My first instinct would be to transform the data from lat/lon coordinates into length/width coordinates, where length and width are measured relative to the central path of the river, then perform all contouring calculations there. You can then transform back for display. I've used this function for similar things in the past.
  1 Comment
Natalie
Natalie on 18 Aug 2014
Thank you. I am going to try this out and see if I can get it to work.

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!