如何以log10比例显示y轴在R中的直方图图形?

如何以log10比例显示y轴在R中的直方图图形?,r,graphics,visualization,R,Graphics,Visualization,我想在R中可视化直方图图形。问题是数据的分布呈高度指数分布,如下图所示将直方图保存为变量,然后将log10应用于仓位计数。将-Inf值设置为0,然后绘制新计数 # make histogram of the data h <- hist(data) # log10 the counts per histogram bin h$counts <- log10(h$counts) # set the -Inf values to 0 h$counts[!is.finite(h$cou

我想在R中可视化直方图图形。问题是数据的分布呈高度指数分布,如下图所示

将直方图保存为变量,然后将log10应用于仓位计数。将-Inf值设置为0,然后绘制新计数

# make histogram of the data
h <- hist(data)

# log10 the counts per histogram bin
h$counts <- log10(h$counts)

# set the -Inf values to 0
h$counts[!is.finite(h$counts)] <- 0

# plot the log10 counts
plot(h)
#制作数据的柱状图

好的,非常感谢!下次在添加问题之前,我会更加小心,以便更好地搜索。