Code covered by the BSD License  

Highlights from
line_fewer_markers

image thumbnail

line_fewer_markers

by

 

10 Jul 2013 (Updated )

An alias of the LINE command, with additional control for markers, in number and location.

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

test_line_fewer_markers_shortExample.m
clear all; close all;

figure; hold on; set(gca,'FontSize',16); set(gca,'FontName','Times'); set(gcf,'Color',[1,1,1]);
xlabel('x');ylabel('y');title('a family plot with nice legend');
t  = 0:0.005:pi;
line_fewer_markers(t*180/pi,cos(t)         ,9,  '--bs','spacing','curve');
line_fewer_markers(t*180/pi,sin(t)         ,9,  '-.ro','MFC','g','Mks',6,'linewidth',2);
grey1 = [1 1 1]*0.5;
line_fewer_markers(t*180/pi,sin(t).*cos(t) ,15, ':','Mk','p','color',grey1,'MFC',grey1,'linewidth',2,'LockOnMax',1);
leg = legend('cos','sin','sin*cos','location','best');

Contact us