Hello,(adsbygoogle = window.adsbygoogle || []).push({});

I am trying to do the following:

for i=1:3

semilogy(plot1,'r(-,:,d)',plot2,'b(-,:,d)',plot3,'k(-,:,d)');

legend('i legend1','i legend2',''i legend1'')

end

where I need to draw the same plots under different settings, such that each function has the same color under the different settings, but with different style, e.g: solid line in the first, dotted in the second, ... and so on. I also want to include the number i in the legend at each iteration. How to do that?

Thanks

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Dynamic Legend in MatLab

Loading...

Similar Threads - Dynamic Legend MatLab | Date |
---|---|

Mathematica How to add legends with 6 or more discrete entries? | Mar 6, 2018 |

Issues Replicating Simulink Model within MATLAB (2DOF) | Mar 11, 2017 |

[Matlab] dynamic change in formatting crop not showing | Nov 11, 2014 |

How to do a dynamic graph in matlab | Jun 5, 2013 |

Math & Science Dynamic Page Layout IDE | Nov 29, 2012 |

**Physics Forums - The Fusion of Science and Community**