Info

This question is closed. Reopen it to edit or answer.

Why do the legend function lines are ALWAYS pink?

1 view (last 30 days)
Aitor Quesada
Aitor Quesada on 27 Sep 2015
Closed: MATLAB Answer Bot on 20 Aug 2021
I'm doing a very simple program just to represent different functions/signals in the same plot. But everytime I add the legend, the lines are always pink, and as far as I know the line colors are the same as the ones the functions are.
% u1(x)=exp(-a*x^2), a=<R>, a>0
t=linspace(-10,10,10000);
u1=@(x,a) exp(-a.*x.^2)
plot(t,0,'m'), axis equal
hold on, plot(t,u1(t,0),'r')
hold on, plot(t,u1(t,1),'g')
hold on, plot(t,u1(t,2),'b')
legend('a=inf','a=0','a=1','a=2','location','nortwest')

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!