Circles and spots

The code below is the source for this graph.

<?php
// Circles and spots
require_once 'SVGGraph/autoloader.php';

$settings = [
  'auto_fit' => true,
  'pad_bottom' => 1,
  'back_stroke_width' => 0,
  'grid_colour' => '#ccc',
  'axis_font_h' => 'Arial',
  'axis_font_size_h' => 13,
  'show_tooltips' => false,
  'grid_division_v' => 5,
  'figure' => [
    ['round',
    [ 'circle', 'cx' => 4, 'cy' => 4, 'r' => 3, 'stroke' => 'blue' ],
    [ 'circle', 'cx' => 6, 'cy' => 6, 'r' => 3, 'stroke' => 'blue' ],
    [ 'circle', 'cx' => 5, 'cy' => 5, 'r' => 5, 'stroke' => 'red' ],
    ],
  ],
];
$width = 670;
$height = 100;

$values = [
  'circle' => 10,
  'circle2' => 8,
  'circle3' => 10,
  'spot' => 8,
  'spot2' => 10,
  'spot3' => 8,
  'polkadot' => 10,
  'polkadot2' => 8,
  'polkadot3' => 10,
];

$colours = [
  ['red','pattern' => 'circle'],
  ['red','pattern' => 'circle2'],
  ['red','pattern' => 'circle3'],
  ['green','pattern' => 'spot'],
  ['green','pattern' => 'spot2'],
  ['green','pattern' => 'spot3'],
  ['blue','pattern' => 'polkadot'],
  ['blue','pattern' => 'polkadot2'],
  ['blue','pattern' => 'polkadot3'],
];

$graph = new Goat1000\SVGGraph\SVGGraph($width, $height, $settings);
$graph->colours($colours);
$graph->values($values);
$graph->render('BarGraph');

Please note: the source code above comes from a script used to generate one of the example graphs on the site. This is simply a wrapper page to apply highlighting and make the source code easier to read, so there is no content here to describe what the source code is doing.