Re: [R] Overlaying trellis xyplot on contourplot

2007-12-13 Thread Deepayan Sarkar
On 12/13/07, Seth W Bigelow <[EMAIL PROTECTED]> wrote: > > Friends: I wish to overlay data points on a contour graph. The following > example produces a nice contour plot, but I have not mastered the concept > of using panel functions to modify plots. Can someone show me how to > overlay the data

Re: [R] Different labels by panel in barchart

2007-12-19 Thread Deepayan Sarkar
On 12/19/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Dear all, > > I'm analysing a survey, and creating a barchart of the different responses > for each question. The questions are grouped according to a number of > categories, so I'm using lattice to create a plot with each question in a >

Re: [R] adding lines to a barchart

2007-12-19 Thread Deepayan Sarkar
On 12/19/07, Spilak,Jacqueline [Edm] <[EMAIL PROTECTED]> wrote: > Hi all > I can't find what I am looking for so I am asking here. I have a > dataset that looks something like this. > > Year season percent_below > 2000 Winter 6.9179870 > 2000 Spring 1.6829436 > 2000 Summer 1.8463501

Re: [R] lattice: axes drawn when relation='free' or relation='sliced' but not when relation='same'

2007-12-19 Thread Deepayan Sarkar
On 12/19/07, John G. Bullock <[EMAIL PROTECTED]> wrote: > > 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') >

Re: [R] Question about which kind of plot to use

2007-12-19 Thread Deepayan Sarkar
On 12/19/07, Dylan Beaudette <[EMAIL PROTECTED]> wrote: > On Wednesday 19 December 2007, Max wrote: > > Hi Everyone, > > > > I've got a question about data representation. I have some psychometric > > data with 5 scores for 15 different groups. I've been asked to show > > some kind of mean plots. T

Re: [R] adding lines to a barchart

2007-12-21 Thread Deepayan Sarkar
On 12/21/07, Spilak,Jacqueline [Edm] <[EMAIL PROTECTED]> wrote: > Thanks Deepayan, this helped a lot and gave me exactly what I wanted > however I want a few changes and am not sure how to do them. In each > panel the bars for the years are the same color with the bottom axis > (the x-axis) labell

Re: [R] both lines and plot characters in a lattice plot key

2007-12-25 Thread Deepayan Sarkar
On 12/25/07, Hofert Marius <[EMAIL PROTECTED]> wrote: > Hello, > > I have two short questions concerning a key (legend) in a lattice > plot. I have points represented by two different plot characters > (crosses and circles) and they are colored from light to dark gray. I > would like to have 3 part

Re: [R] Different number of labels in different panels

2007-12-31 Thread Deepayan Sarkar
On 12/31/07, Hofert Marius <[EMAIL PROTECTED]> wrote: > Hi, > > I would like to put a number to each of the plotted curves in each > panel. The problem is that there are different numbers of curves in > different panels, so as you can see from the code below, I could put > the correct numbers to th

Re: [R] Alignment and Labeling of a color key in a xyplot?

2008-01-01 Thread Deepayan Sarkar
On 1/1/08, Hofert Marius <[EMAIL PROTECTED]> wrote: > Happy New Year to all R users! > > I have two short questions concerning a xyplot with a color key: > > 1) How do I properly place (align) the color key beside the xyplot? > As you can see from the code listed below, the placement of the color >

Re: [R] Variable scope R 2.6.1

2008-01-03 Thread Deepayan Sarkar
ccall$x <- ~x > ccall[[1]] <- quote(lattice::splom) > eval.parent(ccall) > } > > (I'm copying this response to Deepayan Sarkar, in case he wants to > comment.) > > > Finally, the warnings reflect an incorrect call to trellis.par.set(); you &g

Re: [R] lattice color problem with symbols: bug?

2008-01-11 Thread Deepayan Sarkar
On 1/11/08, Stefan Grosse <[EMAIL PROTECTED]> wrote: > Dear useR's, > > I have a problem with the lattice plotting of some symbols: > > library(lattice) > > test<-data.frame(x=c(2,3,1,5),u=c(rep(1,2),rep(2,2)),g=c(rep(c(1,2),2))) > > xyplot(x~u,groups=g, > data=test, > par.settings=list( > su

Re: [R] Lattice equivalent of par(mfrow = )

2008-01-12 Thread Deepayan Sarkar
On 1/12/08, Michael Kubovy <[EMAIL PROTECTED]> wrote: > Dear r-helpers, > > Does anyone have a straightforward example of putting together three > unrelated (expect for a common y-axis) xyplot() figures in what would > be in base graphics a par(mfrow = c(1, 3)) arrangement? See the examples in ?pr

Re: [R] Lattice equivalent of par(mfrow = )

2008-01-13 Thread Deepayan Sarkar
On 1/13/08, Michael Kubovy <[EMAIL PROTECTED]> wrote: > Dear R-helpers, > > On Jan 12, 2008, at 5:17 PM, Deepayan Sarkar wrote: > > > On 1/12/08, Michael Kubovy <[EMAIL PROTECTED]> wrote: > >> Dear r-helpers, > >> > >> Does anyone

Re: [R] Overlay plots from different data sets using the Lattice package

2008-01-14 Thread Deepayan Sarkar
On 1/14/08, Erin Steiner <[EMAIL PROTECTED]> wrote: > #After spending the entire day working on this question, I have > decided to reach out for support: > > #I am trying to overlay a densityplot from one data set over a > histogram of another, if I were to plot the two individually, they > would l

Re: [R] Own classes in "histogram"

2008-01-16 Thread Deepayan Sarkar
On 1/16/08, Denis Aydin <[EMAIL PROTECTED]> wrote: > Hi, > > I try to make a histogram from a variable that contains the number of > shoots from about 1000 individuals from a specific plant species (the range > is 1-110). > Those numbers are highly skewed to the right. I would suggest you conside

Re: [R] Adding a table to a lattice plot

2008-01-22 Thread Deepayan Sarkar
On 1/22/08, Judith Flores <[EMAIL PROTECTED]> wrote: > Hi, > >Is there an analog function of textplot in the > lattice package? I need to add a data frame to a > lattice plot. I work in a Windows environment and I am > using R v 2.6.1 There's nothing built-in, but if you are happy with fixed w

Re: [R] adjusting y axis labels in lattice plots?

2008-01-23 Thread Deepayan Sarkar
On 1/23/08, Thomas Zumbrunn <[EMAIL PROTECTED]> wrote: > 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 a

Re: [R] Bar width and labels in barchart

2008-01-24 Thread Deepayan Sarkar
On 1/23/08, Spilak,Jacqueline [Edm] <[EMAIL PROTECTED]> wrote: > Hi everyone > I am using barchart to make my graphs. Here is my code. > > barchart(percent_below ~ factor(Year)| factor(Season, > levels=unique(Season)), > data= .season_occurrence, origin = 0, layout = c(4, 1), > scales=list(t

Re: [R] Using bquote: question

2008-01-24 Thread Deepayan Sarkar
On 1/24/08, Bert Gunter <[EMAIL PROTECTED]> wrote: > I should have perhaps phrased my previous post better as: the result of > bquote() is a language expression argument of mode "call" which gets > evaluated by the plotmath functionality in your first plot call, but gets > evaluated in the global

Re: [R] Bar width and labels in barchart

2008-01-25 Thread Deepayan Sarkar
On 1/25/08, Spilak,Jacqueline [Edm] <[EMAIL PROTECTED]> wrote: > > -Original Message----- > From: Deepayan Sarkar [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 24, 2008 9:56 AM > To: Spilak,Jacqueline [Edm] > Cc: r-help@r-project.org > Subject: *SPAM* R

Re: [R] on trellis.par.set/get (reproducing figures from Pinheiro & Bates)

2008-01-29 Thread Deepayan Sarkar
On 1/29/08, Dr. Ottorino-Luca Pantani <[EMAIL PROTECTED]> wrote: > Dear R users, > I would like to exactly reproduce a figure like the 1.5 or 1.9 or 4.13 > from the book > Mixed effects models in S and S-Plus. > Not for the sake of it, but because I have my own data I would like to > plot in that f

Re: [R] Concatenate xyplots

2008-01-30 Thread Deepayan Sarkar
On 1/29/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Dear R-community, > > I created 5 different xyplots and graphed all of them with the print command > on one page (e.g. > > print(graph1, split=c(1,1,1,5), more = T) > > ... print(graph5, split=c(1,5,1,5), more =T) > > Using the above comm

Re: [R] on trellis.par.set/get (reproducing figures from Pinheiro & Bates)

2008-01-30 Thread Deepayan Sarkar
On 1/30/08, Dr. Ottorino-Luca Pantani <[EMAIL PROTECTED]> wrote: > Deepayan Sarkar ha scritto: > > On 1/29/08, Dr. Ottorino-Luca Pantani <[EMAIL PROTECTED]> wrote: > > > >> Dear R users, > >> I would like to exactly reproduce a figure like the 1.5

Re: [R] Concatenate xyplots

2008-01-30 Thread Deepayan Sarkar
On 1/30/08, eite2335 <[EMAIL PROTECTED]> wrote: > > OK - here is an example: > > ## Create example data > > data = matrix(1:8, nrow=4, ncol=2) > > ## Name columns "x" and "y" > > colnames(data) = c("x", "y") > > data = data.frame(data) > > ## Create 5 graphs with the xyplot command > > graph1= xyp

Re: [R] Concatenate xyplots

2008-01-30 Thread Deepayan Sarkar
= TRUE, scales = list(y = list(relation = "free", rot = 0))) There are of course many other customizations possible. If you want a common y-axis for each row, but a different one for different rows, that's a bit harder (though not impossible). -Deepayan > Deepayan S

Re: [R] (Small) problem with barchart

2008-02-03 Thread Deepayan Sarkar
On 2/3/08, K. Elo <[EMAIL PROTECTED]> wrote: > Hi, > > I have a small problem when using barchart. I have the following data: > >letters a > 6f 18 > 1a 15 > 10 j 12 > 9i 12 > 4d 9 > 5e 6 > > The data is from a survey and summaries the alternative

Re: [R] How to Break Axis in Lattice Plot

2008-12-10 Thread Deepayan Sarkar
On Tue, Dec 9, 2008 at 8:04 PM, Larry Ma <[EMAIL PROTECTED]> wrote: > Dear All, > > I have searched the following problem in the R help achives, and there did > not seem to be solutio for it. > > The problem is how to break the axis in the xyplot (lattice plot). I read > the posts using the packag

Re: [R] call lattice function in a function passing "groups" argument

2008-12-11 Thread Deepayan Sarkar
On Thu, Dec 11, 2008 at 2:55 AM, Thomas Zumbrunn wrote: > 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 densi

Re: [R] Plotting regression lines and points from lm using lattice

2008-12-17 Thread Deepayan Sarkar
On 12/17/08, Javier PB wrote: > > Dear R-users, > > Sorry if someone came out with a similar question but after one day of > searching I am giving up: > > Does anyone know how to plot the original points used in a lm model and the > set of resulting regression lines generated by the model? >

Re: [R] Shrink Trellis margins settings (when printed to png file)

2008-12-17 Thread Deepayan Sarkar
On Wed, Dec 17, 2008 at 8:11 AM, Mark Heckmann wrote: > Dear R-experts, > > I have two problems: > > PROBLEM (1) > --- > > I want to produce a very small png file (35 x 18 px) that contains a > histogram without a figure region or margins, only the pure heights. > In the base graphic syste

Re: [R] Borders for rectangles in lattice plot key

2008-12-28 Thread Deepayan Sarkar
On 12/23/08, richard.cot...@hsl.gov.uk wrote: > Hopefully an easy question. When drawing a rectangles in a lattice plot > key, how do you omit the black borders? They are currently hard-coded. I will add support for a 'border' component. -Deepayan > Here is an example adapted from one on the

Re: [R] Lattice trellis.focus() with pdf

2008-12-31 Thread Deepayan Sarkar
On Wed, Dec 31, 2008 at 3:41 PM, Chris Poliquin wrote: > Hi, > > I have a the code for a plot that works perfectly running in R and printing > to a Quartz object but which doesn't work when I make the trellis device a > pdf. > > The code is as follows: > > > trellis.device(device="pdf", new=T

Re: [R] How to capture multiple graph pages to .png ?

2009-01-05 Thread Deepayan Sarkar
On Mon, Jan 5, 2009 at 4:57 PM, Mike Williamson wrote: > Greg, others, > >Thanks for the info! I suspect you are right, Greg. > >The main issue, as Sundar Dorai-Raj (who posts here at times) told me in > person and you say indirectly below, is that the "levelplot" function > returns an ob

Re: [R] Overlaying several qqnorm curves in same frame

2009-01-06 Thread Deepayan Sarkar
On 1/6/09, Assaf oron wrote: > Hi all, > > I want to create a rather standard overlaid qqnorm plot on a single > variable, with different subgroups of the same dataset plotted using > different colors/symbols/etc. (I don't want side-by-side, rather > different-colored curves on the same graph)

Re: [R] smoothed contour lines

2009-01-07 Thread Deepayan Sarkar
On Tue, Jan 6, 2009 at 8:52 AM, Andrea Storto wrote: > Hi all, > > I'm trying to draw a contour plot > with rounded (smoothed) contour lines instead of sharp angles; > when the grid consists of only a few points > in x- and y- axis, the resulting contour > is in facts rather ugly since very sharp

Re: [R] lattice question: independent per-row or per-column scaling?

2009-01-18 Thread Deepayan Sarkar
On 1/8/09, René J.V. Bertin wrote: > Hello - and happy newyear to all of you! > > I've got some data that I'm plotting with bwplot, a 3x2x3 design where > the observable decreases with the principle independent factor, but at > different rates. > > I'd like to get lattice to impose not a singl

Re: [R] Problem between panel.abline and log scales (lattice)

2009-01-19 Thread Deepayan Sarkar
On 1/12/09, Ptit_Bleu wrote: > > Hello and Happy New Year to all R-Users !!! > > I would like to plot a lattice graph with a logarthmic y axis and add two > reference lines that is : > > ref<-c(0.0070, 0.0096) > > graph1<-xyplot(data$y1 ~ as.numeric(strptime(data$x1, format="%Y-%m-%d > %H:%M

Re: [R] Combining Custom and Preset Linetypes

2009-01-21 Thread Deepayan Sarkar
On Wed, Jan 21, 2009 at 6:58 PM, jimdare wrote: > > Dear R-Users, > > I created the xyplot below using 10 groups (9 groups + 'Total' of all > groups) with lty=1:10. I need the 'Total' to be a bold solid line (lty=1) > where as the 9 groups just need to be distinguishable from each other. As > yo

Re: [R] plotting curve in xYplot -- using panel.curve

2009-01-23 Thread Deepayan Sarkar
On Fri, Jan 23, 2009 at 12:46 PM, Dieter Menne wrote: > > > > John Poulsen wrote: >> >> I am trying to plot a curve over points plotted with se's in xYplot (see >> example below). I can get Figure 1 below to plot the data with error. >> However, I keep getting a the error message >> >> "Error usi

Re: [R] lattice question: independent per-row or per-column scaling?

2009-01-23 Thread Deepayan Sarkar
On Mon, Jan 19, 2009 at 7:24 AM, René J.V. Bertin wrote: > Thanks for all the answers. I'll have a look at ggplot2. I'd seen the > possibility to set panel-specific limits via ylim, but I was in fact > looking for a switch to achieve non-global automatic scaling. > > Given the fact that there is n

Re: [R] lattice: reverse order of panel.lmline, panel.smooth

2009-01-23 Thread Deepayan Sarkar
On Fri, Jan 23, 2009 at 3:00 PM, Dylan Beaudette wrote: > Hi, > > is it possible to reverse the order in which panel.lmline() or panel.smooth() > operation in xyplot() ? This type of situation might occur when plotting some > variable with depth, but the relation we want to describe is variable ~

Re: [R] R: Trellis Graph

2009-02-02 Thread Deepayan Sarkar
On Mon, Feb 2, 2009 at 11:05 AM, Greg Snow wrote: > ?lattice::shingle > > Hope that helps, if not, give more detail/example. The example in help(banking, package = "lattice") should also be relevant. -Deepayan > > -- > Gregory (Greg) L. Snow Ph.D. > Statistical Data Center > Intermountain Hea

Re: [R] lattice key inside panel

2009-02-04 Thread Deepayan Sarkar
On Wed, Feb 4, 2009 at 8:21 AM, Iago Mosqueira wrote: > Hello, > > I am trying to draw a key inside a single panel in a lattice xyplot. The > panel function uses panel.number() to use a slightly different style for > one of the panels. Once inside than panel I am using > > draw.key(list(text=list(

Re: [R] lattice key inside panel

2009-02-04 Thread Deepayan Sarkar
On Wed, Feb 4, 2009 at 2:13 PM, Iago Mosqueira wrote: > Deepayan Sarkar wrote: >> On Wed, Feb 4, 2009 at 8:21 AM, Iago Mosqueira >> wrote: >>> Hello, >>> >>> I am trying to draw a key inside a single panel in a lattice xyplot. The >>> p

Re: [R] lattice key inside panel

2009-02-05 Thread Deepayan Sarkar
On Thu, Feb 5, 2009 at 11:28 AM, Dieter Menne wrote: > Deepayan Sarkar gmail.com> writes: > >> > One other thing that has so far eluded me is how to specify two >> > different kinds of symbols on a single column. The key above shows >> > >> > text lin

Re: [R] xyplot multiple conditions and empty panels

2009-02-06 Thread Deepayan Sarkar
On Fri, Feb 6, 2009 at 1:15 PM, Sebastien Bihorel wrote: > Dear R-users, > > Is it possible to prevent xyplot from drawing empty panels when using > multiple conditions and when the dataset has a incomplete set of condition > combinations - like in the following example? > I have tried to modify t

Re: [R] how to make this qq plot in lattice and/or ggplot2

2009-02-07 Thread Deepayan Sarkar
On 2/7/09, Juliet Hannah wrote: > Hi Group, > > Here is some data. > > p <- runif(1000) # sample data > groups <- rep(c(1,2),each=500) #conditioning variable > mydata <- cbind(p,groups) > n <- length(p) > u <- (1:n)/(n + 1) # uniform distribution reference for qqplot > logp <- -log(p,base=1

Re: [R] Types in grouped multi-panel (lattice) xyplot

2008-04-10 Thread Deepayan Sarkar
On 4/10/08, Aaron Arvey <[EMAIL PROTECTED]> wrote: > Apologetic prologue: I've looked through the mailing list for an answer to > this (since I'm sure it's trivial) but I have not been able to find a fix. > > So the problem is that I want each group to have a different type of plot. > "Probes" s

Re: [R] Types in grouped multi-panel (lattice) xyplot

2008-04-10 Thread Deepayan Sarkar
On 4/10/08, Deepayan Sarkar <[EMAIL PROTECTED]> wrote: > On 4/10/08, Aaron Arvey <[EMAIL PROTECTED]> wrote: > > Apologetic prologue: I've looked through the mailing list for an answer to > > this (since I'm sure it's trivial) but I have not been able t

Re: [R] Fixing the physical size of Trellis graphs panels

2008-04-10 Thread Deepayan Sarkar
On 4/10/08, Sébastien <[EMAIL PROTECTED]> wrote: > Dear R-users, > > Please consider the following script: > > # > > library(lattice) > ID <- rep(1:8,each=2) > x <- rep (c(1,2),8) > y <- c(rep(c(0.5,2),4),rep(c(50,1000),4)) > df<-data.frame(ID,x,y) > g <- rep(1:2,each=8) > df.split<-sp

Re: [R] Types in grouped multi-panel (lattice) xyplot

2008-04-11 Thread Deepayan Sarkar
On 4/11/08, Dieter Menne <[EMAIL PROTECTED]> wrote: > Deepayan Sarkar gmail.com> writes: > > > > Try > > > xyplot(val ~ loc | mouse, data = df, > > >groups=valtype, > > >type=c("p","l"), > >

Re: [R] identical scales per panel with relation="free"

2008-04-16 Thread Deepayan Sarkar
On 4/16/08, Andreas Krause <[EMAIL PROTECTED]> wrote: > > Using xyplot, I am plotting observed versus predicted values conditional to > the values of a third variable. > I would thus like to have an aspect ratio of 1 and the same axis range. > Since the range of the values differs substantially

Re: [R] Data labels in barchart (lattice)

2008-04-21 Thread Deepayan Sarkar
On 4/21/08, K. Elo <[EMAIL PROTECTED]> wrote: > Dear all, > > I use the barchart-function (lattice) for plotting stacked barcharts. > The data is a summary table (data frame) of likert-scale-evaluations > (strongly agree, agree...strongly disagree) to different issues > constructed as follows (

Re: [R] Attempting to sync x-axis labels with grid lines in lattice bwplot

2008-04-21 Thread Deepayan Sarkar
On 4/20/08, Mark Coletti <[EMAIL PROTECTED]> wrote: > I have created a lattice bwplot that suffers from axis label > overplotting. The box plot contains grid lines, and I thought that > only plotting the labels for corresponding vertical grid lines would > not only cure the overplotting but als

Re: [R] cloud plot has white(transparent?) background

2008-04-22 Thread Deepayan Sarkar
On 4/22/08, David Winsemius <[EMAIL PROTECTED]> wrote: > Karin Lagesen <[EMAIL PROTECTED]> wrote in > news:[EMAIL PROTECTED]: > > > > I am using the code example from the R graph gallery to look at a > > cloud plot: > > > > require(lattice) > > data(iris) > > print(cloud(Sepal.Length ~ Petal

Re: [R] cloud plot has white(transparent?) background

2008-04-22 Thread Deepayan Sarkar
On 4/22/08, Karin Lagesen <[EMAIL PROTECTED]> wrote: > > > I am using the code example from the R graph gallery to look at a > cloud plot: > > require(lattice) > data(iris) > print(cloud(Sepal.Length ~ Petal.Length * Petal.Width, data = iris, > groups = Species, screen = list(z = 2

Re: [R] wireframe - add data points

2008-04-30 Thread Deepayan Sarkar
On 4/30/08, Strubbe Diederik <[EMAIL PROTECTED]> wrote: > Hello all, > > I'm trying to add some data points to a wireframe. X an Y axis are > independent variables, Z axis is predicted probability. I'd like to add the > original data points on which the predicted probabilities are based to the

Re: [R] Lattice book

2008-05-01 Thread Deepayan Sarkar
On 4/30/08, Charilaos Skiadas <[EMAIL PROTECTED]> wrote: > Actually it's been out for a couple of weeks now at least. Yes, it's been out since March 12, actually. > I just finished > my first reading of it, and I must say it was spectacular. Congratulations > Deepayan, the book gave me exactly t

Re: [R] Lattice book

2008-05-02 Thread Deepayan Sarkar
On 5/2/08, Michael Kubovy <[EMAIL PROTECTED]> wrote: > I too have been studying the book and it is indeed outstanding. > > For my purposes the only topic missing is the straightforward drawing of > error bars and bands, for which I've been using Hmisc::xYplot (where error > bands seem to be broken

Re: [R] Errors bar in barchart

2008-05-02 Thread Deepayan Sarkar
On 5/2/08, Ronaldo Reis Junior <[EMAIL PROTECTED]> wrote: > Hi, > > I user barplot2 to make a plot bar with errors bars. In old times I needed to > use a sequence of segments commands to make this. > > Now I try to make the same but using lattice. Is possible to use barplot2 in > barchart funct

Re: [R] bwplot

2008-05-05 Thread Deepayan Sarkar
On 5/5/08, cfinet <[EMAIL PROTECTED]> wrote: > Hi, > I have 2 questions about bwplot in R : > 1) How to change the order of my different boxes in the graph ? > 2) How to rename the names of the differents boxes ? because I know how to > do that with boxplot (using names) but I do not find the eq

Re: [R] Plotting points on line graphs using xYplot in Hmisc

2008-05-05 Thread Deepayan Sarkar
On 5/5/08, John Poulsen <[EMAIL PROTECTED]> wrote: > > > Hello, > > I am using xYplot to plot lines with confidence bands (see test example > below). I would like to add a single point with confidence bars to each > graph (coordinates of the points below: px, py, pxlow, etc...). I tried > playi

Re: [R] Spacing between lattice panels

2008-05-06 Thread Deepayan Sarkar
On 5/6/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I'm trying to set up a lattice plot with two y-axes for each panel. (Yes, > I know that multiple y-axes are generally a bad idea; the graph is for > someone else and they want it that way.) I've used a custom > yscale.component in xyplo

Re: [R] histogram() with "Date" class?

2008-05-08 Thread Deepayan Sarkar
On 5/8/08, Ola Caster <[EMAIL PROTECTED]> wrote: > Dear help list, > > Is it possible to draw lattice histograms (i.e. use the histogram() function > and not the hist() function) with objects of class "Date"? Sort of. The default calculation of 'breaks' doesn't work, so histogram(~date, data=my

Re: [R] histogram() with "Date" class?

2008-05-09 Thread Deepayan Sarkar
On 5/9/08, Ola Caster <[EMAIL PROTECTED]> wrote: > > Sorry for spamming the list... > > > I noticed that if you first produce a date histogram with the hist() > function, like this: > > basic.histogram <- hist(my.data$date, breaks = "months", plot = FALSE) > > and then try to transfer the breaks fr

Re: [R] positioning of color key in levelplot

2008-05-11 Thread Deepayan Sarkar
On 5/11/08, E C <[EMAIL PROTECTED]> wrote: > Is there a way of positioning the color key in levelplot when the axes are on > a categorical (rather than numerical) scale? I've put some sample code below. > I need to add a secondary y axis to the right side of my plot but then the > labels interfe

Re: [R] Mathematical annotation in lattice strip: Is it possible?

2008-05-12 Thread Deepayan Sarkar
On 5/12/08, Andrewjohnclose <[EMAIL PROTECTED]> wrote: > > I have tried without success to find a way including the square root symbol > in lattice strips as part of my conditioning labels. I have tried > supplementing by creating a list of vectors using the var.name function > coupled with the

Re: [R] lw in legend also changes thickness of characters in the legend??

2008-05-14 Thread Deepayan Sarkar
On 5/14/08, Levi Waldron <[EMAIL PROTECTED]> wrote: > Here's a simple example: > > x <- 1:5 > plot(x,x^2) > lines(x,x^2) > points(x,x,cex=2) > lines(x,x,lw=3) > legend("topleft",legend=c("y=x^2","y=x"),pch=1,pt.cex=1:2,lw=c(1,3)) > > The thickness of the circles in the legend changes with lw

Re: [R] lattice: left-aligned text in strips?

2008-05-15 Thread Deepayan Sarkar
On 5/15/08, RINNER Heinrich <[EMAIL PROTECTED]> wrote: > Thanks for your help! > I guess I could have thought for ages about this, and never would such a > solution have come to my mind ;-) > It works as far as the text in the strips is left-aligned; a remaining > drawback > is that printing o

Re: [R] xyplot: subscripts, groups and subset

2008-05-16 Thread Deepayan Sarkar
On 5/16/08, Jim Price <[EMAIL PROTECTED]> wrote: > > I have stumbled across something in the Lattice package that is vexing me. > Consider the code below: > __ > > library(lattice) > > > myData <- expand.grid(sub = factor(1:16), time = 1:

Re: [R] Question about banking to 45 degrees.

2008-05-20 Thread Deepayan Sarkar
On 5/20/08, Joshua Hertlein <[EMAIL PROTECTED]> wrote: > > Hello, > > I am very interested in "banking to 45 degrees" as defined by William S. > Cleveland > in "Visualizing Data." I like to do it in R as well as Excel, etc. With R I > have come > across the following method: > > xyplot(x, y

Re: [R] hist clarification

2008-05-20 Thread Deepayan Sarkar
On 5/20/08, John Gant <[EMAIL PROTECTED]> wrote: > Can someone help me with a misunderstanding I'm having with hist? I > expected, from the example below, that the number of bins would always be 10 > and the length of the counts array the same. According to the help section > 'breaks' can be a i

Re: [R] Question about banking to 45 degrees.

2008-05-20 Thread Deepayan Sarkar
On 5/20/08, Charilaos Skiadas <[EMAIL PROTECTED]> wrote: > Here is how I see it. Let me define a "visual y-unit" as the height of a > unit of data in the y-direction, and similarly for a visual x-unit. > Then the aspect ratio is the quotient of the visual y-unit over the visual > x-unit. So the

Re: [R] xlab at top in xyplot()

2008-05-21 Thread Deepayan Sarkar
On 5/21/08, Michael Kubovy <[EMAIL PROTECTED]> wrote: > Dear R-helpers, > > (1) How do I add a 'top' label symmetric with the 'bottom' label' in: > > axis.td <- > function(side, ...) > { > ylim <- current.panel.limits()$ylim > switch(side, > bottom = { >

Re: [R] setting specific colours for different groups of points on a scatter plot

2008-05-22 Thread Deepayan Sarkar
On 5/22/08, Sarah Kinnings <[EMAIL PROTECTED]> wrote: > Hi, > > I have a table with three columns of data, let's call these a, b and c. I > have produced a scatter plot of a against b, but I would like to colour the > points according to their corresponding c values. c takes the value of > either

Re: [R] Seeking help with trellis: log scales on xyplot

2008-05-23 Thread Deepayan Sarkar
On 5/23/08, hobie perry <[EMAIL PROTECTED]> wrote: > > Good afternoon. > > The basic plot function can automatically generate log scales as follows: > > plot(calcium ~ soil_ph, log="y") > > Here is my basic model in xyplot... > > xyplot(calcium+magnesium ~ soil_ph|depth*region) > > I

Re: [R] Lattice Cloud()-Plot with the same color for different groups

2008-05-27 Thread Deepayan Sarkar
On 5/27/08, Charilaos Skiadas <[EMAIL PROTECTED]> wrote: > > On May 27, 2008, at 3:10 AM, Hofert Marius wrote: > > > > Hi, > > > > Consider the following cloud()-plot consisting of two lines: > > > > library(lattice) > > > mydata=data.frame(x=rep(1:4,2),y=rep(1:2,each=4),z=c(1,2,3,4,4,3,2,1)) > >

Re: [R] library(Matrix) and image() colors?

2008-05-28 Thread Deepayan Sarkar
On 5/28/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi, > I'm trying to produce a plot of an image of a Matrix, but I don't get > other colors than the default grey scale: > > > image(Matrix(topo.matrix.2),col.regions=topo.colors(100),colorkey=FALSE) > > this still is plotted in grey. >

Re: [R] Question about adding text to xYplot(Hmisc)

2008-05-29 Thread Deepayan Sarkar
On 5/29/08, Wen Huang <[EMAIL PROTECTED]> wrote: > Hello, > > I have been trying to make a graph that have error bars and text at > specific position. > > I used the following code from the help file of xYplot(Hmisc) as an example > except I add a myPanel function, which is just supposed to add l

Re: [R] Reducing space around lattice wireframe plots

2008-05-30 Thread Deepayan Sarkar
On 5/30/08, Karl Ove Hufthammer <[EMAIL PROTECTED]> wrote: > Dear R-help. > > When plotting 3D wireframe plots with the lattice package, there is often > a lot of space between the actual plot (i.e., cube) and panel borders. For > a single wireframe, this is not a problem, but when plotting mult

Re: [R] dynamically add items to key of lattice xyplot

2008-02-05 Thread Deepayan Sarkar
On 2/5/08, Bram Kuijper <[EMAIL PROTECTED]> wrote: > Hi all, > > is it possible to dynamically add key items to an already existing key, > belonging to a lattice xyplot? No. -Deepayan > This is what I do: I make an xyplot with an initial key. Later on, I > want to extend this key with more items

Re: [R] Inconsistent lattice scales$x$at, label behaviour for POSIXct

2008-02-05 Thread Deepayan Sarkar
On 2/5/08, Alex Brown <[EMAIL PROTECTED]> wrote: > 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

Re: [R] Levelplot of percentages always using 0 to 100 in the color scheme

2008-02-06 Thread Deepayan Sarkar
On 2/5/08, Kelvin <[EMAIL PROTECTED]> wrote: > I am trying to create levelplot's of cpu usage for systems. > print(levelplot(util.mean ~ x.hour * x.day, colorkey=T, cut=20, > scales=list(x=list(at=seq(0,96,length=25), > labels=ifelse(seq(0,24) %% 4 == 0, seq(0,24), ''))), # add > tick

Re: [R] Inconsistent lattice scales$x$at, label behaviour for POSIXct

2008-02-06 Thread Deepayan Sarkar
On 2/6/08, Alex Brown <[EMAIL PROTECTED]> wrote: > Here's a related problem that works for numeric but not for POSIXct > > I am seeing it where a panel has no at labels, but others do. > > This simple example only has one panel with no at labels. > > > baseval = 0; > > xyplot(1:10 ~ (baseval + c(

Re: [R] xyplot and lsegments

2008-02-08 Thread Deepayan Sarkar
On 2/8/08, Alex Brown <[EMAIL PROTECTED]> wrote: > Hi, > > How might I use xyplot to plot segments where the segments are in the > input data? (ie a directed acyclic forest). > > Here's an example in base graphics: > > n = data.frame(id = c(1,2,3,4), parent = c(0,1,2,2), value = > c

Re: [R] cloud + legend

2008-02-08 Thread Deepayan Sarkar
On 2/8/08, Deepayan Sarkar <[EMAIL PROTECTED]> wrote: > On 2/8/08, Neuer Arkadasch <[EMAIL PROTECTED]> wrote: > > Hello, > > > > Is it possible to add a legend to the 3d scatterplot cloud? > > Yes (the relevant arguments are described in ?xyplot). For examp

Re: [R] cloud + legend

2008-02-08 Thread Deepayan Sarkar
On 2/8/08, Neuer Arkadasch <[EMAIL PROTECTED]> wrote: > Hello, > > Is it possible to add a legend to the 3d scatterplot cloud? Yes (the relevant arguments are described in ?xyplot). For example, cloud(Sepal.Length ~ Petal.Length * Petal.Width | Species, data = iris, screen = list(x =

Re: [R] Histogram in Lattice with 3 factors

2008-02-11 Thread Deepayan Sarkar
On 2/11/08, willem vervoort <[EMAIL PROTECTED]> wrote: > Dear R-help list, > > I am trying to construct a lattice histogram using 3 factors. > > My dataframe looks like this: (simulating a waterbalance over > groundwater with different salinities) > > s days modelECEC_max > 0.4 1

Re: [R] help with bwplot

2008-02-12 Thread Deepayan Sarkar
On 2/12/08, Tom Cohen <[EMAIL PROTECTED]> wrote: > Dear list, > > I have following data set, which I want to plot the "Scale" variable on the > x-axis and "Mean"´on the y-axis for each Ageclass and for each sex. The Mean > value of each Ageclass for each sex would be connected by a line. Totall

Re: [R] Survival (KM/Cox) plots with lattice?

2008-02-13 Thread Deepayan Sarkar
On 2/13/08, Dieter Menne <[EMAIL PROTECTED]> wrote: > Dear gRaphers, > > I am looking for a lattice-panel for survival (KM/Cox) plots. I know it's > not standard, but maybe someone has already tried? There are some half-formed ideas in http://dsarkar.fhcrc.org/talks/extendingLattice.pdf but noth

Re: [R] {lattice/grid} "Error using packet 1" and traceback

2008-02-14 Thread Deepayan Sarkar
On 2/14/08, Felix Andrews <[EMAIL PROTECTED]> wrote: > You can tell Lattice to stop when an error occurs, like this: > > lattice.options(panel.error="stop") > xyplot(1:10 ~ 1:10, panel=function(...) stop("foo")) > # -> Error in panel(x = 1:10, y = 1:10) : foo > > That is a little more informati

Re: [R] wire.frame tick labels from matrix

2008-02-15 Thread Deepayan Sarkar
On 2/15/08, Sundar Dorai-Raj <[EMAIL PROTECTED]> wrote: > > > Marlin Keith Cox said the following on 2/15/2008 11:39 AM: > > > Dear R Users, close to the end of this I used wireframe to create a 3D plot > > from a matrix. The x and y axis tick labels (1-6) for each were created > > from the mat

Re: [R] Set length of axes in lattice

2008-02-17 Thread Deepayan Sarkar
On 2/17/08, Saptarshi Guha <[EMAIL PROTECTED]> wrote: > Hello, > It is possible to set the aspect ratio of the Y-axis to the X-axis > in xyplot > (a) xyplot(y~x,aspect=1.8) > Suppose I have only 1 panel and i wish to set the length of the X- > axis to 2" keeping the sam

Re: [R] Change the color and lines of the legend using bwplot

2008-02-19 Thread Deepayan Sarkar
On 2/19/08, Tom Cohen <[EMAIL PROTECTED]> wrote: > Dear list, > > I have following plot, where I have set the color (red and green) and lines > (lty=2:3) in the panel.groups but can't not figure out how change the lines > and color of the legend in the "key" to the same lines and color as in th

Re: [R] Two bwplots in one single graph

2008-02-19 Thread Deepayan Sarkar
On 2/19/08, Tom Cohen <[EMAIL PROTECTED]> wrote: > Dear list, > > With the below codes, I got 8 bwplots but I would like to put 2 bwplots in > one single graph so that instead of 8 separate bwplots I would have 4 graphs, > each contains 2 bwplots. How can I do that? > > Another question is h

Re: [R] Setting a graph flushed to edges of axes

2008-02-19 Thread Deepayan Sarkar
On 2/19/08, Saptarshi Guha <[EMAIL PROTECTED]> wrote: > Hello, > I need to plot a line graph using lattice so that the endpoints are > flush with the left and right vertical axes. > So the scale end points and horizontal axes length should coincide. > This works > >

Re: [R] {lattice/grid} "Error using packet 1" and traceback

2008-02-19 Thread Deepayan Sarkar
On 2/14/08, Deepayan Sarkar <[EMAIL PROTECTED]> wrote: > On 2/14/08, Felix Andrews <[EMAIL PROTECTED]> wrote: > > You can tell Lattice to stop when an error occurs, like this: > > > > lattice.options(panel.error="stop") > > xyplot(1:10 ~ 1:10, pa

Re: [R] Minor tick marks

2008-02-25 Thread Deepayan Sarkar
On 2/24/08, Saptarshi Guha <[EMAIL PROTECTED]> wrote: > Hello, > Is there a way to add minor tick marks to the Y-axis of a lattice > plots? Yes, see http://lmdvr.r-forge.r-project.org/figures/figures.html?chapter=08;figure=08_05;theme=stdBW;code=right -Deepayan ___

Re: [R] Replacing plot symbols w/ subject IDs in xyplot()

2008-02-28 Thread Deepayan Sarkar
On 2/28/08, David Afshartous <[EMAIL PROTECTED]> wrote: > > > All, > > How does one replace plot symbols with say subject IDs when using xyplot? Or > superimpose them next to plot symbols? I searched the archives under > various key words but haven't had much. Any suggestions or links much >

Re: [R] reducing the number of x-axis lables in a bwplot while plotting all boxes

2008-02-29 Thread Deepayan Sarkar
On 1/7/08, Jeff D. Hamann <[EMAIL PROTECTED]> wrote: > I apologize if this is somewhere in the archives, but I can't seem to find > a solution to this question. > > I've been trying to plot a bwplot: > > print( > bwplot( n.pareto ~ as.factor(gen) | mut.rate * n.pop, > data=p6

<    1   2   3   4   5   >