If I try to use fractional weights in a bar chart, plotnine seems to be truncating the weights to integers. For example, If I do this: ``` import pandas as pd import plotnine as pn tmp = pd.DataFrame({‘x’: [0, 1], ‘weight’: [1.5, 0.9]}) pn.ggplot(tmp) + pn.geom_bar(pn.aes(x=‘x’, weight=‘weight’)) ``` I get  Whereas if I do something similar in R, like ``` > library(ggplot2) > ggplot() + geom_bar(aes(x=c(0,1), weight=c(1.5, 0.9))) ``` I get  Is there any way to make that match the R functionality? Or let me know if I'm doing something wrong. Thanks!
Activity
TyberiusPrime commentedon Feb 6, 2019
yes, yes it does: stat_count, compute_group:
That int cast seems to me to be the culprit - and unnecessary.
@has2k1 what do you think?
has2k1 commentedon Feb 7, 2019
@TyberiusPrime, yes that is the problem line. 832e29f is the commit that changed it.
Fix using float weights with stat_count
benlindsay commentedon Feb 13, 2019
@has2k1 Thanks for making this change!