ggplot 'non-finite values' error ggplot 'non-finite values' error r r

ggplot 'non-finite values' error


In the example plot here that you're working from, there are very long tails at higher n / total, and thus the use of xlim(). Try making your plot without any change to the limits of the x-axis; you might not need to tweak that at all in your case.

ggplot(df, aes(n/total, fill = blogger)) +  geom_histogram(show.legend = FALSE) +  facet_wrap(~blogger, ncol = 2, scales = "free_y")