In ggsn v0.5.0, the scalebar() function does not warn the user if the dist argument is too large for the map. This results in part of the scalebar being cut off (if dist goes off the edge of the plot area on only one edge) or the entire bar just going missing if dist is large enough that both sides go outside the plot area:
In
ggsn v0.5.0
, thescalebar()
function does not warn the user if thedist
argument is too large for the map. This results in part of the scalebar being cut off (ifdist
goes off the edge of the plot area on only one edge) or the entire bar just going missing ifdist
is large enough that both sides go outside the plot area:This is the extent of this map, about 44 km wide.
The right half of the scale bar cannot fit in the plot area.
The left half cannot fit.
This is what happens when neither half of the scale bar can fit.
And the above too-large example looks very much like this too-small example.