Email us at: contact@thesisandcode.com | Phone: 0091-9840890256
thesisandcode logo

Thesis Coding Experts

Instant answers to all your coding queries by thesis coding experts
Home Question And Answer

Question Answer

Posted Time & Date | 04:29 PM - 18 January 2016

Ques :  I want to plot (x1, y1, x2, y2, ‘linewidth’, 8), but the linewidth ends up applying to both lines. Do I need to use two plot functions with a hold on command to have line1 a different width than line2?

Answer :  There is no direct solution for this problem, what you can do is:
h=plot(x1,y1,x2,y2,'LineWidth',8);
set(h(1),'linewidth',5);
set(h(2),'linewidth',10);
Was this answer helpful?
Share icon 0 icon 0