How to plot polygons
Show older comments
Please find attached the excel sheet that contains the long, lat and the statistically significant values in trends. I am able to plot these points where i have values in sgt file, but i want to plot it as a polygon. Any suggestions on how to plot the polygons wherever i have the data values.
Answers (3)
Walter Roberson
on 16 Dec 2016
What are we looking at in that file? There is no header on it, and there are 361 rows by 256 columns, so it is not a matter of having a lat column, a long column, and a small number of columns of data corresponding to each location. Examination shows that none of the columns greatly differ from the others, so none of the columns correspond to latitude or longitude.
You also do not describe the kind of polygon that you want to plot over.
I suggest
num = xlsread('Plot_stats.xls');
surf(num, 'edgecolor', 'none')
8 Comments
Sophia
on 16 Dec 2016
Edited: Image Analyst
on 17 Dec 2016
Walter Roberson
on 17 Dec 2016
If you cannot attach the xlsx directly, then you can zip it and attach the zip .
In what you had attached previously there were no lat or long values; perhaps they will show up in the more complete data.
Sophia
on 17 Dec 2016
Walter Roberson
on 17 Dec 2016
The .xlsx is 361 x 361, but otherwise it looks much the same as the .xls file. It has no header labels and none of the columns or rows is sharply different from the others, so none of them can represent latitude or longitude vectors that the other values are to be interpreted as being framed by.
Sophia
on 19 Dec 2016
Walter Roberson
on 19 Dec 2016
If
idanom_trend_per_winter = xlsread('Plot_stats.xlsx', 'sgt');
then you have the problem that it is 269 x 256, not 361 x 361.
Image Analyst
on 17 Dec 2016
0 votes
Did you try plot() to do the dashed lines, and fill() or patch() to fill the inside with colored tints?
2 Comments
Sophia
on 17 Dec 2016
Image Analyst
on 17 Dec 2016
Did you try fill() or patch() to fill the inside with colored tints?
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!