Skip to content

cbar_kwargs for faceting plots #1504

@rvalenzuelar

Description

@rvalenzuelar

I'm using faceting and the add_colorbar=True argument along with cbar_kwargs. This triggers the following error message:

ValueError: cbar_ax and cbar_kwargs can't be used with add_colorbar=False.

I searched the facetgrid.py module and found the following lines:

func_kwargs = kwargs.copy()
func_kwargs.update(cmap_params)
func_kwargs.update({'add_colorbar': False, 'add_labels': False})

I realized that if add_colorbar is True, then the facet function draws one colorbar for each subplot. My initial intention was providing cbar_kwargs to reduce the whitespace between the colorbar en the right edge of the plot.

Is there any way to fix this?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions