R geom_hexbin将bincount映射到alpha
我希望geom_hex bincount变为alpha,就像这样 不知怎的,这对我不起作用,会有什么问题?(ggplot2的开发版本?):R geom_hexbin将bincount映射到alpha,r,ggplot2,R,Ggplot2,我希望geom_hex bincount变为alpha,就像这样 不知怎的,这对我不起作用,会有什么问题?(ggplot2的开发版本?): 从那以后,软件包中发生了一些变化,改变了.count..和.density..使用hexbin的方式。@RichardTelford的链接指向一个已解决的github问题,即.density..,但.count..功能尚未恢复。但是,我们可以简单地使用.value.. ggplot(dm, aes(y = price, fill = variable, x
从那以后,软件包中发生了一些变化,改变了
.count..
和.density..
使用hexbin
的方式。@RichardTelford的链接指向一个已解决的github问题,即.density..
,但.count..
功能尚未恢复。但是,我们可以简单地使用.value..
ggplot(dm, aes(y = price, fill = variable, x = value)) +
facet_wrap(~variable, ncol = 1, scales = 'free_x') +
stat_binhex(aes(alpha = ..value..), colour = 'grey80') +
scale_alpha(name = 'Frequency', range = c(0,1)) +
theme_bw() +
scale_fill_manual('Variable', values = setNames(c('darkblue','yellow4'), c('depth','carat')))
我已将此作为一个问题报告
R version 3.2.3 (2015-12-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.1 LTS
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=nl_NL.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=nl_NL.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=nl_NL.UTF-8
[8] LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=nl_NL.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] hexbin_1.27.1 reshape2_1.4.1 ggplot2_2.1.0.9000
loaded via a namespace (and not attached):
[1] Rcpp_0.12.7 lattice_0.20-33 assertthat_0.1 grid_3.2.3 plyr_1.8.4 gtable_0.2.0 magrittr_1.5 scales_0.4.0 stringi_1.1.1 tools_3.2.3 stringr_1.1.0 munsell_0.4.3
[13] rsconnect_0.4.3 colorspace_1.2-6 tibble_1.2
ggplot(dm, aes(y = price, fill = variable, x = value)) +
facet_wrap(~variable, ncol = 1, scales = 'free_x') +
stat_binhex(aes(alpha = ..value..), colour = 'grey80') +
scale_alpha(name = 'Frequency', range = c(0,1)) +
theme_bw() +
scale_fill_manual('Variable', values = setNames(c('darkblue','yellow4'), c('depth','carat')))