Documentation Center

  • Trial Software
  • Product Updates

Add Colorbar to Graph Using Plot Tools

Colorbars display the current colormap and indicate the mapping from data values to colors. The following picture shows a surface plot with 2-D contour lines below. The colorbar at the right indicates how the z-axis data values correspond to colors in both the surface and contour graphs.

Add a colorbar by clicking the colorbar button in the toolbar or by selecting Colorbar from the Insert menu. When plot editing is enabled, you can select and then move and resize the colorbar.

Positioning Options for Colorbars

There are a variety of ways to reposition a colorbar in the figure.

  • Enable plot edit mode, then select and drag the colorbar to the desired location.

  • Right-click over the colorbar to display its context menu. Mouse over Locations and select one of the predefined locations for the colorbar.

  • Right-click over the colorbar to display its context menu and select Properties. This displays the Property Editor, which provides a graphical positioning device for the colorbar.

Interactively Select Different Colormap

If you change the figure colormap, the colorbar updates automatically. Use one of the following methods to interactively change the colormap.

  • Right-click over the colorbar to display its context menu. Mouse over Standard Colormaps and select from the displayed list.

  • Right-click over the colorbar to display its context menu and select Properties. Click the figure background to load the figure properties into the Property Editor. Select the colormap from the pull-down list.

Interactively Modify the Colormap

You can use a colorbar to modify the current colormap. To do this, select Interactive Colormap Shift from the right-click context menu. In this mode, you can left-click down on any color in the colorbar and, by dragging the mouse, shift the color-to-data mapping.

To perform more sophisticated operations on the colormap, open the colormap editor by selecting Open Colormap Editor from the colorbar's context menu. See the colormapeditor reference page for more information.

See Also

|

Was this topic helpful?