-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
Faceting example fails with levels
flatui = ["#9b59b6", "#3498db", "#95a5a6", "#e74c3c", "#34495e", "#2ecc71"]
g_simple = t.plot(x='lon', y='lat', col='time', col_wrap=3,
levels=[0, 12, 18, 30], colors=flatui)The generated error is
ValueError: Can't specify both cmap and colors.
I tracked this down inside newplotfunc to the line
return _easy_facetgrid(**allargs)which calls FacetGrid.map_dataarray
This function does not check if levels is assigned. And hence automatically adds a cmap on the second panel of the plot
cmap_args = inspect.getargspec(_determine_cmap_params).args
cmap_kwargs.update((a, kwargs[a]) for a in cmap_args if a in kwargs)
cmap_params = _determine_cmap_params(**cmap_kwargs)the check fails after that.
kuchaalezlatko-minev