r Blog2015.10.18-Plot_by_Range.R
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了r Blog2015.10.18-Plot_by_Range.R相关的知识,希望对你有一定的参考价值。
# S Extra info -------------------------------------------------------------
# Extra Tip
Colors <- rainbow( 5 )
Breaks <- c(0, 1, 3, 5, 7, 10)
p <-
ggplot(a, aes(x = x, y =y)) +
annotation_custom(g, xmin= -0.5 , xmax= 1.25, ymin= -0.25, ymax= 1.25) +
stat_density2d(data= a,
aes(x= x, y=y , fill = factor( cut(..level.. , breaks = c(0, 1, 3, 5, 7, 10)) ) ), # Transform levels to factor and deffine the breaks...
size= 10, bins= 50, geom='polygon') +
geom_point(data= a, aes(x=x, y=y),
color="black", position=position_jitter(w=0.01,h=0.01), alpha=0.1) +
theme_bw() +
scale_fill_manual(values = Colors , breaks = Breaks, guide = F) + # We lost the guide
xlim(0, 1) +
ylim(0, 1)
print(p)
jpeg(filename = "Happy with density plot by ranges.jpeg", res = 100,
width = 18, height =10 ,units = "cm")
print(p)
dev.off()
# annotation_custom(g, xmin= -Inf , xmax=Inf, ymin=-Inf, ymax=Inf) # Así ocupa todo
# S Extra info -------------------------------------------------------------
以上是关于r Blog2015.10.18-Plot_by_Range.R的主要内容,如果未能解决你的问题,请参考以下文章
r-cnn学习:源码学习
ISP基础(05):图像去噪声
Intel(R)_Media_SDK官方文档翻译摘要
R语言怎么给中文分词?
计算机系统组成
锁_rac环境kill锁表会话后出现killed状态(解决)