MATLAB: Transparent plot transparent plot Hi, Is there any way to make the dots that appear in a plot transparent? an example of what i would like to do is plot(x,y, 'color', [1 0 0], 'alpha', 0.5) Best Answer Not with a line object, but you can use an old graphics 'trick' to get it done:% Your data...x = 1:10;y = x.^2;% Now make the 'line' (actually a surface)...z = zeros(size(x));S = surface([x;x],[y;y],[z;z],... 'facecol','no',... 'edgecol','interp',... 'linew',2,... 'edgealpha',.2,... 'edgecolor','b'); Related SolutionsMATLAB: Problem with fsurf (where is the controur?) When I try in R2019a, the contour is there, but you need to rotate the plot to see it as it is underneath the surface. MATLAB: 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. Related QuestionPlot with dot and different colorsHow to plot the contour of a surface at a specific heightContour plot for given x,y,z
Best Answer