Can't change colour of crosstab
cwthom opened this issue · 1 comments
Hi there,
I recently used synthgauge as part of a gov hackathon, and thought it was fantastic - really useful package! Came across one small bug, where I couldn't change the colour of a crosstab plot, because the colorbar didn't reflect the update. I was passing in eg. cmap='Blues'
to the plot_crosstab
method, and as per the docs it passed through to sns.heatmap
, but not to the colorbar alongside the plot. I think the key lines are these, where the fig.colorbar
call can't be modified:
synthgauge/src/synthgauge/plot.py
Lines 445 to 455 in 28badf1
Simplest solution would probably be to just have cmap
exposed as an argument with a default setting, but I guess you could also check if cmap
is passed as part of kwargs
and add it into the fig.colorbar
call if so?
Thanks again for the great package!
@cwthom - Many thanks for flagging this, and for the kind words about the package. We'll take a look.