The changed default properties for the axis are honored if LINE is called using the low-level syntax of LINE as below:
h = gca
set(h, 'DefaultLineMarker', 'o')
set(h, 'DefaultLineColor', 'g')
set(h, 'DefaultLineMarkerEdgeColor', 'r')
set(h, 'DefaultLineMarkerFaceColor', 'b')
set(h, 'DefaultLineLineStyle', ':')
line('xdata',[0 4]', 'ydata',[0 -4]')
More information regarding low-level syntax of LINE is available at:
<http://www.mathworks.com/access/helpdesk/help/techdoc/ref/line.html>
PLOT is a high-level function and picks up the default properties set for the figure, for example:
set(gcf,'DefaultAxesColorOrder',[1 0 0;0 1 0;0 0 1],...
'DefaultAxesLineStyleOrder','-|--|:')
t = 0:pi/20:2*pi;
a = ones(length(t),9);
for i = 1:9
a(:,i) = sin(t-i/5)';
end
plot(t,a)
More information regarding line styles used for plotting is available at:
<http://www.mathworks.com/access/helpdesk/help/techdoc/creating_plots/bqsxy_a-1.html#f1-13155>
Best Answer