how do i add a legend to a graph plotted using ltiview() in matlab

To add a legend to a graph plotted using ltiview() in Matlab, you can follow these steps:

  1. In the ltiview window, select "Tools" and "Edit Plots."

  2. From the "Edit Plots" window, select the plot you want to add a legend to.

  3. Under "Plot Properties," click "Data Cursor."

  4. Click on the plot where you want to add the legend entry. This will add a data cursor to the plot.

  5. Double-click on the data cursor to open its properties dialog.

  6. In the "Data Cursor Properties" dialog, check the "Edit text" box.

  7. In the "Text" dialog, enter the legend text you want to use.

  8. Close the "Text" dialog, and then close the "Data Cursor Properties" dialog.

  9. Repeat steps 4-8 for each additional plot you want to add legend entries for.

  10. Save your changes by selecting "File" and "Save" from the ltiview window menu.

Now when you display the plot, the legend should appear on it.

related categories

gistlibby LogSnag