[R] Fwd: correct line types in lattice legends

2009-06-06 Thread Deepayan Sarkar
[Forgot to CC r-help] -- Forwarded message -- From: Deepayan Sarkar To: Gerrit Draisma On 6/6/09, Gerrit Draisma wrote: > Hallo R-users, > I do not understand how to specify the correct > line and symbol types in the legends of a lattice xyplot. > This is

Re: [R] lattice::xyplot axis padding with fontfamily="mono"

2009-05-28 Thread Deepayan Sarkar
On Wed, May 27, 2009 at 4:38 PM, Benjamin Tyner wrote: > Hello, > > Say I have a predictor taking a very wide value: > >  Data <- data.frame(pred="a",resp=1) > >  print(xyplot(pred~resp, data=Data)) # enough y-axis padding to accommodate > the wide label > >

Re: [R] Barchart in lattice - wrong order of groups, data labels on top of each other, and a legend question

2009-05-21 Thread Deepayan Sarkar
On Thu, May 21, 2009 at 12:58 PM, Dimitri Liakhovitski wrote: > Deepayan, thank you very much for your response. > I have a general question. And please remember - I am really just a > beginner in R. > Is it truly the case that in order to build quite a basic bar chart > with value labels attache

Re: [R] Barchart in lattice - wrong order of groups, data labels on top of each other, and a legend question

2009-05-19 Thread Deepayan Sarkar
On Mon, May 18, 2009 at 11:47 AM, Dimitri Liakhovitski wrote: > Hello! > I have a question about my lattice barchart that I am trying to build > in Section 3 below. I can't figure out a couple of things: > 1. When I look at the dataframe "test" that I am trying to plot, it > looks right to me (the

Re: [R] Lattice scales question: using "at" when log = TRUE

2009-05-16 Thread Deepayan Sarkar
On 5/16/09, Afshartous, David wrote: > > > Thanks, but even with typo corrected as below the supplied marks are not > followed: > xyplot(y ~ t, type = "b", scales = list(y = list(log = TRUE, at = > c(10^1,10^2, 10^2.5, 10^3 > How so? Looks OK to me. -Deepayan > > > ___

Re: [R] assign unique size of point in xyplot

2009-05-15 Thread Deepayan Sarkar
On Thu, May 14, 2009 at 12:14 PM, Garritt Page wrote: > Hello,I am using xyplot to try and create a conditional plot.  Below is a > toy example of the type of data I am working with > > slevel <- rep(rep(c(0.5,0.9), each=2, times=2), times=2) > > tlevel <- rep(rep(c(0.5,0.9), each=4), times=2) > >

Re: [R] Problem with viewports, print.trellis and more/newpage

2009-05-14 Thread Deepayan Sarkar
On Thu, May 14, 2009 at 1:58 PM, Sebastien Bihorel wrote: > Dear R-users, > > I have got the following problem. I need to create 4x2 arrays of xyplot's on > several pages. The plots are created within a loop and plotted using the > print function. It seems that I cannot find the proper grid syntax

Re: [R] Strip labels: use xyplot() to plot columns in parallel with outer=TRUE

2009-05-14 Thread Deepayan Sarkar
On 5/9/09, John Maindonald wrote: > The following tinkers with the strip labels, where the > different panels are for different levelf of a conditioning > factor. > > tau <- (0:5)/2.5; m <- length(tau); n <- 200; SD <- 2 > x0 <- rnorm(n, mean=12.5, sd=SD) > matdf <- data.frame( >x = as.ve

Re: [R] creating a postscript file with two xyplots

2009-05-14 Thread Deepayan Sarkar
On 5/13/09, Liati wrote: > > Hi, > Thank you for your reply. > This is exactly what I have done. > However, I would like to get the two plots next to each other (to use as one > figure). Look at ?print.trellis and its examples. -Deepayan __ R-hel

Re: [R] Plotting counts vs. intervals for a shingle

2009-05-08 Thread Deepayan Sarkar
On Fri, May 8, 2009 at 1:30 PM, David Winsemius wrote: > > Took a bit of inspecting, looking at hidden functions, but this seems to do > it: > > library(lattice) >  a <- c(1:10, 5:10) >  b <- cbind(c(0,2.5,4.5,6.5), c(5.5,7.5,9.5,11)) >  c <- shingle(a, b) >  summary(c, showValues=FALSE) > > apply

Re: [R] centering axis labels in lattice

2009-05-08 Thread Deepayan Sarkar
On Fri, May 8, 2009 at 8:08 AM, Paul Boutros wrote: > Hello, > > I'm attempting to alter the location of text in my axis labels in lattice > plots and have been unsuccessful so far.  For example, the y-axis labels are > always right-justified, but I would like them to be horizontally centered. > >

Re: [R] display data ( text) on leveplot / Superpose panel

2009-05-08 Thread Deepayan Sarkar
On Thu, May 7, 2009 at 10:13 PM, kulwinder banipal wrote: > > I am trying to display data ion top of colored rectangle on the same > levelplot. While using superpose the shape and symbol for levelplot changes > to small circle. I am unable to figure what exactly I am doing wrong... It > may be

Re: [R] How to properly shade the background panels of an xyplot?

2009-05-07 Thread Deepayan Sarkar
On Thu, May 7, 2009 at 2:50 PM, Daniel Kornhauser wrote: > Hi: > > Here is simplified example of what I am having trouble with: > I want to set the gray shade of the background of each panel of a > xyplot with its mean. > My aim is to be able to compare at a glance which panel has the highest mean

Re: [R] levelplot question

2009-05-07 Thread Deepayan Sarkar
direction, the current behavior is probably best overall. > > -- > Gregory (Greg) L. Snow Ph.D. > Statistical Data Center > Intermountain Healthcare > greg.s...@imail.org > 801.408.8111 > > >> -Original Message- >> From: Deepayan Sarkar [mailto:deepayan.s

Re: [R] dotplot: labeling coordinates for each point

2009-05-07 Thread Deepayan Sarkar
), y[id], labels = sprintf("(%s,%g)", as.character(x[id]), y[id]), pos = 4) }) -Deepayan > > > > Best, > > Tony > > > > > > -Original Message----- > From: r-help-boun...@r-project.org [mailt

Re: [R] dotplot: labeling coordinates for each point

2009-05-06 Thread Deepayan Sarkar
;Revenue",main="test", xlim = ifelse(y > 90, sprintf("(%s,%g)", x, y), ""), scales=list(rot=60)) -Deepayan > > Best, > Tony > > -Original Message- > From: Deepayan Sarkar [mailto:deepayan.sar...@gmail.com] > Sent:

Re: [R] Add trend line to XYPlot using a subset of the original data

2009-05-06 Thread Deepayan Sarkar
On Wed, May 6, 2009 at 12:29 PM, kryberg wrote: > > 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,10),scales=list(x=list(at=c(1900,1920,1940,196

Re: [R] dotplot: labeling coordinates for each point

2009-05-06 Thread Deepayan Sarkar
On Tue, May 5, 2009 at 7:04 PM, Qifei Zhu wrote: > Hi Deepayan, > > Thanks for the hint. I spent some time on the research but haven't got any > luck in writing the custom panel function for the conditional labeling of > points in a graph. Could you please provide some more thoughts and probably

Re: [R] levelplot question

2009-05-06 Thread Deepayan Sarkar
On Tue, May 5, 2009 at 8:58 AM, Greg Snow wrote: > The function that is doing the color assignments is level.colors in the > lattice package. > Looking at the code confirms that the number of colors should be 1 less than > the length > of the at variable (the documentation implies that it should

Re: [R] levelplot question

2009-05-06 Thread Deepayan Sarkar
On Tue, May 5, 2009 at 12:00 AM, Antje wrote: > Hi Greg and all the others, > > thanks for your answer. The color-vector has the same length like the > at-vector but the recycling cannot be the reason, because only values > slightly above my "threshold" doe not appear blue. > I cannot find a good

Re: [R] Lattice: use levelplot as panel for wireframe

2009-05-06 Thread Deepayan Sarkar
On Tue, May 5, 2009 at 4:07 AM, Anton Bossenbroek wrote: > Hi, > > I want to draw a figure similar to > http://dsarkar.fhcrc.org/lattice/book/images/Figure_13_07_stdBW.png from > http://lmdvr.r-forge.r-project.org/figures/figures.html (figure 13.7) . > However instead of using a contour plot as a

Re: [R] lattice levelplot axis + custom annotations

2009-05-06 Thread Deepayan Sarkar
On Sat, May 2, 2009 at 8:05 PM, Alex Reynolds wrote: > On May 2, 2009, at 5:08 PM, David Winsemius wrote: > >> Not sure since you have not provided a reproducible example and not really >> defined what "annotations" means. > > By annotations, I mean that I want to draw an object (set of poiygon()

Re: [R] setting key boxes in xyplot

2009-05-06 Thread Deepayan Sarkar
On Fri, May 1, 2009 at 6:28 AM, David Winsemius wrote: > > On May 1, 2009, at 8:51 AM, steve_fried...@nps.gov wrote: > >> David and the list >> >> Yes the graph is produced with the code I submitted. However, I was not >> clear in my initial post. and it is totally my mistake for taking up >> ever

Re: [R] Understanding padding in lattice

2009-04-28 Thread Deepayan Sarkar
On Tue, Apr 28, 2009 at 11:51 AM, Sebastien Bihorel wrote: > Dear R-users, > > I am trying to understand what the different padding arguments in > trellis.par.set are exactly controlling the space around lattice plots. I > have used the following code as a basis for testing but it did not really >

Re: [R] latticeExtra: useOuterStrips and axis.line$lwd

2009-04-28 Thread Deepayan Sarkar
On Tue, Apr 28, 2009 at 7:40 AM, tyler wrote: > Hi, > > I'm working on some lattice wireframe figures that have two conditioning > factors, and I want the strips labelled on the top and left of the > entire plot, rather than above each individual panel. useOuterStrips() > does this, but it draws i

Re: [R] Grouping multiple runs of multiple datasets in lattice's xyplot

2009-04-28 Thread Deepayan Sarkar
On Mon, Apr 27, 2009 at 12:33 PM, Daniel Kornhauser wrote: > Hi: > > I don't know if my explanation below is clear, so afterwards, I wrote a > small a self contained annotated example that generates two plots. > I execute simulations with different parameters settings that create several > dataset

Re: [R] Changing color of points in violin plot

2009-04-28 Thread Deepayan Sarkar
On Mon, Apr 27, 2009 at 12:15 PM, John Poulsen wrote: > Hello, > > I am trying to graph a violin plot like the example in panel.violin(lattice) > with the singer data - see below > > Does anyone know how to change the color of the boxplot on the graph from > blue to green?  I tried a number of cha

Re: [R] generate individual panel keys/legends in lattice barchart

2009-04-28 Thread Deepayan Sarkar
On Thu, Apr 23, 2009 at 1:23 AM, Rebecca Fisher wrote: > > Dear R users. > I am wondering what is the simplest way is to generate individual keys for > each panel in a lattice barchart? > The help pages said: "To use more than one legend, or to have arbitrary > legends not constrained by the > s

Re: [R] Two 3D cones in one graph

2009-04-28 Thread Deepayan Sarkar
On Thu, Apr 23, 2009 at 4:22 AM, Jaakko Nevalainen wrote: > Dear R-users: > > The following code produces two cones in two panels. What I would like to > have is to have them in one, and to meet in the origin. Does anyone have any > good ideas how to do this? wireframe gets easily confused when n

Re: [R] Dropping 'empty' panels from lattice

2009-04-28 Thread Deepayan Sarkar
On 4/28/09, am...@xs4all.nl wrote: > How would I paste factors c1...c10 to one grouping factor? > > Can you give an example? In this case interaction would be conceptually more appropriate histogram(~Oversized | with(dat, interaction(c1, c2, c5, c6, c7, c8, c9, c10)), nint=21,layout=c

Re: [R] dotplot: labeling coordinates for each point

2009-04-26 Thread Deepayan Sarkar
On 4/26/09, Qifei Zhu wrote: > Hi David, > > Thanks! It looks much better now. but is there any way to add (x,y) > coordinates as labels to all the points in the graph? Best case if I can > enforce some conditions saying if (y>10,000) label, else no label. Any > advice is appreciated. Sure, w

Re: [R] How to custom the tick and type in bwplot

2009-04-24 Thread Deepayan Sarkar
On 4/24/09, David Winsemius wrote: > > On Apr 24, 2009, at 1:33 PM, Guanghong Zuo wrote: > > > > Dear R users > > > > I use bwplot to plot some figures. There are two troubles: > > > > 1. How to change the dot of the mean to a line, like the style in boxplot > > > > Sometimes you need to refer

Re: [R] RES: How to force axis to have the same range

2009-04-22 Thread Deepayan Sarkar
On 4/22/09, Sebastien Bihorel wrote: > Thanks to all the people who answer my question. It is know clear to know > how to produce a square shape graph... but I guess there is no easy way to > force the x and the y axis to have the same limits. If you mean the general case where you don't want to

Re: [R] Multiple Hexbinplots in 2 columns with a Single Categorical Variable

2009-04-20 Thread Deepayan Sarkar
On Thu, Apr 9, 2009 at 4:18 AM, Stuart Reece wrote: > Dear Ladies and Gentlemen, > >  I have a fairly large database (N=13,000) and a single main categorical > discriminator between the groups. > >  I want to look at the time course of a number of continuous biochemical > variables over chronolo

Re: [R] Numeric data calculated in bwplot

2009-04-17 Thread Deepayan Sarkar
On 4/17/09, Yuri Volchik wrote: > > Hi, > > i was wondering if there is a way to extract statistic calculated by the > function bwplot in numeric format, i.e. a list with values of borders mean > etc. See ?boxplot.stats -Deepayan __ R-help@r-proje

Re: [R] Lattice xyplot with text under x-axis

2009-04-16 Thread Deepayan Sarkar
On Wed, Apr 15, 2009 at 8:59 AM, kate.m wrote: > > Hi All, > > I have a data set which I need to plot and show the values of one of the > variables as a second x-axis. > > library(lattice) > year<-c(2001,2002,2003,2004,2005,2006) > fac<-c("arts","arts","arts","sci","sci","sci") > staff<-c(95,98,99

Re: [R] question on using lattice panel plots

2009-04-16 Thread Deepayan Sarkar
On Thu, Apr 16, 2009 at 1:45 PM, Sundar Dorai-Raj wrote: > Sorry, that should be: > > sigma <- as.numeric(levels(z$sigma)) > sigmaExprList <- lapply(sigma, function(s) bquote(sigma == .(s))) > sigmaExpr <- as.expression(sigmaExprList) > bwplot(Error~Method | sigma, data = z, >       horiz = F, xla

Re: [R] Lattice xyplot: Line and Rectangle in legend.

2009-04-14 Thread Deepayan Sarkar
On Tue, Apr 14, 2009 at 4:39 PM, jimdare wrote: > > Hello fellow R users, > > I have a problem.  I have created a barchart overlayed by an xyplot line, > both of which read off the same Y axis.  The problem comes when I try to > generate a key.  It seems that I can only create either two lines, or

Re: [R] Darker markers for symbols in lattice

2009-04-14 Thread Deepayan Sarkar
On Mon, Apr 13, 2009 at 9:37 AM, Naomi B. Robbins wrote: > Now that I have the markers the weight I want using lex, I'm having trouble > making the key > match the markers. Any suggestions? BTW, I'm using R2.8.1 with Windows > Vista. There's no real solution, but for some reason, the following se

Re: [R] using more plotting area for a lattice plot

2009-04-10 Thread Deepayan Sarkar
On Fri, Apr 10, 2009 at 11:23 AM, Juliet Hannah wrote: > Hi Group, > > For the plot below, are there other ways I can use more of the > plotting space. I've tweaked the parameters I know of. > I could also put the plot titles inside the plot if there is a way to > do that.  Thanks for your input.

Re: [R] Stacked density plots

2009-04-10 Thread Deepayan Sarkar
On Fri, Apr 10, 2009 at 1:53 PM, Judith Flores wrote: > > Hello R-community, > >    I want to generate stacked density plots in lattice. My data consist of a > numeric variable ('pid') that is measured in different individuals ('id'), > which can be divided in two types ('type') and the measurem

Re: [R] xyplot - show values of a series on graph

2009-04-08 Thread Deepayan Sarkar
On Wed, Apr 8, 2009 at 12:25 PM, taz9 wrote: > > Thank you very much for your help. I tried to use lattice but I'm not sure > how to restrict it to display only the values of "cars". > > xyplot(cars+trucks~year, data=df2, type="o", > panel=function(x,y,...){ >        panel.xyplot(x,y,...) >      

Re: [R] Lattice Groups

2009-04-08 Thread Deepayan Sarkar
On Wed, Apr 8, 2009 at 10:36 AM, Lyman, Mark wrote: > I don't understand your first question, but, since no one else has > responded I can answer your second question. panel.bwplot, unlike > panel.xyplot doesn't use panel.superpose when groups is not NULL. In > order to get an analogous result you

Re: [R] axis values on lattice log-scale plot

2009-04-08 Thread Deepayan Sarkar
On 4/7/09, Don McKenzie wrote: > I'm plotting the following (stripped of inessentials) > > xyplot(sd ~ distance | > wshed,data=sdvar.df,scales=list(x=list(log=TRUE),y=list(log=TRUE))) > > sdvar.df is a data frame, sd and distance are numeric, wshed is an ordered > factor > > trying to replicat

Re: [R] vectors on top of contours, and lattice

2009-04-08 Thread Deepayan Sarkar
On 4/8/09, Cable, Samuel B Civ USAF AFMC AFRL/RVBXI wrote: > OK, I needed to plot a set of vectors on top of a contour plot. I > figured out a way to do this. I create a panel function that calls > "larrows()" with arguments constructed from my vector data. Then, when > I go to do the contou

Re: [R] Tinn-R pdf()

2009-04-08 Thread Deepayan Sarkar
On 4/8/09, Tobias Verbeke wrote: > Hi Henning, > > > > thanks for your help, with solved the problem, although i don't why, > because when using the R editor accessible via the R console i created many > many lattice plots with the code i posted, i.e. without the print() command. > > > > At the c

Re: [R] contourplot label color

2009-04-06 Thread Deepayan Sarkar
On Mon, Apr 6, 2009 at 9:00 AM, bruno joly wrote: > Hi everyone, > > I am new to the list. > My problem is to change the color of the label in a contour plot. The plot > is quite dark and I'd like to have the line and label white, it works for > the line with a simple "col", but for the labels I n

Re: [R] Histogram with lattice with two 'conditional' variables

2009-04-02 Thread Deepayan Sarkar
On Thu, Apr 2, 2009 at 3:16 PM, Judith Flores wrote: > > Hello dear R-community, > >    I have been trying to figure out a way to generate histograms of a numeric > variable observed in different entities ('individual' below). Each one of > this entities is classified as "A" or "B" (according to

Re: [R] Lattice axis list (when relation = "free")

2009-04-02 Thread Deepayan Sarkar
On 4/2/09, In Hee Park wrote: > Thanks for your comment. Beside axis location, I have another > question for you. > > If I wanted to change the matrix column names shown on the lattice > plot, which argument should be used to handle it? (I'd like to know > the overall lattice plot level sche

Re: [R] Lattice axis list (when relation = "free")

2009-04-02 Thread Deepayan Sarkar
On 3/29/09, In Hee Park wrote: > Dear R users: > > > I am having difficulty to place x-axis location alternatively > top/bottom side in Lattice plot, which is composed of seven-column as > following: > > E1 E2 E3 E4 E5 E6 E7 > Case1 -505.85 -75.32

Re: [R] 3d cloud plot with point size reflecting variable value

2009-03-31 Thread Deepayan Sarkar
On Tue, Mar 31, 2009 at 11:49 AM, Deepayan Sarkar wrote: > On Tue, Mar 31, 2009 at 8:57 AM, Dieter Menne > wrote: >> R User R User googlemail.com> writes: >> >>> I'm using the cloud function to plot the iris data as per the document: >>> http://w

Re: [R] 3d cloud plot with point size reflecting variable value

2009-03-31 Thread Deepayan Sarkar
On Tue, Mar 31, 2009 at 8:57 AM, Dieter Menne wrote: > R User R User googlemail.com> writes: > >> I'm using the cloud function to plot the iris data as per the document: >> http://www.stat.ucl.ac.be/ISpersonnel/lecoutre/stats/fichiers/_gallery.pdf >> >> I'd like to change the point size to reflec

Re: [R] Darker markers for symbols in lattice

2009-03-30 Thread Deepayan Sarkar
On Sun, Mar 29, 2009 at 12:35 PM, Naomi B. Robbins wrote: > In lattice, using the command trellis.par.get for superpose.symbol, plot, > symbol and/or dot.symbol shows that we can specify alpha, cex, col, fill > (for  superpose.symbol and plot.symbol), font, and pch.  Trial and error > shows that t

Re: [R] Help with lattice

2009-03-28 Thread Deepayan Sarkar
On 3/24/09, steve_fried...@nps.gov wrote: > > Hello. > > I'm working on a windows XP machine with R 2.8.1 > > > I'm working with lattice and I don't understand how to set the size of the > text for the labels. Can anyone suggest a solution? > > I'm establishing a melted dataframe first and

Re: [R] using xyplot

2009-03-26 Thread Deepayan Sarkar
On 3/22/09, Santosh wrote: > Dear R-sians! > I am trying generate a bunch of xyplots > > library(lattice) > myPanel <- function(x,y,xl=range(x),yl=range(y),...) { > panel.xyplot(x,y,pch=20,col='blue',cex=0.7,xlim=xl,ylim=yl,...) > panel.abline(v=0, col='gray30',lty=2,lwd=1.5,...

Re: [R] Plots of different aspect ratios on one page, base aligned(trellis.print)

2009-03-25 Thread Deepayan Sarkar
On 3/10/09, Saptarshi Guha wrote: > Hello, > I have an example of a 2 paneled plot, with two different aspect > ratios displayed on one page. > An example would help > > n=20 > x1 <- cumsum(runif(n)) > x2 <- cumsum(runif(n)) > d <- data.frame(val=c(x1,x2),id=c(1:n,1:n), nt=c(rep("A",n),rep(

Re: [R] Grouped bwplots?

2009-02-20 Thread Deepayan Sarkar
On 2/20/09, Fredrik Karlsson wrote: > Dear list, > > I am sorry for asking you this, but I am trying to do again what I > thought I have done before, although this time it does not work. > > So, given the data set: > >> testdf <- data.frame(grfak=sample(c("One","Two"),size=100,replace=TRUE), >> pa

Re: [R] dotplot points color

2009-02-20 Thread Deepayan Sarkar
On 2/19/09, glaporta wrote: > > Dear list, > is it possible to change the background color of dotplot's points? I tried > in many ways but unsuccessfully > Thanks in advance > Gianandrea > > require(lattice) > dotplot(variety ~ yield | site, data = barley, groups = year, pch=21) > dotplot(variety

Re: [R] Printing out a graph using different graphics devices

2009-02-16 Thread Deepayan Sarkar
On 2/16/09, Dimitri Liakhovitski wrote: > Hello, everyone! > The code below allows me to produce the graph I want (I know - the > colors are strange, but it's just for the sake of an example). > After you run the plot<- part and then do print(plot) - that's what I want. > However, when I run t

Re: [R] help change auto.key colors in xyplot

2009-02-13 Thread Deepayan Sarkar
On Fri, Feb 13, 2009 at 11:22 AM, Dieter Menne wrote: > Dimitri Liakhovitski gmail.com> writes: > >> the code below works just fine to produce a dotplot. However, I am not >> successful changing the color of the lines in the legend (auto.key). >> If I add col=..., it only changes the color of the

Re: [R] How to tell if lattice is current device?

2009-02-11 Thread Deepayan Sarkar
On Wed, Feb 11, 2009 at 3:40 PM, Remko Duursma wrote: > Dear R-helpers, > > I have a function that adds some segments to the current plot, but if > I the current plot is made with any of the lattice functions (in my > case, levelplot), > I should use lsegments rather than segments. > > How can I t

Re: [R] lattice shingle with time and date format

2009-02-11 Thread Deepayan Sarkar
On Tue, Feb 10, 2009 at 6:29 AM, Jon Loehrke wrote: > Hi R-Users, > > I have a time series of bivariate observations (x,y,t). I've > developed a few panel routines to explore certain aspects of the data, > and now would like to break the time series up into smaller chunks to > explore the tempora

Re: [R] Help with XYPLOT with marginal histograms

2009-02-11 Thread Deepayan Sarkar
On Wed, Feb 11, 2009 at 12:37 PM, John Leonard wrote: > I am trying to replicate the following plot using Lattice: > > http://addictedtor.free.fr/graphiques/graphcode.php?graph=78 Why? lattice is not the right tool for this. Try looking at http://www.stat.wisc.edu/~deepayan/771/esplot.R with

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] 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] 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] 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-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] 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: 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] Identifying a subset of observations on a 3d-scatter plot using cloud()

2008-12-08 Thread Deepayan Sarkar
On Sat, Dec 6, 2008 at 9:27 PM, Giam Xingli <[EMAIL PROTECTED]> wrote: > Hello everyone, > > This is my first post to the mailing list, so I hope I am posting my message > the correct way. > > I am trying to present my dataset in a 3d scatterplot using cloud() in the > {lattice} package. I hope t

Re: [R] custom panel help in lattice

2008-12-08 Thread Deepayan Sarkar
On Sun, Dec 7, 2008 at 9:37 AM, Jon Loehrke <[EMAIL PROTECTED]> wrote: > Hi, > > I am having an issue with a custom panel for lattice. The problem > comes when I try passing a groups argument. > > Here is the custom panel, a wrapper for smooth spline. I copied > panel.loess and replaced the loess

Re: [R] how do I eliminate excess levels in lattice contourplot key / legend?

2008-12-03 Thread Deepayan Sarkar
On Wed, Dec 3, 2008 at 9:13 AM, Seth W Bigelow <[EMAIL PROTECTED]> wrote: > I'm working on a contourplot( ) graph, the subject of several previous > posts to this list. The contours express probabilities from 0 - 1, but the > key that is automatically generated by contourplot pads the probability >

Re: [R] legend idea for latticeExtra

2008-12-02 Thread Deepayan Sarkar
On 12/2/08, baptiste auguie <[EMAIL PROTECTED]> wrote: > Dear list, > > > I've written a small utility function to add arbitrary legend(s) to a > lattice graph (or a combination of them), much like the legend function of > base graphics. I though perhaps it could be useful to someone else, or > im

Re: [R] align two lattice plots with grid

2008-12-01 Thread Deepayan Sarkar
On Mon, Dec 1, 2008 at 8:13 AM, baptiste auguie <[EMAIL PROTECTED]> wrote: > Dear list, > > I need to align two plots on top of each other for comparison (they only > have the x-axis in common). When the y-labels have a different extent, I > cannot find a way to align the x-axes, as illustrated bel

Re: [R] title second y-axis in lattice plot

2008-11-25 Thread Deepayan Sarkar
On 11/25/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Dear R-users, > > After adding the secondary y-axis at the right side of a lattice xyplot > (cfr. Lattice: Multivariate Data Visualization with R - figures 8.4 and 8.6, > from http://lmdvr.r-forge.r-project.org/figures/figures.html), I

Re: [R] Superimposing y-variables in Lattice formulas

2008-11-17 Thread Deepayan Sarkar
On Sun, Nov 16, 2008 at 7:27 PM, Stavros Macrakis <[EMAIL PROTECTED]> wrote: > Thank you for the pointer to your paper "Getting Started with Lattice > Graphics" -- it looks very useful. > > I think we're talking past each other on the question of the semantics > of formula operators, and it's proba

Re: [R] An array of an array of boxplots in lattice

2008-11-17 Thread Deepayan Sarkar
On Mon, Nov 17, 2008 at 11:15 AM, Chuck Cleland <[EMAIL PROTECTED]> wrote: > On 11/17/2008 1:50 PM, steve wrote: >> Using the data set fgl in MASS the following code >> >> layout(matrix(1:9,3,3)) >> for(i in 1:9){ >> boxplot(fgl[,i] ~ type, data = fgl,main=dimnames(fgl)[[2]][i])} >> >> produces a 3

Re: [R] Superimposing y-variables in Lattice formulas

2008-11-16 Thread Deepayan Sarkar
ware developers. Having said that, try looking at http://www.bioconductor.org/workshops/2008/BioC2008/labs/lattice/ for a holistic intro to lattice (in addition to the resources mentioned in help(Lattice)). > On Sat, Nov 15, 2008 at 2:54 PM, Deepayan Sarkar > > <[EMAIL PROTECTED]> wrote: >

Re: [R] Superimposing y-variables in Lattice formulas

2008-11-15 Thread Deepayan Sarkar
On 11/15/08, Stavros Macrakis <[EMAIL PROTECTED]> wrote: > On Fri, Nov 14, 2008 at 6:55 PM, Deepayan Sarkar > <[EMAIL PROTECTED]> wrote: > >> ...But how do I specify that I want to display all the Subjects on a... > single graph, superimposing them all? > &g

Re: [R] Superimposing y-variables in Lattice formulas

2008-11-14 Thread Deepayan Sarkar
On Fri, Nov 14, 2008 at 1:23 PM, Stavros Macrakis <[EMAIL PROTECTED]> wrote: > Given a data frame of a categorical variable and two continuous > variables, I would like to display one continuous variable against the > other for each value of the categorical variable, all superimposed on > the same

Re: [R] Splitting a lattice stripplot across several pages

2008-11-13 Thread Deepayan Sarkar
On Thu, Nov 13, 2008 at 4:57 PM, Saptarshi Guha <[EMAIL PROTECTED]> wrote: > Hello, >I have a stripplot with 200+ labels i.e i have network connections. > The y-axis are the server port numbers and am graphing the number of > packets in a connection. Roughly >stripplot(totpacks~port

Re: [R] Retrieving x argument name from a trellis object in R 2.8.0

2008-11-12 Thread Deepayan Sarkar
On Wed, Nov 12, 2008 at 7:41 AM, <[EMAIL PROTECTED]> wrote: > > Dear Deepayan, > > thanks for you quick response. > > The main idea is to use trellis_object$call$x as a label in a tcltk > interface to choose one among several plots and perform a given task (e.g. > print on screen, export as pdf e

Re: [R] An example of the boxplot thickness problem

2008-11-12 Thread Deepayan Sarkar
ee 'box.width' values. Since the third value is NA, this shouldn't cause any problems. -Deepayan > El mar, 11-11-2008 a las 21:21 -0800, Deepayan Sarkar escribió: > > > On 11/11/08, Kenneth Roy Cabrera Torres <[EMAIL PROTECTED]> wrote: > > > Hi R

Re: [R] Retrieving x argument name from a trellis object in R 2.8.0

2008-11-11 Thread Deepayan Sarkar
On 11/11/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Dear all, > > let consider the following function: > > Fun1 <- function() { > library(lattice) > plot1 <- 1:10~1:10 > pl1 <- xyplot(plot1) > return(pl1$call$x) > } > > In R 2.5.0 (or older version) we have > > > Fun1() > plot

Re: [R] An example of the boxplot thickness problem

2008-11-11 Thread Deepayan Sarkar
On 11/11/08, Kenneth Roy Cabrera Torres <[EMAIL PROTECTED]> wrote: > Hi R users: > > I reproduce the problem that I have with the > boxplot thickness: > -- > # A data frame: > set.seed(123) > cont1<-c(rnorm(10,1),rnorm(5,3),rnorm

<    1   2   3   4   5   6   7   8   >