Skip to content

Chart Margin

You can specify the size of the chart's margins, in pixels. Margins are calculated inward from the specified chart size (chs); increasing the margin size does not increase the total chart size, but rather shrinks the chart area, if necessary. The chart margins include the axis labels.

Syntax

chma=<left_margin>,<right_margin>,<top_margin>,<bottom_margin>
  • <left_margin>, <right_margin>, <top_margin>, <bottom_margin> Minimum margin size around the chart area, in pixels. Increase this value to include some padding to prevent axis labels from bumping against the borders of the chart.

Example

In the example below we set a left_margin to 10px, a right_margin to 100px and a top_margin to 20px. Since we did not define bottom_margin, its value will be set to 0px.

chart

chma=10,100,20