I want to change the marker size and line width for my following plot:
function [fitresult, gof] = createFit(diameter, time)%CREATEFIT(DIAMETER,TIME)
% Create a fit.
%
% Data for 'Raw Data' fit:
% X Input : diameter
% Y Output: time
%%Fit: 'Raw Data'.
[xData, yData] = prepareCurveData( diameter, time );% Set up fittype and options.
ft = fittype( 'power1' );opts = fitoptions( 'Method', 'NonlinearLeastSquares' );opts.Display = 'Off';opts.StartPoint = [155.522818446907 -1.88432816467686];% Fit model to data.
[fitresult, gof] = fit( xData, yData, ft, opts );% Plot fit with data.
figure( 'Name', 'Raw Data' );h = plot( fitresult,'b', xData, yData, '.k', 'MarkerSize',10); %Works without 'MarkerSize',10 but not with it
legend( h, 'time vs. diameter', 'Raw Data', 'Location', 'NorthEast' );% Label axes
xlabel diameterylabel timegrid onhold on;axis([0 22 0 41]);
Best Answer