Я пытаюсь заставить ось y считывать с шагом 2,5%, т. Е. 0, 2,5, 5 и т. Д. c., Но это ни делает, ни даже не достигает вершины гистограммы для Under 35.
![The y-axis for this bar chart does not reach the top of the plot.](https://i.stack.imgur.com/Bmc87.jpg)
#Compare the overall net engagment between the two age groups
ad.analysis.age <- engagement %>%
group_by(age) %>%
summarise(ppos = weighted.mean(Attentive.engagement, Impressions),
pneg = pmax(0, weighted.mean(responses - Attentive.engagement, Impressions)),
Impressions = sum(Impressions)) %>%
mutate(netp = ppos - pneg,
marginoferror = 1.96 * (
(ppos * (1 - ppos)) / Impressions + (pneg * (1 - pneg)) / Impressions))
#Plot the visualization
ggplot(ad.analysis.age, aes(x = age, y = netp, ymin = (netp - marginoferror),
ymax = (netp + marginoferror))) +
theme(axis.text.x = element_text(size = 10), axis.title.y = element_text(size = 10)) +
geom_bar(stat = "identity", width = 0.6, fill = "#0A2240") + gpa_theme(10) +
scale_y_continuous(labels = scales::percent_format()) +
labs(x = NULL, y = "Net Attentive Engagement", title =
"Ad Engagement by Age") +
theme(aspect.ratio = 2.5/3) +
theme(axis.title.y = element_text(margin = unit(c(0, 3, 0, 0), "mm")))