在条形图r中可见两个数据
新手到这里。尝试使用以下代码绘制此数据,但遇到问题,因为数据正相互重叠。理想情况下,我想在每个条上看到两个数据,但是目前,更大的价值在主导。有什么办法可以更改不透明棒或解决问题?
{ggplot(data_income_BA) +
geom_col(aes(x = Degree,
y = Male,),
fill = 'blue',
width = 0.7) +
geom_col(aes(x = Degree,
y = Female),
fill = 'red',
width = 0.7) +
theme_classic() +
ggtitle("Gender Divide",
subtitle = "BA ") +
labs(x = "Degrees",
y = "Male + Female")}
Newbie to R here. Trying to plot this data using the code below, but running into a problem in that the data is being overlapped by each other. Ideally, I would like to see both pieces of data on each bar, but currently, the greater value is dominating. Is there any way to change the opacity bars or solve the issue?
{ggplot(data_income_BA) +
geom_col(aes(x = Degree,
y = Male,),
fill = 'blue',
width = 0.7) +
geom_col(aes(x = Degree,
y = Female),
fill = 'red',
width = 0.7) +
theme_classic() +
ggtitle("Gender Divide",
subtitle = "BA ") +
labs(x = "Degrees",
y = "Male + Female")}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论