Graphics    

Positioning the Legend

There are two ways to change the position of a legend in a graph, depending on whether plot editing mode is enabled.

If Plot Editing Mode Is Not Enabled

  1. Move the mouse over the legend and press and hold down the left mouse button. MATLAB changes the cursor to the indicate possible directions of movement.
  2. With the mouse button still pressed, move the legend anywhere in the graph.
  3. Release the mouse button.

If Plot Editing Mode Is Enabled

  1. Right-click on the legend. This selects the legend and triggers the display of the context menu for the legend.
  2. Select Unlock Axes Position from the context menu. (The legend is an axes object.)

  1. Move the cursor back over the legend axes (it should still be selected) and press and hold down either mouse button. MATLAB changes the cursor to indicate possible directions of movement.
  2. Move the legend anywhere in the graph.
  3. Release the mouse button.

  Using the Legend Function Editing the Legend