Hello there,
I am having trouble with my legend.
I have single plot, and then I typed "hold on" and added a curve to my plot.
I cannot insert a correct legend though!
How is this possible?
Thank you in advance.
Cheers,
Andrea.
plot(linspace(0.03,0.3), poiseuille(linspace(0.03,0.3)),'k')axis([0 0.3 0 12])title('Velocity profiles for $\epsilon = 0.1$','Interpreter','latex',... 'fontweight','bold','fontsize',20)xlabel('$r$ [m]','Interpreter','latex','fontweight','bold','fontsize',20);ylabel('$u=u(r,t=0)$ [m/s]','Interpreter','latex',... 'fontweight','bold','fontsize',20);leg_1 = legend('Poiseuille' );set(leg_1,'FontSize',10);hold onplot(linspace(0.03,0.3), vel((1:100), 0),'color', [0.3 0.3 0.55])leg_2 = legend( {'$\alpha = 0.1$'}, 'Interpreter','latex' );set(leg_2,'FontSize',15);hold on
Best Answer