search for: xaxs

Displaying 20 results from an estimated 222 matches for "xaxs".

Did you mean: axs
2004 Mar 19
5
asp=1 and aspect ratio
...the plotting region is exactly square, and that the axis limits are identical. x <- 1:20 y <- x+rep(c(-1,1),10) lims <- range(c(x,y)) None of the following do this: plot(x,y) ; abline(0,1) #not square plot(x,y,asp=1);abline(0,1) #diagonal line misses corners plot(x,y,asp=1,xaxs="i",yaxs="i");abline(0,1) #diagonal line misses corners plot(x,y,xaxs="i",yaxs="i");abline(0,1) #not square and diag misses corners plot(x,y,xlim=lims,ylim=lims,xaxs="i",yaxs="i");abline(0,1) #not square plot(x,y,asp=1,xlim=lims,ylim=li...
2003 Sep 18
2
hist will not use parameter xaxs (PR#4219)
Full_Name: Mark Wall Version: 1.6.0 OS: linux Submission from: (NULL) (63.251.119.254) I want to plot a histogram of a *subset* of some data: >t = c(0:9) >hist(t,right=FALSE,breaks=10,xlim=c(0,5),xaxs="i") This means I should plot a histogram from 0 to 5 with breaks at 1,2,3,4. This should produce exactly 5 bars of frequency=1. Instead I get 5 and 1/4 bars. I do not want the 4% margins on the x axis that xaxs="r" provides.
2009 Sep 25
1
xaxs disactivated when asp=1 in plots (PR#13971)
...Version: 2.9.0 OS: windows xp Submission from: (NULL) (152.1.16.161) When I type this sequence: x11() Ylim<-c(0,14) Xlim<-c(0,14) plot(0,0,xlim=Xlim,ylim=Ylim,col="white",main="",xlab="",ylab="",bty="n",xaxt="n",yaxt="n",xaxs="i",yaxs="i",asp=1) abline(h=c(0,14),lwd=2,col="grey") abline(v=c(0,14),lwd=2,col="grey") par(new=TRUE) abline(h=seq(0,14,by=0.2),lty=3,col="grey") abline(h=seq(0,14,by=1),lty=1,col="grey") abline(v=seq(0,14,by=0.2),lty=3,col="grey&qu...
2012 Jan 08
2
need help with axis ticks
...can i reduce the distance between the ticks and their values (y axis values).the part of the code that i am using (after reading in the data) to create the top row is: par(mfrow=c(6,6), oma=c(4,4,3,1), mar=par()$mar*0.25, family="serif",font=1) plot(flow1500,scf1500, type="p", xaxs="i", yaxs="i", xaxt = 'n',xlim = c(0,300), ylim=c(0,0.6)) plot(flow1500,ph1500, type="p", xaxs="i", yaxs="i", xaxt = 'n',xlim = c(0,300), ylim=c(0,10)) plot(flow1500,toc1500, type="p", xaxs="i", yaxs="i"...
2009 Jan 05
1
adding a curve with xaxs="i"
...rve to touch the y axis like the curve touches the upper boundary. How can I eliminate the margin between axis and curve on the left side? x1 <- c(1,2,3,4,5) x2 <- c(2,4,6,8,10) mod <- lm (x2~x1) hm <- function (x) (mod$coe[1]+x*mod$coe[2]) plot.new() # ... box() curve (hm,lty=1,add=T,xaxs="i",yaxs="i") (R 2.8.1) -- Sensationsangebot verl?ngert: GMX FreeDSL - Telefonanschluss + DSL f?r nur 16,37 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K1308T4569a
2013 Apr 12
1
support for POSIXct classes in image.default axes
Hello, I would like to suggest the following change to image.default in src\library\graphics\R\image.R: 98c98 < plot(NA, NA, xlim = xlim, ylim = ylim, type = "n", xaxs = xaxs, --- > plot(x[1], y[1], xlim = xlim, ylim = ylim, type = "n", xaxs = xaxs, This provides all the support of axis.POSIXt that plot.default gives, currently the default new plot in image.default uses NAs and the axis class is ignored. This is nice for plotting time series d...
2009 Jun 17
1
problem with axis alignment when plotting 2 time series on same graph
...n environmental parameter, e.g. salinity. X2 is a second vector of dates and times, also of class POSIXt. X2 has a different length than X1, but they have the exact same range. Y2 is another environmental parameter, e.g. stream flow rate. My approach is basically like this: plot(X1,Y1) par(xaxs = "r") plot(X1, Y1) par(new=TRUE) plot(X2, Y2) the result is that the date tick marks for the second graph do not exactly align with the first graph. This is because the second time series is being slightly 'squeezed'; its timescale should match the first graph but for some re...
2008 Mar 09
1
Calling plot with a formula, from within a function, using ..., and xlim
...and one of those arguments being xlim (and only xlim shows this problem). Here is an example: > plotw <- function(obj,...) { + plot(k~j, data=obj,...) + } > plotw2 <- function(obj,...) { + plot(obj$j,obj$k, ...) + } > df <- data.frame(j=1:3,k=1:3) > plotw(df, las=1, xaxs="i") > plotw(df, xlim=c(0,4)) Error in eval(expr, envir, enclos) : ..1 used in an incorrect context, no ... to look in > plotw2(df, las=1, xaxs="i") > plotw2(df, xlim=c(0,4)) I was guessing this might be related to some sort of argument matching, but I don'...
2009 May 27
5
r-plot
Dear R-community I have a grueling problem which appears to be impossible to solve: I want to make a simple plot, here is my code: http://gist.github.com/118550 Unfortunately, the annotation of both the x- and y-axis are not correct, as you can see in the following picture: http://www.nabble.com/file/p23739356/plot.png I am not an expert of R, so maybe someone can point me to the solution of
1998 Jan 08
0
R-beta: Using par(tck=,xaxs=)
I found that par(tck=xx) was ignored and par(xaxs="s") gave an error in v0.61. I've made the following quick hacks in the code to get these to function. Please let me know if I'm setting myself up for trouble and... Thanks for R! ...Steve Oncley (oncley at ucar.edu) ------------------------------------------------------- A hac...
2004 Feb 19
3
suppressing non-integer labels for plot x-axis
...having difficulty making R plot only integer labels on the x-axis of a simple graph. I want to plot the median values of a score on each of three occasions. Non-integer occasions are impossible. But, R keeps labelling the x-axis with half-occasions, despite my attempts to stop this using the "xaxs" and "xaxp" parameters of 'plot'. p1=c(1,2,3); p2=c(5,15,25) plot(p1,p2,xlab='Occasion', ylab='Score', xlim=c(1,3), ylim=c(0,30), xaxp=c(1,3,3), xaxs='r') Could someone let me know how to suppress the non-integer labels? Thanks Jonathan Williams OP...
2003 Jan 16
1
graphics
...eed to plot the results of some simulations I did using QTL Cartographer. I am plotting LOD scores over three chromosomes. The three plot have to be one next to the other. The procedure I am using is: par(mfrow=c(1,3)) plot(x$x, x$y, ylim=c(0,35), type="l", col="blue", las=1, xaxs="i", yaxs="i", xlab="X Chromosome", ylab="LOD") abline(h=3.055) plot(ch2$x, ch2$y, ylim=c(0,35), type="l", col="blue", yaxt="n", xaxs="i", yaxs="i", xlab="Chromosome 2", ylab="") abline(h=...
2008 Mar 21
0
lattice: emulating the par(xaxs="i") behaviour
I tried to emulate the axis interval calculation behaviour of the traditional graphics system (with par(xaxs="i")) in lattice but couldn't find a flexible solution. Let's say a have a simple xyplot: x <- seq(0, 1, 0.01) xyplot(x^2 ~ x, type="l") I want to restrict the plotting region to the data range _and_ have axis labels over the full data range like this: xyplot(x^...
2010 Feb 19
1
color graph in multiple plots
...to distinguish my plots using colors but I got error message.  How do I correct that?     plot(ecdf(z), main ="CDF for observed and simulated weighted sum",type="l",lwd=2,col="blue", xlab="Weighted sum (mm)", ylab="Cumulative Percent", xlim=c(0,15), xaxs ='i', yaxs ='i',ylim=c(0,1)) par(new=TRUE) plot(gen[,1],gen[,2],type="l",lwd=2,ann=FALSE,axes=FALSE, col="red",xlim=c(0,15),ylim=c(0,1),xaxs ='i', yaxs ='i') legend(10,.2,c("obs","pre"),col=c("blue","red"),l...
2006 Aug 08
1
parameter yaxs / function hist (graphics)
Dear R users, The parameters xaxs and yaxs (function par, package graphics) seem not to work with the function hist (package graphics), even when the parameters xlim and ylim are defined. Is there any way to make yaxs="i" and xaxs="i" work properly with the function hist, mainly to produce histograms that &quot...
2011 Feb 16
3
image() with a vector
Hi, I have a vectors x and z, for example, x <- 0:20 z <- round(runif(20,1,7)) y <- 0.5 and I want to display z as an image. However if I then call image() with a vector image(x,y,t(z),zlim=c(1,7),col=heat.colors(7),xlab="Year",ylab="Action",yaxt="n",xaxs="r",yaxs="r") then I get the error Error in image.default(x, y, t(z), zlim = c(1, 7), col = heat.colors(7), : dimensions of z are not length(x)(-1) times length(y)(-1) However, transforming z into a matrix with two rows, where both rows are the same as z above does seem t...
2006 Mar 13
1
Newbie error or bug?
...l = sin(freqin1msec*2*pi*(time)) alias = -sin(aliasfreqin1msec*2*pi*(time)) undersamplinginterval = max(time)/8 seq (0, max(time), by=undersamplinginterval) -> undersamplingtimes undersampled = sin(freqin1msec*2*pi*undersamplingtimes) plot(time,signal,type="l", col="blue", xaxs="r", yaxs="r", xlab="Time (msec)", ylab="Signal", main="Aliasing", sub="Sampling 5KHz source (blue) at 8KHz (dots) gives 2.5KHz alias(red)") par(new=TRUE) plot (time, alias, xaxs="r", yaxs="r", type="l", lty=...
2016 Sep 09
2
Borrar carácteres extraños /xax
Buenos días, estoy realizando análisis de texto con Twitter y tengo un problema con unos carácteres que no logro quitar. Són cadenas de letras con forma similar a *xaexdfxdeaxoa*. Creo que surgen de la códificación de los emojis. Yo suelo utilizar, más o menos el siguiente codigo con gsub para limpiar texto, pero no me sirve # remove rt x = gsub("rt", "", x) # remove at x =
2010 Nov 22
1
plot start at origin
Hi r-users, I would like my axes to intersect at (0,0).  I tried  xaxs="i",yaxs="i" but it does not change anything.  I hope anybody can help me with this problem.  Here is my code. hist(datobs, prob=TRUE, main ="PDF of the sum of two stations",col="yellowgreen", cex.axis=1.2, xlab="Rainfall (mm)", ylab="Relat...
2010 Nov 25
1
overlap cdf plots and add colors and etc
Hi r-users, I would like to overlap 2 ecdf plots.  I tried this below and it gives me two plots of ecdf but just both just in black. par(mar=c(4,4,2,1.2),oma=c(0,0,0,0),xaxs="i", yaxs="i") plot(ecdf(datobs)) lines(ecdf(gam_sum_gen)) Then I try to add colors etc and also the legend but fail. par(mar=c(4,4,2,1.2),oma=c(0,0,0,0),xaxs="i", yaxs="i") plot(ecdf(datobs),main ="CDF of the sum for winter season-Hume",cex.axis...