如何为R中的多个hexbin打印定义调色板(规格化)
我想找到一种方法来设置用于hexbin绘图的调色板的特定范围,以规范化R中的多个绘图 到目前为止,我已经尝试:如何为R中的多个hexbin打印定义调色板(规格化),r,plot,colors,normalize,R,Plot,Colors,Normalize,我想找到一种方法来设置用于hexbin绘图的调色板的特定范围,以规范化R中的多个绘图 到目前为止,我已经尝试: library(hexbin) library(gplots) my.colors <- function (n) { (rich.colors(n)) } plot(hexbin(lastthousand$V4, lastthousand$V5, xbnds=c(0,35), ybnds=c(0,35),), xlab="Green Pucks", ylab="Re
library(hexbin)
library(gplots)
my.colors <- function (n)
{
(rich.colors(n))
}
plot(hexbin(lastthousand$V4, lastthousand$V5, xbnds=c(0,35), ybnds=c(0,35),), xlab="Green Pucks", ylab="Red Pucks",colramp = my.colors, colorcut = seq(0, 1, length = 25),lcex=0.66)
库(hexbin)
图书馆(gplots)
my.colors也许这会有用:
这适用于以下范围:
也许这会有用:
这适用于以下范围:
Facets实现了以下功能:
library(gplots)
library(ggplot2)
p <- ggplot(data=lastthousand, aes(lastthousand$V4,lastthousand$V5))+ geom_hex()
p + facet_grid(. ~ Market) + xlab("green pucks") + ylab("red pucks") + scale_colour_gradientn(colours=rainbow(7))
library(gplots)
library(ggplot2)
p <- ggplot(data=lastthousand, aes(lastthousand$V4,lastthousand$V5))+ geom_hex()
p + facet_grid(. ~ Market) + xlab("green pucks") + ylab("red pucks") + scale_colour_gradientn(colours=rainbow(7))
库(gplots)
图书馆(GG2)
pFacets起到了关键作用:
library(gplots)
library(ggplot2)
p <- ggplot(data=lastthousand, aes(lastthousand$V4,lastthousand$V5))+ geom_hex()
p + facet_grid(. ~ Market) + xlab("green pucks") + ylab("red pucks") + scale_colour_gradientn(colours=rainbow(7))
library(gplots)
library(ggplot2)
p <- ggplot(data=lastthousand, aes(lastthousand$V4,lastthousand$V5))+ geom_hex()
p + facet_grid(. ~ Market) + xlab("green pucks") + ylab("red pucks") + scale_colour_gradientn(colours=rainbow(7))
库(gplots)
图书馆(GG2)
P