Plotting 2 streamlines on the same plot
Hi everyone.
I need to plot 2 different streamlines on the same plot. I was able to do it, but I can’t insert a propper legend. My plot code is:
figure
a=streamline(XYe);
hold on
area(circ(1,:),circ(2,:),’FaceColor’,Col,’EdgeColor’,Col)
hold off
xlabel(‘x/a [adim.]’,’FontSize’,25)
ylabel(‘y/a [adim.]’,’FontSize’,25)
set(a,’Color’,’k’)
legend(‘Stokes’,’Euler’)
But the legend doesn’t show the color of the lines correctly (both lines on the legend are blue, the default color of the streamline, and ‘Euler’ doesn’t appear black on the legend, but it does appear black on the plot).
I know the use of set and the figures is not appropiate, and I know this is just a detail, but that’s my problem, I want to understand figures, and "set". It would be very helpful if you could help me plot this, and also help me understand the mechanism of figures.
Thanks in advance.
JoséHi everyone.
I need to plot 2 different streamlines on the same plot. I was able to do it, but I can’t insert a propper legend. My plot code is:
figure
a=streamline(XYe);
hold on
area(circ(1,:),circ(2,:),’FaceColor’,Col,’EdgeColor’,Col)
hold off
xlabel(‘x/a [adim.]’,’FontSize’,25)
ylabel(‘y/a [adim.]’,’FontSize’,25)
set(a,’Color’,’k’)
legend(‘Stokes’,’Euler’)
But the legend doesn’t show the color of the lines correctly (both lines on the legend are blue, the default color of the streamline, and ‘Euler’ doesn’t appear black on the legend, but it does appear black on the plot).
I know the use of set and the figures is not appropiate, and I know this is just a detail, but that’s my problem, I want to understand figures, and "set". It would be very helpful if you could help me plot this, and also help me understand the mechanism of figures.
Thanks in advance.
José Hi everyone.
I need to plot 2 different streamlines on the same plot. I was able to do it, but I can’t insert a propper legend. My plot code is:
figure
a=streamline(XYe);
hold on
area(circ(1,:),circ(2,:),’FaceColor’,Col,’EdgeColor’,Col)
hold off
xlabel(‘x/a [adim.]’,’FontSize’,25)
ylabel(‘y/a [adim.]’,’FontSize’,25)
set(a,’Color’,’k’)
legend(‘Stokes’,’Euler’)
But the legend doesn’t show the color of the lines correctly (both lines on the legend are blue, the default color of the streamline, and ‘Euler’ doesn’t appear black on the legend, but it does appear black on the plot).
I know the use of set and the figures is not appropiate, and I know this is just a detail, but that’s my problem, I want to understand figures, and "set". It would be very helpful if you could help me plot this, and also help me understand the mechanism of figures.
Thanks in advance.
José streamline, plot, figure, legend, color MATLAB Answers — New Questions