How to fill outside of contourf plot based on x,y,z data

3 views (last 30 days)
I have the following script:
B13data= csvread('B13_Sep2015.csv',1,0);
%Create x,y,z values
x=B13data(:,1);
y=B13data(:,2);
z=B13data(:,3);
%Make a range of x and y data points for contour
xi=linspace(min(x),max(x),40);
yi=linspace(min(y),max(y),40);
%Mesh the x and y data
[XI YI]=meshgrid(xi,yi);
%Interpolate original data with the meshed data range
ZI=griddata(x,y,z,XI,YI);
%Contour meshed data
contourf(XI,YI,ZI)
colorbar;
X and Y are the x and y-coordinates and the corresponding z-value is the elevation. When I plot, it cuts off at the points where I didn't collect data. How do I proceed to extend the plot to make it look more full based on the data I already have?

Accepted Answer

Walter Roberson
Walter Roberson on 4 Oct 2015
You might want to try John D'Errico's File Exchange contribution inpaint_nans

More Answers (0)

Categories

Find more on Contour Plots in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!