similar to: lattice: emulating the par(xaxs="i") behaviour

Displaying 20 results from an estimated 20000 matches similar to: "lattice: emulating the par(xaxs="i") behaviour"

2008 Jan 23
1
adjusting y axis labels in lattice plots?
Are there parameters that would allow adjusting y axis labels in lattice plots? E.g in the following simple example require(lattice) xyplot(rnorm(10) ~ 1:10, scales=list(alternating=2)) it would be nice to have the y axis labels adjusted to the right or at the decimal point instead of left adjustment. Thomas Zumbrunn -- Thomas Zumbrunn Institute of Zoology, University of Basel Vesalgasse
2009 Jun 02
1
lattice: horizontal alignment of labels in key
Dear R users I have problems horizontally aligning labels in keys of lattice plots when the labels make use of plotmath. Here's a self-contained example: dat <- data.frame(x = rnorm(10), y = rnorm(10), z = factor(rep(c("a", "b"), each = 5))) xyplot(y ~ x, dat, groups = z, auto.key = list(columns = 2, text =
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 hack to get par(tck) to work:
2008 Feb 05
1
Inconsistent lattice scales$x$at,label behaviour for POSIXct
I have encountered the following behaviour in lattice in 2.6.1 (and 2.4.0) which differs depending upon the type you use. I believe the numeric behaviour to be correct, and the POSIXct behaviour to be in error. When the x data and x axis in a lattice graph are POSIXct, and when using scales$x$at and scales$x$labels to add custom labels: If the first visible at value is not the first
2009 Sep 25
1
xaxs disactivated when asp=1 in plots (PR#13971)
Full_Name: Fran?ois Birgand 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)
2007 Dec 19
1
lattice: axes drawn when relation='free' or relation='sliced' but not when relation='same'
I'm using lattice to draw a multi-panel figure: 5 rows, 4 columns. The y-axis for each panel is determined by yaxs <- list(draw=T , labels=c(0, '.5', '1', '1.5') , at=c(0, .5, 1, 1.5) , tck=c(.4, 0) , cex=.7 , alternating=2
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
2008 Dec 11
2
call lattice function in a function passing "groups" argument
I'm trying to use a lattice function within a function and have problems passing the "groups" argument properly. Let's say I have a data frame d <- data.frame(x = rnorm(100), y = c("a", "b")) and want to plot variable x in a densityplot, grouped by the variable y, then I would do something like densityplot(~ x, d, groups = y) If however I wanted to
2003 Jun 05
1
Error when creating layouts with partly filled pages within lattice
Dear all, Please take my apologies if that has already been asked - at least I couldn't find it in the archives. When trying to specify a layout within library lattice, i.e. using xyplot, I get an error when the prepanel function tries to subscript the automatically generated x.limits. This seems to appear if the last page wouldn't be filled completely, i.e. there would be space left
2009 May 06
1
Add trend line to XYPlot using a subset of the original data
I've created an xyplot that I want to add a trend line to using a subset of the data. The xyplot is xyplot(X9444500~WY,data=mynewdata,xlim=c(1900,2020),ylab="TEST", xlab="",ylim=c(100,100000),scales=list(x=list(at=c(1900,1920,1940,1960,1980,2000,2020),axs="r",tck=-1),y=list(log=TRUE,tck=-100,at=c(100,1000,10000,100000))), panel=function(x,y,...) {
2006 Oct 31
1
2.4.0 and lattice 0.14-9: Changed behaviour of scales-argumenttck
Dear list, I have observed a change in the behaviour of the scales-argument tck of xyplot() after having installed R 2.4.0 (for version info see below). The help page of xyplot() says about the scales-argument tck: 'tck' numeric to control length of tick marks. Can be a vector of length 2, to control left/bottom and right/top separately. But if I issue xyplot( y ~ x, scales=
2009 Jan 25
1
Multiple lattice plots on a page: aligning x-axes vertically
Dear R-help, I am creating a two lattice plots (a densityplot() and xyplot()) that have the same x-axes and then 'printing' them onto the same page, one above the other (see end of email for an example to generate the graph). With different labels on the y-axis for each plot the left spacing is different, and the x-axes don't align vertically. Although I can manually modify the
2011 Jan 04
1
lattice: par.settings with standard.theme() + additional arguments?
Dear expeRts, I usually use par.settings = standard.theme(color = FALSE) to create lattice graphics without colors, so something like library(lattice) x <- runif(10) xyplot(x ~ 1:10, type = "l", par.settings = standard.theme(color = FALSE)) Now I would like to use an additional component in par.settings. I tried several things like xyplot(x ~ 1:10, type = "l",
2010 Aug 30
1
lattice: limits in reversed order with relation="same"
Hi everybody, I want an x-axis which has xlim=c(max, min) rather than xlim=c(min, max) in order to reflect the type of the process (cooling): library(lattice) myprepanel <- function(x,y,...) list(xlim=rev(range(x))) x <- rep(1:10, 100) z <- factor(sample(10, 1000, T)) y <- rnorm(1000, x, as.numeric(z)) xyplot(y~x|z, scales=list(x="free"), prepanel=myprepanel) This works
2012 Mar 28
1
xyplot lattice fine control of axes limits and thick marks (with log scale)
After a long and winding road (sorry but I'm a novice) I get to a final result which is quite close to what I need; nevertheless I would like to tweak a little further the xyplot so that I can get ***for each single panel defined by variable z*** a finer control over: -the x and y the limits: I would like to be the same for both axes; -the number of thick marks: again I would like to be same
2010 Oct 27
1
Control of axis limits in multiple panel lattice plots
Unwanted space (padding?) is introduced at the extremes of the x and y axes of my lattice plots. I've tried defining the scales using xlim, scale and num.limits in x.scale.components, but haven't succeded in getting overriding the introduction of extra space. Here's the problem:
2005 Jun 01
2
problem with chron scales in lattice
I can't get the scales parameter in xyplot of lattice to work as I expected. I'm using R-2.1.0 and lattice 0.11-8. There should be year labels from 1992 to 2004 for the x axis in the plot below, but instead only a few of them appear, and in the wrong spots, as if the coordinate system has changed after finishing with the panel function. library(chron) library(lattice) # vertical grid
2017 Sep 12
0
show 0 at y axis in xyplot lattice
Hi Maria Rule 1 make sure your data is in the right format dat <- source("G:/1/savedat.txt") > dat $value Location Date Zn2 upper.zn lower.zn 1 upstream 2016-04-27 29.92477 55.59800 13.912207 2 spill 2016-04-27 12.84040 22.07006 6.964934 3 downstream 2016-04-27 22.49673 41.60901 11.739109 4 upstream 2016-06-28 23.98425 45.60219 10.690640 5
2011 Oct 26
1
Using abline in lattice
Dear all, being a relative beginner in R, I apologize for posting the second question within two days. So I want a stacked barchart, which should look like the one produced by this code: Tuvalu <- c(9,3,4,0,3,0,0) Singapor <- c(38,0,0,0,12,19,0) Samoa <- c(26,16,2,0,5,2,0) PNG <- c(56,4,0,5,2,0,56) Micronesia <- c(6,0,0,0,0,0,0) graph4 <-
2010 May 26
1
Custom axis function in lattice:::xyplot
Dear List, I have been writing a Lattice function to draw what we call stratigraphic diagrams, these are diagrams with a panel for each species showing a time series of abundance, but drawn vertically to represent time passing from bottom of plot towards to top. I am most of the way there with this now, but I want to do away with the strip on each panel and instead draw a custom top axis with a