VI() descriptions for geom_histogram() give really inaccurate numbers of bars
boringNectarine0 opened this issue · 11 comments
VI() for geom_histogram has really weird ideas about numbers of bars. I expect that when sorting by categories it is including any missing category from each bar as a completely missing bar.
eg.
geom_histogram(aes(x, fill=catsOneToSeven), bins=5)
VI() will say that there are 35 vertical bars if there are 7 cats, regardless of whether the colours are included in the bar, and the fact that the default has them stacked and will not leave gaps for missing fill cats.
l<-ggplot(iris) +
geom_histogram(aes(y=Sepal.Width, fill=Species),bins = 5)
l
VI(l)
In the VI() description it says "The chart is a bar chart containing 15 vertical bars."
If there was a bar chart with space for 10 bars, but 2 gaps (or 2 bars of 0 height) would we ideally have that said to be 8 bars?
Is bar height of 0 something worth having in VI() descriptions? By the way, would you have time to reply to my emails? Thanks.
Another example here is saying that graph is 8 bars
data <- data.frame(
quarter=c("Q1", "Q1", "Q2", "Q2", "Q3", "Q3", "Q4", "Q4"),
product=c("A", "B", "A", "B", "A", "B", "A", "B"),
profit=c(10, 11, 12, 11, 13, 15, 16, 18)
)
VI(ggplot(data, aes(x = quarter, y = profit)) +
geom_bar(stat = "identity")
)
because there is a small number of bars the points are described so it does make some sense but as there is no sorting by product A/B this is rather odd.