Displaying 4 results from an estimated 4 matches for "ybnds".
2010 Jul 23
0
overriding axis limits in hexbin plot?
...help,
vignette ...)
It seems fairly hard (without some fairly serious hacking) to
hard-code the axis limits in a hexbin plot from the hexbin package.
Here's what I've figured out so far:
* when you do the hexagonal binning in the first place, you can
specify the x and y ranges (xbnds, ybnds). Fine ... but ...
* the plot method for 'hexbin' objects (which doesn't have 'xlim' or
'ylim' arguments) calls hexViewport as
hexViewport(x, offset = unit(legend, "inches"))
* in the absence of explicit 'xbnds'/'ybnds' arguments, hexV...
2010 Oct 19
1
could not find function "hmatplot"
...NH.vars$Age,c(1,45,65,200))
sex <- NH.vars$Sex
subs <- tapply(age,list(age,sex))
#bivariate bins for each factor combination
for (i in 1:length(unique(subs))) {
good <- subs==i
assign(paste("nam",i,sep=""),
erode.hexbin(hexbin(x[good],y[good],xbins=23,xbnds=rx,ybnds=ry)))
}
nam <- matrix(paste("nam",1:6,sep=""),ncol=3,byrow=TRUE)
rlabels <-c("Females","Males")
clabels <- c("Age <= 45","45 < Age <= 65","Age > 65")
zoom <- hmatplot(nam,rlabels,clabels,border=list(hbox...
2011 Dec 12
0
limit ranges in hexbin
...ic'))
x<-unlist(data[1])
y<-unlist(data[2])
hbin<-hexbin(x, y)
plot(hbin)
That does get me a hexgonal bin plot, so far, so good. My problem now is
twofold:
1) Some of my data points have really high values in x and y, and I would like
to exclude them. First idea was to set xbnds and ybnds parameters for hexbin
like this.
hbin<-hexbin(x, y, xbins = 50, xbnds = c(0, 5000))
However, hexbin does not like it: Error in hexbin(x, y, xbins = 50, xbnds =
c(0, 5000)) : 'xbnds' must encompass range(x). Is there some other way to
enforce limits in x and y? Otherwise, I could, of...
2012 Dec 16
3
xlim/ylim problem
Hi everybody,
just arrived at R and immediately I got a problem.
Here's my script:
setwd("C:/Users/Tom/Eigene Tools/Programming/R/Data")
blast_hits<-read.table("blastHit_covLenght.txt", header=T)
blast_hits <- as.matrix(blast_hits)
numerical1<-data.matrix(blast_hits, rownames.force = NA)