# GeoScaleBar on a GeoRegionValuePlot

Bug introduced in 12.2.0 and persisting through 13.1

I have selected the following minimal example from the documentation. I am running v12.2.0 Win7-x64.

GeoRegionValuePlot[
EntityClass["Country", "SouthAmerica"] -> "MerchantShips"]


Question: How do I put a GeoScaleBar on this plot in the lower right corner?

• GeoRegionValuePlot[EntityClass["Country", "SouthAmerica"] -> "MerchantShips", PlotLegends -> Placed[Automatic, {.9, .2}]] Aug 30, 2022 at 13:07
• Thanks @BobHanlon . GeoGraphics[Polygon[EntityClass["Country", "SouthAmerica"]], GeoScaleBar -> {"Imperial", "Metric"}]. I cannot figure out how to combine this scale with the GeoRegionValuePlot.
– Syed
Aug 30, 2022 at 13:43

Using GeoScaleBar with GeoRegionValuePlot works with v12.0 or v12.1.1 but appears to have broken starting with v12.2 and continuing through v13.1

$Version (* "12.0.0 for Mac OS X x86 (64-bit) (April 7, 2019)" *) Clear["Global*"] grvp = GeoRegionValuePlot[ EntityClass["Country", "SouthAmerica"] -> "MerchantShips", GeoScaleBar -> Placed[{"Imperial", "Metric"}, {.55, .1}]]  $Version

(* "13.1.0 for Mac OS X x86 (64-bit) (June 16, 2022)" *)

Clear["Global*"]

grvp = GeoRegionValuePlot[
EntityClass["Country", "SouthAmerica"] -> "MerchantShips",
GeoScaleBar -> Placed[{"Imperial", "Metric"}, {.55, .1}]]


I am not sure why it doesn't work in the "obvious" way, i.e. by just adding the GeoScaleBar option to GeoRegionValuePlot, but it can be accomplished using Show after the fact:

Show[
GeoRegionValuePlot[EntityClass["Country", "SouthAmerica"] -> "MerchantShips"],
GeoScaleBar -> Placed[{"Imperial", "Metric"}, {Right, Bottom}]
]


I feel that the obvious solution should work though, and this should be reported to Wolfram support.

• On v12.2.0 Win 7-x64 (that I am using) the Show method results in a black filled polygon for the entire continent. Thanks for the answer.
– Syed
Aug 30, 2022 at 14:48
• @Syed That is odd! I am on v.12.3.1 on Win10-64 and the above works for me. I noticed that your GeoRegionValuePlot expression returns a Legended expression. Perhaps you could try to extract the GeoGraphics object from it (First@GeoRegionValuePlot[..]) and apply the Show to that, to see if it makes a difference? You could always tack on the legend afterwards. Not ideal, but maybe a workaround. Aug 30, 2022 at 16:13
• I don't have a Win version but try ReplacePart[grvp = GeoRegionValuePlot[EntityClass["Country", "SouthAmerica"] -> "MerchantShips"], 1 -> Show[grvp[[1]], GeoScaleBar -> Placed[{"Imperial", "Metric"}, {Right, Bottom}]]] Aug 30, 2022 at 16:29
• If I use PlotLegends->None in the two preceding scenarios above this comment then the country colors are restored, but the GeoScaleBar still does not appear.
– Syed
Aug 30, 2022 at 16:41