search for: xlim

Displaying 20 results from an estimated 1995 matches for "xlim".

2012 Apr 16
3
I wish xlim=c(0, NA) would work. How about I send you a patch?
I'm looking for an R mentor. I want to propose a change in management of plot options xlim and ylim. Did you ever want to change one coordinate in xlim or ylim? It happens to me all the time. x <- rnorm(100, m=5, s=1) y <- rnorm(100, m=6, s=1) plot(x,y) ## Oh, I want the "y axis" to show above x=0. plot(x,y, xlim=c(0, )) ##Output: Error in c(0, ) : argument 2 is empt...
2007 Jun 26
4
boxplot and bxp do not respect xlim by default (PR#9754)
Full_Name: Steve Ellison Version: 2.4.1 OS: Windows, Linux Submission from: (NULL) (194.73.101.157) bxp() allows specifcation of box locations with at=, but neither adjusts xlim= to fit at nor does it respect xlim provided explicitly. This is because bxp() now includes explicit xlim as c(0.5, n+0.5), without checking for explicitly supplied xlim (or ylim if horizontal). This also prevents simple added plots (eg if add=T, with at=(1:n)+0.5, the last box is partly off the...
2008 Apr 29
2
help text for xlim
Dear R-developers, A student asked me today of how to specify the limits of the x-axis. I knew that he should use xlim, but I tried to encourage him to have a try himself with the various help functions. I do not judge if he used the correct search strategy or right key words, but anyway here is what he tried: he looked at ?plot. There xlim is not mentioned. He checked ?par. There you find xlim mentioned under...
2000 Aug 21
4
symbols: xlim and ylim cannot be specified (PR#639)
symbols(iris[,1],iris[,2],rectangles=as.matrix(iris[,3:4]),inches=0.3, ylim=c(1,5)) Error in plot.default(NA, NA, type = "n", ylim = ylim, xlim = xlim, xlab = xlab, : formal argument "ylim" matched by multiple actual arguments Since plot is called inside symbols, with specified xlim and ylim, any specification through ,... hurts this call. I am pretty sure that you won't like to hear the suggestion that this error mess...
2008 Jul 24
1
plot.dendrogram xlim/ylim
list(...), I would like to zoom in to the leaves of large trees in a dendrogram plot. The playwith package allows zooming by passing xlim and ylim arguments to the plot call (Hmisc does this too I think). But currently stats:::plot.dendrogram does not accept xlim or ylim. So I would like to enable that. In place of the existing code chunk: xlim <- c(x1 - 1/2, x2 + 1/2) ylim <- c(0, yTop) if (horiz) { xl &lt...
2008 May 22
1
plot 7 * 3 matrix on DIN A4 pdf
...x<-c(rnorm(mean(100,mean=50,sd=10)),rnorm(mean(100,mean=50,sd=10))) par(mfcol=c(7,3)) par(pch=19) par(pty="m") #"s" makes a square plot par(cex=.1) par(cex.axis=7) par(omi=c(1,1,1,1)) axistick<-c(0,10,20,30,40,50,60,70,80,90,100) par(mar=c(3, 5, 0, 0) + 0.1) plot(x,xlim=c(0,50),ylim=c(0,100),axes = FALSE) axis(2,ylab='',at=axistick) box(lty=1) plot(x,xlim=c(0,50), ylim=c(0,100),axes = FALSE) axis(2) box(lty=1) plot(x, xlim=c(0,50),ylim=c(0,100),axes = FALSE) axis(2) box(lty=1) plot(x,xlim=c(0,50), ylim=c(0,100),axes = FALSE) axis(2) box(lty=1) plot(x,xlim=...
2011 Nov 17
1
Small inconsistency with boxplot
...AQ --- and this is not a major problem. Don't hesitate to tell me if I'm wrong. If you try to do a boxplot on a matrix and set the "at" argument to some vector different from 1:n, n is the number of columns of your matrix, then some boxplots will be hidden since the default "xlim" value will be set to c(0.5, n + 0.5) during the call of the bxp function. Currently you can easily bypass this problem by setting "xlim" appropriately when calling the boxplot function. I think it will be better if all boxplots were always shown unless the "xlim" argumen...
2011 Oct 24
1
Adding points to a wireframe: 'x and units must have length >0' error
...idd$x) -> gridd$z data.frame(x = runif(10, -4, 0), y = runif(10, 0, 40))-> pts1 pts1$z <- pts1$x*pts1$y # plot wireframe(z ~ y*x, gridd, drape = TRUE, colorkey= TRUE, scales = list(arrows = FALSE), pts = pts1, panel.3d.wireframe = function(x, y, z,xlim, ylim, zlim, xlim.scaled, ylim.scaled, zlim.scaled, pts1, ...) { panel.3dwire(x = x, y = y, z = z, xlim = c(-4, 0), ylim = c(0, 40), zlim = c(-160, 0), xlim...
2008 Apr 14
2
Bug in ci.plot(HH Package) (PR#11163)
....plot. >> predict(....., conf.level=conf.level) I think the correct is "level=conf.level". Is that right? --- ci.plot source code --- "ci.plot" <- function(lm.object, ...) UseMethod("ci.plot") "ci.plot.lm" <- function(lm.object, xlim=range(data[, x.name]), newdata, conf.level=.95, data=model.frame(lm.object), newfit, ylim=range(newfit$pi.fit), pch=16, main.cex=1, main=list(paste(100*conf.level, "% confidence and prediction intervals for &quo...
2008 Apr 30
2
wireframe - add data points
...y <- punten[,2:2] z <- punten[,3:3] pts <- data.frame(x=x,y=y,z=z) ##end import original data## wireframe(status~totalfrost*logtps,abc,scales=list(arrows=TRUE),drape=TRUE, screen =list (x=15, y=-50, z=-105), pts = pts, panel.3d.wireframe = function(x, y, z, xlim, ylim, zlim, xlim.scaled, ylim.scaled, zlim.scaled, pts, ...) { panel.3dwire(x = x, y = y, z = z, xlim = xlim, ylim = ylim, zlim = zlim,...
2005 Dec 22
6
Plot problems: xlim
Hi, Still fresh in R, tried to figure this out, now on my second day running with no luck (and a pile of hair on my desk) so I have thrown in the towel and would like to ask for some help. Here is what I am trying to do. I am trying to plot a distribution, I have 99 points, bound in the range xlim.min: -0.0173 xlim.max: 0.02103 However, I have a value outside this range (0.2454959) which I would like to add to the plot as a line and to do this I use abline(v=0.2454959) This is what I write >xlim = c(-0.02, 0.3) >denz <- density(morp) >plot.density(denz, xlim = xlim, ylim =...
2009 Jul 21
4
How to extract the upper xlim and ylim of my plot?
Dear R-helpers, I wish to place some text in a plot, at approx 10% of my upper xlim and approx 90% of my upper ylim, i.e. > plot(log(all$SR,10)~log(all$AREA,10)) > text(.1*max(xlim),.9*max(ylim),"text to be placed") (I know how to give absolute coordinates for text location, but I wish to use relative coordinates). My code (above) doesn't work because I don&...
2002 Mar 19
3
plot with the axes at xlim and ylim
I'd like to make a plot with the axes drawn at the values of xlim and ylim. The default plot draws the axes slightly outside these values. I have been experimenting with the par(mgp) setting, but specifying par(mgp=c(2,0,-1)) gives me "invalid value specified for graphics parameter "mgp".". A more complicated mathod that almost seems to wor...
2008 Jun 25
1
Incompatible methods ("+.Date", "Ops.difftime") for "+"
...hese methods are seen as incompatible? Is there some dangerous consequence of my as.numeric() workaround? Can a fix to the code base, perhaps similar to my workaround, make this warning no longer necessary? I am using R 2.7.0 on Windows. version.string R version 2.7.0 (2008-04-22) Thanks Rich xlim <- as.Date(c("2005-04-09", "2007-09-07")) dx <- diff(xlim) xlim + c(-.02, .02)*dx ## correct answer and warning message xlim + as.numeric(c(-.02, .02)*dx) ## correct answer > xlim <- as.Date(c("2005-04-09", "2007-09-07")) > xlim...
2010 May 26
2
xlim/ylim and actual axis length
Dear plotting wizards, when plotting in R, the actual lengths of the axes are slightly greater than the ranges of the x/y variables or xlim/ylim values. how do I control the amount by which the axes are enlarged? Is there a way to enforce that the lengths of the axes equal xlim/ylim? example: plot(0:100,0:100,pch="+") it can be observed, that the x- and y-axis join at approx. (-4,-4) and (104,104). If I want the axes to j...
2009 May 26
1
stricter use of xlim in plot.stepfun
Dear R developer, I am not quite sure, if I should post my concern as a wish to r-bugs at r-project.org. Thus, as recommended, I first send an email to you. My request is the following: I would appreciate, if it was possible to obtain a plot of a 'stepfun' with a strict interpretation of xlim. What I mean: sf <- stepfun(1:4, 1:5) plot(sf, xlim=c(0,10)) does not bound the function to the horizontal area from 0 to 10, but continues drawing outside this interval. Another situation: I want to add a stepfun to an existing plot: plot(c(0, 50), c(0, 10), type = "n") lines(sf, x...
2009 Dec 28
2
refering to the 'boundaries' of a graph
Please see this code for a demonstration of my problem... xlim <- c(-1,5) plot(1:4, xlim=xlim) abline(v=xlim[1]) abline(v=xlim[2]) When I refer to xlim, it is not referring to the boundaries of the graphical region, it refers to the maximum and minimum xticks. My question is how can I refer to the x axis boundaries (and similarly y axis) of the graph? --...
2009 Oct 07
2
Second y-axis --- alternative to par(new=
Hi is there an alternative to par(new), for ading data to a plot for a different y-axis? My problem with par(new=TRUE) is, that it re-defines all axis and labels (as in example 1) and one has to use xlim=... to fix the x-axis. I am looking for something, which simply resets the y-axis, so that a new plot() (or points()/lines()) keeps the x-axis, but re-defines the y-axis. Is there something available? I could re-scale the y-data to fit the existing y-axis, but that would mean to define all the lab...
2009 Apr 22
1
reversing xlim, ylim in smoothScatter
Hello, I have found that in smoothScatter it is not possible to reverse the axes plotted (R version 2.9.0) .   It appears that this arises from the hard coding of xlim and ylim in smoothscatter.R in the lines : x <- x[ xlim[1] <= x[,1] & x[,1] <=xlim[2], ]   (line  number 25) and x <- x[ ylim[1] <= x[,2] & x[,2] <= ylim[2], ]  (line number 31) This results in a x being NA if ylim[1] > ylim[2] which results in an error on executin...
2008 Oct 06
3
horizontal boxplot + xlim
Hi there, I get a strange behaviour of a boxplot with the following code. There seems to be a problem with the xlim-parameter. Did I do anything wrong? What else can I do to force the boxplot to have a defined x-range? x <- rnorm(100) boxplot(x, notch=TRUE, xlab=parameter, xlim <- c(-4,4), horizontal = TRUE) Antje