Skip to content

Aspect Ratio & Orientation

Geospatial data comes in all shapes and sizes. geoplot-themes takes the headache out of bounding boxes and aspect ratios.

The orientation Parameter

You control the canvas size using the orientation parameter.

When you use "auto", the engine calculates the exact geographic bounding box of your data (the aspect ratio of the coordinates). It then dynamically sizes the final image to perfectly hug your data.

Result: Zero white padding around your map.

orientation="landscape"

Forces the final canvas to be a landscape rectangle (roughly 1.414 aspect ratio, similar to A4 paper). If your data is square or portrait, this will result in white padding on the sides.

orientation="portrait"

Forces the final canvas to be a tall rectangle. Best used if you intend to print on standard letter/A4 portrait pages.

Released under the MIT License.