Plot Color Bars - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Graphics : Plot Color Bars

Plot Color Bars

 

Description

Options

Examples

Description

  

Color bars can be added automatically with the colorbar option to many types of plots, most notably, contour plots and density plots. When such plots are combined with plots:-display color bars may be removed since it is not possible for a single plot to have more than one color bar at a time.

  

The options listed below may be provided to the colorbar option in plot commands that support it. These options can be included in a list (colorbar=list_of_options) and are generally available to all commands that support color bars. The help page for a particular command may provide more detail about the colorbar options it accepts.

Options

  

barcaption=c

  

The caption for the color bar. The value c can be a string or a typesetting expression.  For information on how to specify c, see plot/typesetting. The default is no caption.

  

barlabels=l

  

The labels for color bar. The value l should be a list of real number values.

  

captionfont=l

  

This option defines the font for the caption barcaption. The value l must be a list of the form [family, style, size] where valid values are the same as font described in plot/options.

  

discrete

  

This option given as discrete or discrete=true causes the color bar to be rendered in discrete stripes instead of a continuous gradient. This is not supported by all plot commands, in particular, not by densityplot.

  

labelcount=n

  

This option overrides the default algorithm to choose well-spaced labels for the colorbar and instead forces n equally spaced labels from the actual minimum to the actual maximum values in the plot.

  

labelfont=l

  

This option defines the font for the label values. The value l must be a list of the form [family, style, size] where valid values are the same as font described in plot/options.

  

labelformat=s

  

The printf formatting string used to render the bar labels or the name typeset. In the former case labels are passed to evalf and then rendered with sprintf. In the latter case, they are directly wrapped in typeset per plot/typesetting. The default value of s is "%0.3g" which renders three floating-point digits.

Examples

plots:-contourplotsinxy,x=1..1,y=1..1,colorbar=discrete

plots:-densityplotsinxy,x=3..3,y=3..3,colorbar=barcaption=typesetz=sinxy,captionfont=HELVETICA

AMatrix21,21,i,jevalfsini11j11100,datatype=float8:

plots:-matrixplotA,dimension=2,gap=0.1,colorbar=labelcount=5,labelfont=Roman,Bold,size=600,400

plots:-surfdataA,colorscheme=Viridis,dimension=2,colorbar=barlabels=0.75,0.5,0.25,0,0.25,0.5,0.75

Color bar plot objects can be created with the plottools:-colorbar and added to plots with plots:-display

cbplottools:-colorbar1..1,Viridis,discrete,barlabels=0.8,0.4,0,0.4,0.8

cbCOLBARPLOT...,PLOT...

(1)

plots:-displayplotx2,cb

See Also

plot/options

plot/typesetting

plots[contourplot]

plottools:-colorbar