About 6,250,000 results
Open links in new tab
  1. legend - Add legend to axes - MATLAB - MathWorks

    To label more than 50 objects in the legend, specify a label for each object. Otherwise, legend depicts only the first 50 objects in the graph.

  2. matlab - Adding to a legend after each iteration - Stack Overflow

    How can you add to the legend from a single script? Appending entries to a legend is not possible, so you have to construct a new legend using data from the current legend. A …

  3. Add Legend to Axes in MATLAB - GeeksforGeeks

    Apr 26, 2025 · MATLAB provides the legend() function to add legends to a set of axes, which makes legend-making easy and efficient. In this article, we shall see how to add legends to …

  4. Add Legend to Graph - MATLAB & Simulink - MathWorks

    Legends are a useful way to label data series plotted on a graph. These examples show how to create a legend and make some common modifications, such as changing the location, setting …

  5. How to Create Custom Legend in MATLAB - Delft Stack

    Feb 2, 2024 · While the legend() function provides a straightforward way to add legends, its limitation in handling multiple legends can be overcome using placeholder plots. By creating …

  6. MATLAB graph plotting: assigning legend labels during plot

    May 24, 2012 · Use 'DisplayName' as a plot() property, and call your legend as. legend('-DynamicLegend'); My code looks like this:

  7. Add Legend to Axes in MATLAB - Online Tutorials Library

    legend (labels) − Function in MATLAB is used to add labels to a plot to explain what each part of the plot represents. You can use it like this: legend ( {'Label1', 'Label2', 'Label3'}) to label …

  8. How to set a legend with a label for two or more lines? - MATLAB ...

    Oct 31, 2024 · Hello, In the graphic legend I want to share the same label for two or more lines. For example, I have two (or more) pair of data x = linspace(0,0.5); for i = 1:3 y1(i,:) = x.^2 + i; ...

  9. Plot Legends in MATLAB | Towards Data Science

    Jul 5, 2020 · The legend () function in MATLAB/Octave allows you to add descriptive labels to your plots. The simplest way to use the function is to pass in a character string for each line on …

  10. Demystified: A Comprehensive Guide to Working with Legends in MATLAB

    Dec 27, 2023 · Adding Legends to MATLAB Plots. The legend command in MATLAB allows adding a legend to any figure plot. The basic syntax is: legend(labels) Where labels is a string …

  11. Some results have been removed
Refresh