r - 记录堆叠条形图的 y 轴并调整 y 轴标签以匹配
问题描述
当前代码输出不同地点的物种堆积条形图。我希望对 y 轴进行 log10 以提供更简洁的视图。并相应地调整 y 轴刻度标签,使其读取 log10 数字。
我已经尝试过scale_y_log10包括不同的休息和标签,但成功有限
species<-read.table('species.txt',header=TRUE)
library(ggplot2)
ggplot(species, aes(x = site, y = number, fill = species)) +
geom_bar(stat = "identity")+
theme(legend.position="none")+
labs(y="Number of Individuals",x="Sites")
解决方案
推荐阅读
- javascript - Javascript 语句在返回后执行
- c# - 将列表框选定项分配给 button_click
- sql - 使用时间戳差异将综合浏览量分组到会话中
- asp.net-mvc - 使用 MVC 单击 CheckBoxFor 时更改 DB 值
- batch-file - 运行批处理文件 - CPLEX Interactive Optimizer
- javascript - 如何在 TypeScript 中正确键入用作地图的 JavaScript 对象
- mongodb - 检查数组中是否存在字段
- c# - DelegatingHandler SendAsync 问题
- php - 全局临时表的 PHP Oracle 问题
- javascript - 糟糕的 ComponentDidMount 函数吞噬了我每天 95000 次调用 - ReactJS