Topic: Graphing and plotting
Online Help
Plot options (Pro only)
This feature is available only in Calcpad VM Pro 8.
Plot options are special variables, whose names start with "Plot.". You assign values to them, as to any other variables, before the plotting command, for example:
Plot.Width = 600Plot.Title = "Bending moments"Plot.Series1.Color = Color.SteelBlue
An option remains in effect for all plots that follow, until it is changed. If you assign the special value Auto to an option, it will be restored to its default. You can reset all options at once by calling Plot.Reset(). Text options, like titles and labels, are specified as strings in double quotes. Switches are turned on with 1 and off with 0. Any nonzero value is equivalent to 1. You can also read the values of options in expressions, e.g. w = Plot.Width. The available options are listed below:
General
| Option | Description |
|---|---|
Plot.Width |
width of the plot area in pixels (500 by default); |
Plot.Height |
height of the plot area in pixels (300 by default); |
Plot.Title |
title of the plot, displayed above the plot area; |
Plot.Legend |
shows a legend with the names of the series = 1 | 0; |
Plot.LabelX |
label of the x axis, displayed below the plot; |
Plot.LabelY |
label of the y axis, displayed to the left of the plot. |
Axes
| Option | Description |
|---|---|
Plot.LogX, Plot.LogY |
logarithmic scale along the x or the y axis = 1 | 0; |
Plot.ReverseX, Plot.ReverseY |
reverses the direction of the horizontal or the vertical axis = 1 | 0; |
Plot.ReverseZ |
reverses the direction of the values (z) in $Map: the colors and the shading = 1 | 0; |
Plot.FlipAxes |
swaps the places of the axes: x becomes vertical and y horizontal = 1 | 0. All X and Y options still refer to the horizontal and the vertical axis, respectively; |
Plot.Limits |
all limits at once = [MinX; MinY; MaxX; MaxY] or [MinX; MinY; MinZ; MaxX; MaxY; MaxZ]. Each lower limit must be smaller than the upper one; |
Plot.MinX, Plot.MaxX |
lower and upper limit along the horizontal axis; |
Plot.MinY, Plot.MaxY |
lower and upper limit along the vertical axis; |
Plot.MinZ, Plot.MaxZ |
lower and upper limit of the values in $Map. The values outside this range are left empty; |
Plot.Step |
both steps at once = [StepX; StepY] or a single value for both; |
Plot.StepX, Plot.StepY |
step between the numbers along the horizontal or the vertical axis; |
Plot.Grid |
both grid spacings at once = [GridX; GridY] or a single value for both; |
Plot.GridX, Plot.GridY |
spacing between the grid lines along the horizontal or the vertical axis; |
Plot.FormatXAxis, Plot.FormatYAxis |
format of the numbers along the horizontal or the vertical axis and in the corner labels, as a string with the same rules as for the results (see "Formatting"), e.g. Plot.FormatXAxis = "F2". Plot.FormatYAxis also applies to the value scale of $Radar. A number system base is shown as a subscript, e.g. for "0.##_2". Values that are not integers ignore the D formats. Auto or "" restores the default format. |
The default value of all limits, steps and grid spacings is Auto, which means that they are calculated automatically from the data.
Rendering
| Option | Description |
|---|---|
Plot.Svg |
draws the plots as vector graphics (SVG) = 1, or raster images (PNG) = 0; |
Plot.Adaptive |
adaptive 1D function plots = 1 | 0 (the "Adaptive" checkbox by default). |
Series
The properties of the first ten series of a plot are specified by the options Plot.Series1 … Plot.Series10, followed by the property name:
| Option | Description |
|---|---|
Plot.Series1.Name |
name of the series, displayed in the legend; |
Plot.Series1.Color |
line color: a named color, e.g. Color.Tomato, or a hex color code in double quotes: "#RRGGBB", "#RGB" or "#AARRGGBB"; |
Plot.Series1.Style |
line style: Style.Solid, Style.Dash, Style.LongDash, Style.Dot, Style.DashDot or Style.DashDotDot; |
Plot.Series1.Thickness |
line thickness, relative to the default one. |
The default colors of the series are: Tomato, YellowGreen, CornflowerBlue, #f0d000, MediumVioletRed, MediumSpringGreen, BlueViolet, LightSalmon, DeepPink and DarkTurquoise. All lines are solid by default.
Surface maps
| Option | Description |
|---|---|
Plot.Palette |
color palette for $Map. You can specify it by name or by number: 0 - Palette.NoneNone1 - Palette.GrayGray2 - Palette.RainbowRainbow3 - Palette.TerrainTerrain4 - Palette.VioletToYellowViolet-yellow5 - Palette.GreenToYellowGreen-yellow6 - Palette.BluesBlues7 - Palette.BlueToYellowBlue-yellow8 - Palette.BlueToRedBlue-red9 - Palette.PurpleToYellowPurple-yellow |
Plot.Shadows |
draws surface maps with light and shadows = 1 | 0; |
Plot.Smooth |
smooth transition of colors = 1, or isobands = 0; |
Plot.LightDirection |
direction to the light source: Direction.North, Direction.NorthEast, Direction.East, Direction.SouthEast, Direction.South, Direction.SouthWest, Direction.West or Direction.NorthWest; |
Plot.MapStep |
grid step in pixels for the interpolation of surface maps, from 1 to 100 (10 by default). |
The default values of the surface map options are taken from the respective controls on the bottom of the program window.
Data charts
| Option | Description |
|---|---|
Plot.Stack |
stacks the series on top of each other for $Line, $Fill, $Smooth, $Bar and $Column = 1 | 0; |
Plot.Dots |
shows dots at the data points = 1 | 0; |
Plot.DataTags |
shows the values next to the data points = 1 | 0; |
Plot.DropLines |
draws vertical lines from the data points to the horizontal axis = 1 | 0. |