**How to use legend command MATLAB Answers - MATLAB**

I have a matlab function myfunction(var1,var2) which gives me a plot with a legend. I would like to generate more plots with this function in one graph.... Here is kind of a hack which might solve your problem. It's not elegant but the trick is to plot a dummy curve in white, which won't appear on the plot but to which you can still assign a legend.

**Add text objects to legend in MATLAB plots Stack Overflow**

From doc for plot "If one of Yn or Xn is a matrix and the other is a vector, it [i.e., PLOT] plots the vector versus the matrix row or column with a matching dimension to the vector." OP has his Y data in an array which in Matlab must be rectangular so there cannot be 21 points in the first array but an (indeterminate) number that is a multiple of 5 (the length of X vector).... Adding legend to plots created by for loops. Learn more about legend, plot, plotting, 3d plots, subplot, figure, matlab gui, matlab function, matlab compiler, matlab

**add a number to the legend MATLAB Answers - MATLAB**

Adding legend to plots created by for loops. Learn more about legend, plot, plotting, 3d plots, subplot, figure, matlab gui, matlab function, matlab compiler, matlab how to clean stained outdoor tiles From doc for plot "If one of Yn or Xn is a matrix and the other is a vector, it [i.e., PLOT] plots the vector versus the matrix row or column with a matching dimension to the vector." OP has his Y data in an array which in Matlab must be rectangular so there cannot be 21 points in the first array but an (indeterminate) number that is a multiple of 5 (the length of X vector).

**Add text objects to legend in MATLAB plots Stack Overflow**

From doc for plot "If one of Yn or Xn is a matrix and the other is a vector, it [i.e., PLOT] plots the vector versus the matrix row or column with a matching dimension to the vector." OP has his Y data in an array which in Matlab must be rectangular so there cannot be 21 points in the first array but an (indeterminate) number that is a multiple of 5 (the length of X vector). how to add archive folder in outlook 2007 I want to add a legend to the plot so that each time the button in GUI is pressed the legend will show a string with corresponding number.

## How long can it take?

### add a number to the legend MATLAB Answers - MATLAB

- add legend matlab plot Stack Overflow
- add legend matlab plot Stack Overflow
- add a number to the legend MATLAB Answers - MATLAB
- Create legend labels for polar plot MATLAB - MathWorks

## How To Add Legend Of Matlab Plot

Adding legend to plots created by for loops. Learn more about legend, plot, plotting, 3d plots, subplot, figure, matlab gui, matlab function, matlab compiler, matlab

- From doc for plot "If one of Yn or Xn is a matrix and the other is a vector, it [i.e., PLOT] plots the vector versus the matrix row or column with a matching dimension to the vector." OP has his Y data in an array which in Matlab must be rectangular so there cannot be 21 points in the first array but an (indeterminate) number that is a multiple of 5 (the length of X vector).
- Adding legend to plots created by for loops. Learn more about legend, plot, plotting, 3d plots, subplot, figure, matlab gui, matlab function, matlab compiler, matlab
- I am having the data lets say for seven elements and I am ploting it using a loop in a single figure. But in these seven elements someof the elements contain nothing and then the plot for that is not plotted.
- Polar plot, specified as a scalar handle. format — Format for legend label cell array Format for legend label added to the polar plot, specified as a cell array.