Skip to content

cbar_kwargs for faceting plots #1504

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rvalenzuelar opened this issue Aug 7, 2017 · 0 comments · Fixed by #2444
Closed

cbar_kwargs for faceting plots #1504

rvalenzuelar opened this issue Aug 7, 2017 · 0 comments · Fixed by #2444

Comments

@rvalenzuelar
Copy link

rvalenzuelar commented Aug 7, 2017

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?

@rvalenzuelar rvalenzuelar changed the title add_colorbar argument overwirt add_colorbar argument overwritten in facetgrid.py Aug 7, 2017
@rvalenzuelar rvalenzuelar changed the title add_colorbar argument overwritten in facetgrid.py cbar_kwargs for faceting plots Aug 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants