0
$\begingroup$

I want to modify the default bar legend of GeoRegionValuePlot but I can't find any documentation on how it is defined. Is it possible to get the default legend from a combination of options like PlotLegends, ColorFunction, and ColorFunctionScaling? For example, how can I get the default legend but with a certain maximum value instead of an automatic maximum value that depends on the data?

$\endgroup$
5
  • $\begingroup$ "For example, how can I get the default legend but with a certain maximum value instead of an automatic maximum value that depends on the data?" For this, you can use PlotRange on the GeoRegionValuePlot. $\endgroup$
    – Carl Lange
    Commented Apr 5, 2020 at 18:50
  • $\begingroup$ I tried PlotRange. It doesn't set the maximum value on the bar legend. $\endgroup$ Commented Apr 5, 2020 at 20:25
  • $\begingroup$ Really? GeoRegionValuePlot[ EntityClass["Country", "SouthAmerica"] -> "DepositInterestRate", PlotRange -> {0, 5}] seems to work correctly? I'm probably misunderstanding you, sorry about that! $\endgroup$
    – Carl Lange
    Commented Apr 5, 2020 at 21:48
  • 1
    $\begingroup$ That doesn't always work. With PlotRange -> {0, 40} in your example, the maximum value on the bar legend is 30, not 40. I need more control than PlotRange seems to provide. $\endgroup$ Commented Apr 5, 2020 at 22:10
  • $\begingroup$ Aha, I see. The Documentation for GeoRegionValuePlot does give examples for changing the legend with PlotLegend, that may help! $\endgroup$
    – Carl Lange
    Commented Apr 6, 2020 at 10:45

1 Answer 1

3
$\begingroup$

ColorFunctionBinning[{min,max,d}] did it for me. https://reference.wolfram.com/language/ref/GeoRegionValuePlot.html

$\endgroup$
1
  • $\begingroup$ While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review $\endgroup$
    – bbgodfrey
    Commented Mar 4, 2022 at 5:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.