You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using bins argument, the bins seem to be calculated on the entire data, but not on the groups as defined per aes. I am not sure that this is what one expects when using this argument.
The below example shows this on the iris dataset, with bins = 5. - not showing 5 bins for each group. But I guess it calculates 5 bins for the absolute density values for the whole data. I am not sure if this is very helpful, because one does not get a real idea which bin is shown and also it is difficult to compare the groups.
I believe it would make more sense if bins would be calculated by group, because I guess one wants to compare probability distributions rather than absolute densities (?). The second plot shows what I believe one would rather expect when using bins. The function to calculate is (modified function from this SO answer)
This is kind of a follow up from issue #4003
When using bins argument, the bins seem to be calculated on the entire data, but not on the groups as defined per aes. I am not sure that this is what one expects when using this argument.
The below example shows this on the iris dataset, with bins = 5. - not showing 5 bins for each group. But I guess it calculates 5 bins for the absolute density values for the whole data. I am not sure if this is very helpful, because one does not get a real idea which bin is shown and also it is difficult to compare the groups.
I believe it would make more sense if bins would be calculated by group, because I guess one wants to compare probability distributions rather than absolute densities (?). The second plot shows what I believe one would rather expect when using
bins
. The function to calculate is (modified function from this SO answer)The following is more what one would expect (at least I would do so). For the generation of
man_calc_dens
data frame, see below.functions and manually calculated density
Session info
The text was updated successfully, but these errors were encountered: