Skip to content

Legend colorbar position and resizing #1605

Open

Description

@postdatacrc

I'm having trouble visualizing the colorbar that is located in the upper right corner, when a choropleth is used. I would like to know
if there is a way to specify both the location and the size of both the bar and the font.

What I'm searching is a feature that can be added to the folium.Choropleth() attribute such as
legend_position=[0.8 ,0.9]
legend_fontsize=14
legend_width=10

Activity

  1. added
    enhancement
    on Nov 17, 2022
  2. Conengmo commented on Nov 17, 2022

    @Conengmo
    Member

    Width is now available:

    Choropleth()
    choropleth.color_scale.width =1000
    

    Position and fontsize are not. PRs are welcome, look at the ColorMap class in our branca repo, then color_scale.js.

  3. Conengmo commented on Mar 12, 2023

    @Conengmo
    Member

    Other duplicate issues also requested being able to specify a position like 'topleft'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions