Marker types

The code below is the source for this graph.

<?php
// Marker types
require_once 'SVGGraph/autoloader.php';

$markers = "circle square triangle cross x pentagon diamond hexagon octagon " .
  "asterisk star threestar fourstar eightstar";

$settings = [
  'auto_fit' => true,
  'show_legend' => true,
  'show_axes' => false,
  'show_tooltips' => false,
  'back_stroke_width' => 0,
  'legend_draggable' => false,
  'legend_position' => 'inner top left 10 10',
  'legend_entry_height' => 21,
  'legend_round' => 5,
  'axis_max_h' => 5,
  'marker_size' => 10,
  'grid_back_colour' => '#f9f9f9',
  'pad_left' => 5,
  'pad_top' => 5,
  'pad_right' => 5,
  'pad_bottom' => 5,
];
$settings['marker_type'] = explode(' ', $markers);
$c = count($settings['marker_type']) + 1;
$settings['axis_max_v'] = $c;

$values = [];
$num = 1;
foreach($settings['marker_type'] as $type) {
  $pos = $c - $num++;
  $values[] = [1 => $pos, $pos, $pos, $pos];
  $settings['legend_entries'][] = $type;
}

$graph = new Goat1000\SVGGraph\SVGGraph(670, 400, $settings);
$graph->colours(['#e11','#1b1','#11e','#e71','#333']);
$graph->values($values);

$graph->render('MultiScatterGraph');

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.