Borrar filtros
Borrar filtros

How to reduce size of points on a plot?

9 visualizaciones (últimos 30 días)
Jasnoor Singh
Jasnoor Singh el 25 de Mayo de 2016
Editada: Voss el 9 de En. de 2024
Following is my figure output. The blue dots are the original pressure values and the curve has been fitted. Is it possible to reduce the size of the blue dots so that I can visualise the curve more clearly? I want the original values to stay on the plot but reduce the size of the blue dots. Any suggestions please? My code is written below for your reference. Thanks.
x = 1:44;
y = 1:44;
for i = 13
a = xlsread('\\engdfs\air.xlsx',strcat('CO',int2str(46*i-18),':','EF',int2str(46*i+25)));
[xData, yData, zData] = prepareSurfaceData( x, y, a );
ft = 'loess';
[fitresult, gof] = fit( [xData, yData], zData, ft, 'Normalize', 'on' );
figure;
h = plot( fitresult, [xData, yData], zData );
c = colorbar;
c.Label.String = 'Pressure (kPa)';
caxis([-5 95]);
legend( h, 'Fitted Curve', 'Original Pressure Values', 'Location', 'NorthEast' );
xlabel('X-Direction','rotation',20,'FontSize',10);
ylabel('Y-Direction','rotation',-30,'FontSize',10);
zlabel('Pressure (kPa)','FontSize',10);
grid on;
axis([1 44 1 44 -5 95]);
set(gca,'TickDir','out');
fname = sprintf('Contour %d.png',i);
fullFileName = fullfile('\\engdfs\Analysis',fname);
saveas(gcf,fullFileName);
end

Respuestas (1)

Voss
Voss el 9 de En. de 2024
% example data:
xData = (1:10).';
yData = (1:10).';
zData = rand(10,1);
% perform the fit:
ft = 'loess';
[fitresult, gof] = fit( [xData, yData], zData, ft, 'Normalize', 'on' );
% plot the fit:
h = plot( fitresult, [xData, yData], zData)
h =
2×1 graphics array: Surface (curvefit.gui.FunctionSurface) Line
% set the line's MarkerSize:
h(2).MarkerSize = 4;

Categorías

Más información sobre Discrete Data Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by