Map Axes

Overview

Drawing Parallels and Meridians Axes, Labels and Ticks is controlled using Map Axes object described in this Article, Grid controls Parallels and Meridians grid and Geo Scale to control axes and grid parameters.

Axes are objects used to control how bounding lines, labels and tickmarks look. Placement of tickmarks is controlled by Geo Scale.

Configuring axes is done using axes() object represented by an instance of axes.MapSettings class.

Lines

To configure all lines at once use stroke():

map.axes().stroke("Black", 2, "5 5");

To override common settings and enable/disable or format lines on selected sides:

map.axes().right().stroke("Black 2");
map.axes().top().stroke("Black", 2, "5 5");

Playground

Labels

To configure all labels at once use:

map.axes().labels();
map.axes().minorLabels();

To override common settings and enable/disable or format labels on selected sides:

map.axes().right().labels(false);
map.axes().top().minorLabels(true);

Playground

Ticks

To configure all ticks at once use:

map.axes().ticks();
map.axes().minorTicks();

To override common settings and enable/disable or format labels on selected sides:

map.axes(true);
map.axes().ticks().stroke("Red");        
map.axes().top().ticks(false;
map.axes().top().minorTicks(false);

Playground

Titles

All axes can have titles, you can configure them individually:

map.axes().right().title(false);
map.axes().left().title("Latitude");
map.axes().left().title().fontSize(14);

Playground