MATLAB: Empty plotting using contourf contourf Hi: I have a data set of X,Y,Z, which corresponds to x,y axis, and paremeter need to be plotted but when I use [xc,yc]=contourf(X,Y,Z), the plotting is blank, could anyone help me about this Thanks! Li Best Answer Your data throws this error when I try to plot it with contourf:Warning: Contour not rendered for constant ZData > In contourf (line 60)You will have to solve that problem.Exploring this, the mean (using nanmean) of āZā is 6, and standard deviation (using nanstd) is 0.This is the best you can hope for:figure(1)contourf(X, Y, Z, [6 6])grid on Related SolutionsMATLAB: How to show the contour plot of two functions in a graph See if this does what you want:x = linspace(-10,10);y = linspace(-10,10);[X,Y] = meshgrid(x,y);Z = X.^2+Y.^2;figurecontour(X,Y,Z, 'ShowText','on')Z = X +Y;hold oncontour(X,Y,Z, 'ShowText','on')hold offUse the hold function to make multiple plots on one set of axes. MATLAB: Help with contourf plot contourf(x, y, z) Related QuestionContours at a specific height from the surface || surfcContourf with more coloursContour in a 3D surface plotContourf with irregular spaced pointsHow to remove the grid from plot
Best Answer