Re: [R] adding text to y-axis per row of panels (lattice)

2011-01-28 Thread Deepayan Sarkar
On Thu, Jan 20, 2011 at 2:04 PM, E Hofstadler wrote: > Dear all, > > Being a newbie to R, I've trawled through many old posts on this list > looking for a solution to my problem, but unfortunately couldn't quite > figure it out myself. I'd be very grateful if someone here on this > list could perh

Re: [R] circular reference lines in splom

2011-01-28 Thread Deepayan Sarkar
On Thu, Jan 20, 2011 at 9:45 AM, Max Kuhn wrote: > Hello everyone, > > I'm stumped. I'd like to create a scatterplot matrix with circular > reference lines. Here is an example in 2d: > > library(ellipse) > > set.seed(1) > dat <- matrix(rnorm(300), ncol = 3) > colnames(dat) <- c("X1", "X2", "X3") >

Re: [R] Help for lattice. par(new=TRUE)

2011-01-28 Thread Deepayan Sarkar
On Fri, Jan 21, 2011 at 8:22 PM, Fabrice Tourre wrote: > Hi list, > I want to plot two plot in the same figure. I set par(new=TRUE). But > it does not work. > > library(lattice) > myPanel <- function(x,...) > { >       panel.histogram(x,alpha=0.4,...) >       ltext(0.4,1.5,paste("Mean=","0.05",dig

Re: [R] adding text to y-axis per row of panels (lattice)

2011-01-28 Thread Deepayan Sarkar
On Fri, Jan 28, 2011 at 5:21 PM, E Hofstadler wrote: > Hello Deepayan, > > many thanks for your reply and help. Does this solution with > "ylab.right" require a newer version of lattice (somewhere in the > archives I noted "ylab.right" being mentioned in the context of a > development version of l

Re: [R] text labels in Trellis plot

2011-01-29 Thread Deepayan Sarkar
On Wed, Jan 26, 2011 at 4:24 PM, Markus Damian wrote: > Dear all, > > I need to generate plots in which the points of the plot are replaced > by text labels, such as "dog" and "cat". The usual way of specifying > the plotting symbol with pch works only if the labels are single > characters, as far

Re: [R] lattice: Synchronizing key and lines; or: why is lty used as lwd in legend?

2011-02-08 Thread Deepayan Sarkar
On Mon, Feb 7, 2011 at 1:10 PM, Dieter Menne wrote: > Dear latticists, > > Getting legend and graph line types synchronized has been a challenge in > lattice; the last example below that works looks ridiculously ugly for such > a simple job, I am sure there is a more elegant solution. > > When try

Re: [R] Suppress only Z axis tick marks and numbers in wireframe statement

2011-02-08 Thread Deepayan Sarkar
On Fri, Feb 4, 2011 at 9:21 PM, Matthew A. H. Walters wrote: > I actually have several questions revolving around the generation of > wireframe plots. > > > > The most pressing is that which is described by the subject line. > > > > I am trying to produce a figure with x, y, and z labels, but only

Re: [R] lattice auto.key gives mismatch colors

2011-02-13 Thread Deepayan Sarkar
On Fri, Feb 11, 2011 at 9:26 PM, John Smith wrote: > Hello All, > > I am using the following code to draw a figure. But the legend given buy > auto.key has mismatched colors. Could any one help me? See ?simpleTheme -Deepayan > I am using R2.12.1 and most current lattice on windows XP. > > Thank

Re: [R] Adding labels into lattice's barchart

2011-02-14 Thread Deepayan Sarkar
On Wed, Feb 9, 2011 at 11:04 PM, Luca Meyer wrote: > *** APOLOGIZES FOR THOSE READING THE LIST THROUGH NABBLE THIS WAS ALREADY > POSTED THERE BUT NOT FORWARDED TO THE LIST FOR SOME UNKNOWN REASON *** > > I have a dataset that looks like: > > $ V1: factor with 4 levels > $ V2: factor with 4 levels

Re: [R] Adding labels into lattice's barchart

2011-02-14 Thread Deepayan Sarkar
On Mon, Feb 14, 2011 at 5:16 PM, Luca Meyer wrote: > Thanks Deepayan, > > What you suggest is quite fine, but provides the overall number of cases for > the entire dataset splitted into V2 levels. > > What about if I need to show panel specific's values? For instance I want to > show not the tot

Re: [R] Use of panel.segments

2011-02-17 Thread Deepayan Sarkar
On Tue, Feb 15, 2011 at 9:44 PM, Lancaster, Vicki wrote: > > First I have read all the previous post on error bars & segments as well as > the  Lattice book by Sarkar. > > I am using xyplot, there are 2 panels, each panel displays the measurements > from 5 matrices over time.  The matrices are i

Re: [R] Scaling Lattice Graphics for tikzDevice

2011-02-18 Thread Deepayan Sarkar
On Fri, Feb 18, 2011 at 11:04 PM, Elliot Joel Bernstein wrote: > I'm trying to use lattice graphics to produce some small plots for inclusion > in a LaTeX file. I want the LaTeX fonts to be used in the plots, but to be > scaled down to match the size of the plot. I have written the following cod

Re: [R] Scaling Lattice Graphics for tikzDevice

2011-02-20 Thread Deepayan Sarkar
On Sun, Feb 20, 2011 at 5:23 AM, Elliot Joel Bernstein wrote: > > On Feb 18, 2011 11:02 PM, "Deepayan Sarkar" > wrote: >> >> On Fri, Feb 18, 2011 at 11:04 PM, Elliot Joel Bernstein >> wrote: >> > I'm trying to use lattice graphics to produce

Re: [R] how can I connect paired points within lattice bwplot?

2011-02-22 Thread Deepayan Sarkar
On Wed, Feb 23, 2011 at 8:01 AM, Peter Ehlers wrote: > On 2011-02-22 11:52, Cory Champagne wrote: >> >> Hello all, >> my first post to this list.  I do a lot of experiments using a paired >> sampling design and I would get a lot of mileage out of figures like >> this, if I can make it work!  Any a

Re: [R] wireframe() display a graph with two colors, not a gradient.

2011-03-07 Thread Deepayan Sarkar
On Sun, Feb 27, 2011 at 1:29 AM, James Platt wrote: > Hi all, > > I'm quite new to wireframe, essentially what I want to do is display a graph, > and z-values > 1 would be yellow and those < 1 would be blue. > This is a bit of my data. > > 0.334643563     0.350913807     0.383652307 > 0.370325283

Re: [R] Same color key for multiple lattice contour plots

2011-03-07 Thread Deepayan Sarkar
On Mon, Feb 21, 2011 at 5:29 AM, joepvanderzanden wrote: > > Hi all, > > I'm trying to make multiple lattice contour plots which have the same color > key, to allow good comparisons. However, I run into some problems when > fitting the plots to the color key. Basically my strategy to tackle this >

Re: [R] lattice (panel.3dscatter): how to make plot symbol thicker?

2011-03-10 Thread Deepayan Sarkar
On Wed, Mar 9, 2011 at 7:57 AM, Peter Ehlers wrote: > On 2011-03-08 17:07, Jannis wrote: >> >> Searching the archive of the mailing list points to the following thread: >> >> https://stat.ethz.ch/pipermail/r-help/2009-March/193338.html >> >> Perhaps it helps you... >> >> On 03/08/2011 11:48 PM, Ma

Re: [R] Lattice: Feature Request

2011-03-13 Thread Deepayan Sarkar
On Sat, Mar 12, 2011 at 1:30 AM, Jim Price wrote: > Thanks Peter. > > This is true, but consider this continuation of my example (which is > probably what I should have written originally): > > > my.opts <- list(default.args = list( >                       as.table = TRUE, >                      

Re: [R] Bug in lattice auto.key argument

2011-03-17 Thread Deepayan Sarkar
On Wed, Mar 16, 2011 at 12:52 AM, wrote: > The Lattice auto.key argument has a bug in R.12.2. > > R version 2.12.2 (2011-02-25) > Platform: i386-pc-mingw32/i386 (32-bit) > > other attached packages: > [1] lattice_0.19-17 > > loaded via a namespace (and not attached): > [1] grid_2.12.2 > > If

Re: [R] lattice: wireframe "eats up" points; how to make points on wireframe visible?

2011-03-30 Thread Deepayan Sarkar
On Fri, Mar 4, 2011 at 1:47 PM, Marius Hofert wrote: > Dear expeRts, > > I would like to add two points to a wireframe plot. The points have (x,y,z) > coordinates > where z is determined to be on the wireframe [same z-value]. Now something > strange > happens. One point is perfectly plotted, the

Re: [R] lattice: wireframe "eats up" points; how to make points on wireframe visible?

2011-04-01 Thread Deepayan Sarkar
On Thu, Mar 31, 2011 at 3:26 AM, Marius Hofert wrote: > Dear Deepayan, > > thanks for answering. It's never too late to be useful. > > I see your point in the minimal example. I checked the z-axis limits in my > original problem for the point to be inside and it wasn't there. I can't > easily > r

Re: [R] lattice xscale.components: different ticks on top/bottom axis

2011-04-01 Thread Deepayan Sarkar
On Fri, Mar 11, 2011 at 12:28 AM, wrote: > Good afternoon, > > I am trying to create a plot where the bottom and top axes have the same > scale but different tick marks.  I tried user-defined xscale.component > function but it does not produce desired results.  Can anybody suggest > where my use

Re: [R] lattice (panel.3dscatter): how to make plot symbol thicker?

2011-04-01 Thread Deepayan Sarkar
On Fri, Mar 11, 2011 at 12:29 PM, Marius Hofert wrote: > Dear Deepayan, > > many thanks for answering. > > Another thing I am wondering is the following: I know you can have (3d-like) > "crosses" in the wireframe plot. But are there any other 3d-like plot > symbols? Of course one can use differe

Re: [R] XYPlot Conditioning Variable in Specific, Non-Alphanumeric Order. -- Resending with corrected .txt file

2011-04-01 Thread Deepayan Sarkar
On Sat, Mar 19, 2011 at 2:53 AM, Guy Jett wrote: > Due to an error on my part, I have renamed the previously attached file from >  T_5-04b_LTC-SE-SO-Compared.csv to >  T_5-04b_LTC-SE-SO-Compared.txt. > It remains a comma-delimited file so the extension can be changed and used > per the script, or

Re: [R] lattice histogram function and groups

2011-04-01 Thread Deepayan Sarkar
On Sat, Mar 19, 2011 at 6:11 AM, Evans, David G (DFG) wrote: > Hi, > > >From the following code (tweaked from another user): > > > > variable<-sample(rep(1:2,100)) > > individual<-rep(1:3, length(variable)) > > group<-rep(LETTERS[1:2],length(variable)/2) > > mydata<-data.frame(variable,individual,

Re: [R] Colour makes my life; but not my bwplot (panel.violin)

2011-04-01 Thread Deepayan Sarkar
On Fri, Mar 25, 2011 at 3:59 PM, JP wrote: > Hi there David, > > Many thanks for your time and reply > > I created a small test set, and ran your proposed solution... and this is > what I get http://i.imgur.com/vlsSQ.png > This is not what I want - I want separate grp_1 and grp_2 panels and in eac

Re: [R] bwplot [lattice]: how to get different y-axis scales for each row?

2011-04-01 Thread Deepayan Sarkar
On Sun, Mar 27, 2011 at 8:50 PM, Marius Hofert wrote: > Dear expeRts, > > I partially managed to obtain what I wanted by using latticeExtra. However, > the > following questions remain: > 1) why do not all x-axis labels appear? [compare bw and bw2] You have unnecessarily asked for relation="free

Re: [R] lattice: how to "center" a subtitle?

2011-04-05 Thread Deepayan Sarkar
On Tue, Apr 5, 2011 at 6:12 AM, David Scott wrote: [...] > I am not sure where I read it and I can't find it again, but my > understanding is that expressions using bquote with lattice need to be > enclosed in as.expression() to work. That is in contrast to what happens in > base graphics. > > H

Re: [R] lattice xscale.components: different ticks on top/bottom axis

2011-04-05 Thread Deepayan Sarkar
On Sat, Apr 2, 2011 at 1:29 AM, wrote: > >> On Fri, Mar 11, 2011 at 12:28 AM, >> wrote: >> > Good afternoon, >> > >> > I am trying to create a plot where the bottom and top axes have the >> > same scale but different tick marks.  I tried user-defined >> > xscale.component function but it does no

Re: [R] how to label customized y axis when using lattice parallel parameter common.scale=TRUE

2011-04-05 Thread Deepayan Sarkar
On Tue, Apr 5, 2011 at 4:39 PM, Pengcheng Yang wrote: > Dear all, > > When I use parallel function in lattice package, I want to label the y-axis > with customized numbers. Like this: > > parallel(~iris[1:4] | Species, iris,horiz=FALSE,common.scale=TRUE, >    scales=list(y=list(at=c(0,2,3 Par

Re: [R] Arrangement of Lattice Histograms - Top to bottom and then left to right?

2011-04-05 Thread Deepayan Sarkar
On Wed, Apr 6, 2011 at 12:34 AM, Bert Gunter wrote: > Look for the index.cond argument at the bottom of the Help page for xyplot. > -- Bert Also ?print.trellis and ?packet.panel.default for a more general (non-example-specific) approach. -Deepayan > On Tue, Apr 5, 2011 at 11:37 AM, Les wrote:

Re: [R] dotplot as a background for multiple barchart plots (with Lattice)

2011-04-07 Thread Deepayan Sarkar
On Thu, Apr 7, 2011 at 7:16 PM, Christian Charles wrote: > Hi R users, > > I'm kind stuck in my R experience... > I want to have a multiple barchart with n windows, but with the same > background for each window, and I want that background to be a recorded > dotplot. > First, is it possible ? > If

Re: [R] lattice: par.settings: custom axis.line by panel

2011-04-07 Thread Deepayan Sarkar
On Fri, Apr 8, 2011 at 6:10 AM, Benjamin Tyner wrote: > Hello, > > In lattice, is there a way to customize the axis.line by panel? For example, > say I have two panels: > > Data <- data.frame(x=runif(10), >                  y=rnorm(10), >                  f=gl(2,5) >                  ) > > library

Re: [R] Adding text labels to lattice plots with multiple panels

2011-04-11 Thread Deepayan Sarkar
On Mon, Apr 11, 2011 at 12:49 AM, Jeff Stevens wrote: > Many thanks, Peter.  This works brilliantly, and I prefer to have the > labels assigned outside of panel function as well. You could also consider using which.packet(). You haven't explicitly told us how the labels are matched with the boxpl

Re: [R] Override col.lines and col.symbol in panel.xyplot with type='b'

2011-04-12 Thread Deepayan Sarkar
On Mon, Apr 11, 2011 at 9:27 PM, Szumiloski, John wrote: > Dear useRs, > > I have a longitudinal experiment with several treatment groups, ~20 subjects > per group, ~6 timepoints and a continuous dependent variable.  I have been > successfully been using lattice::xyplot with this data.  However,

Re: [R] Adding margin text to lattice graphics

2011-04-12 Thread Deepayan Sarkar
On Mon, Apr 11, 2011 at 3:53 AM, baptiste auguie wrote: > Yes, very sorry about this -- I had subconsciously ignored the > hypothetical possibility that anyone wouldn't have ggplot2 loaded in > their .Rprofile ;) > > Replacing mpg with beaver1 (datasets) should be more reproducible. > > That being

Re: [R] different colors in a segplot centers (package latticeExtra)

2011-04-18 Thread Deepayan Sarkar
On Mon, Apr 18, 2011 at 4:10 AM, barbara costa wrote: > Hi, > how can I change colors in the centers of my segplot? > I'm not interested in coloring the lines (Standard error limits) but the > centers (means)? >  here's my code: > > > segplot(reorder(factor(Species), MeanBiom)  ~ MinSEBiom + MaxSE

Re: [R] Define ylim in lattice plot based upon panel function output

2011-04-18 Thread Deepayan Sarkar
On Tue, Apr 19, 2011 at 7:38 AM, Sébastien Bihorel wrote: > Dear R-users, > > By default, the xyplot function automatically defines the axis ranges based > upon the content of y and x variables. However, when one includes some calls > to other panel. functions in the panel argument, the results >

Re: [R] current.panel.limits() of lattice returning NaN limits - why?

2011-08-12 Thread Deepayan Sarkar
On Fri, Aug 12, 2011 at 12:15 PM, Fredrik Karlsson wrote: > Hi, > > I need a custom axis function for a plot, but it seems > that current.panel.limits() sometimes returns NaN limits for the plot, which > it much harder to calculate anything sensible. > An illustration: > > Given this axis function

Re: [R] lattice: How to get log base for each axis inside panel function?

2011-08-15 Thread Deepayan Sarkar
On Mon, Aug 15, 2011 at 10:34 PM, Mikhail Titov wrote: > Hello! > > I'd like to have a function to draw correct grid while using log axis with > xyplot from lattice package. Right now I have the following code inside of my > panel function: > > lim <- current.panel.limits() > v <- latticeExtra::

Re: [R] Constructing an additional key inside of a lattice panel

2011-08-17 Thread Deepayan Sarkar
On Tue, Aug 16, 2011 at 4:35 PM, Fredrik Karlsson wrote: > Hi, > > I would like to add an additional key inside of a panel based on a factor > that is not the "groups" argument. > I've tried using the panel.key function in latticeExtras, but I cannot get > the line types the way I want it. > > Usi

Re: [R] dotchart vs. dotplot ... groups

2011-08-18 Thread Deepayan Sarkar
On Wed, Aug 17, 2011 at 11:59 PM, wrote: > I'm trying to create a dotplot with some grouping. > > I've been able to create what I want using dotchart (basic graphics), but > can't quite get it using dotplot (lattice). I prefer to use lattice (or > ggplot2) because I think it's a bit easier to c

Re: [R] Auto key legend does not match plot

2011-08-22 Thread Deepayan Sarkar
On Sat, Aug 20, 2011 at 3:53 AM, markm0705 wrote: > Dear R-help members.  I am an 'R-learner' (about 6 hours so far) using the > lattice library to create a ranked dotplot and am colour coding the dots by > a variable called "Commodity".  However when i use autokey to make a legend > the size (cex

Re: [R] Suppressing error messages printed in xyplot() with panel function

2011-08-24 Thread Deepayan Sarkar
On Thu, Aug 25, 2011 at 1:00 AM, Adam Zeilinger wrote: > Hello, > > I am using the xyplot() function to create a series of scatterplot panels > with lines of best fit.  To draw the lines of best fit for each panel, I am > using a panel function.  Here's an example: > >> species <- as.character(c(r

Re: [R] Sorting order of reorder with multiple variables

2011-08-26 Thread Deepayan Sarkar
On Thu, Aug 25, 2011 at 6:15 PM, markm0705 wrote: > I've been building a ranked dot plot for several days now and am sorting the > data using the reorder command.  What I don't understand is how reorder > works when mutiple varibles are plotted by grouping.  In the example below > I'm using re-ord

Re: [R] Getting the values out of histogram (lattice)

2011-09-05 Thread Deepayan Sarkar
On Thu, Sep 1, 2011 at 10:29 AM, Rolf Turner wrote: > > 'Scuse me, but I don't see anything in your example relating to what the OP > asked for. She wanted to get at the ``actual data defining the histogram'', > which > I interpret as meaning the bar heights (the percentages, density values, or >

Re: [R] Adding groups to regression line panel function in Lattice

2011-09-11 Thread Deepayan Sarkar
On Fri, Sep 9, 2011 at 9:38 PM, Bigelow, Seth wrote: > I wish to display a single-panel Lattice figure with grouped data and fitted > regression lines. I don't seem to be able to get the > individual regression lines to display, e.g.; > > d <- data.frame(q = rep(1:6, each=10), cc = rep(seq(10,100

Re: [R] Move the x-axis labels to the top of the dotplot

2011-09-16 Thread Deepayan Sarkar
On Thu, Sep 15, 2011 at 2:29 PM, markm0705 wrote: > Dear R helpers > > I would like to move the x-axis labels, which plot automatically at the base > of a dot plot to the top of the plot. Is there a way to do this? Use 'alternating=2' in scales: scales = list(x = list(log = 10, alternating =

Re: [R] Move the main titel to the left of the plot

2011-09-16 Thread Deepayan Sarkar
On Thu, Sep 15, 2011 at 2:26 PM, markm0705 wrote: > Dear R helpers > > I wish to move the main title, which appears on a dotplot to be right > aligned with the left axis. It's horizontally centered in the full plot area by default. > Is there are parameter associated with dotplot > 'main' that a

Re: [R] Lattice xyplot log scale labels help!

2011-09-16 Thread Deepayan Sarkar
On Fri, Sep 16, 2011 at 2:17 AM, Cram Rigby wrote: > I have a problem with lattice log scales that I could use some help with. > > I'm trying to print log y-axis scales without exponents in the labels. >  A similar thread with Deepayan' recommendation is here: > http://tolstoy.newcastle.edu.au/R/e

Re: [R] Superimposing titles on dotcharts

2011-09-16 Thread Deepayan Sarkar
On Mon, Sep 12, 2011 at 8:54 PM, Mikkel Grum wrote: > I've created a chart with times that employees have entered data on named > tasks as in the following example: > > Employee <- c(rep("Tom", 127), > rep("Dick", 121), > rep("Sally", 130) > ) > Time <- c(seq(as.POSIXct("2011-09-12 07:00:00"), as

Re: [R] histogram fill lattice

2012-06-15 Thread Deepayan Sarkar
On Wed, Jun 13, 2012 at 8:10 PM, David Winsemius wrote: > > On Jun 13, 2012, at 9:55 AM, Powell, Jeff wrote: > >> >> Dear all, >> >> I would like to change the "fill" pattern of a histogram using histogram() >> in the lattice package.  I know how to do so using hist(), but would prefer >> to stay

Re: [R] how to add a vertical line for each panel in a lattice dotplot with log scale?

2012-06-15 Thread Deepayan Sarkar
On Mon, Jun 11, 2012 at 1:10 PM, maxbre wrote: > sorry but I can't close this thread with a viable solution other than the > following one > (i.e. by defining an user function to add line); > > I understand that the problem is related to the fact that: > mean(log(.)) != log(mean(.)) is > but for s

Re: [R] Adding title to colorkey

2012-06-18 Thread Deepayan Sarkar
On Sat, Jun 16, 2012 at 2:10 PM, Stephen Eglen wrote: > > A recent paper on visualisation (in Neuron, a leading neuroscience > journal) surveyed how well previous articles in this journal labelled their > graphs (e.g. axis labelling and describing their error bars).  Of > particular interest is th

Re: [R] some help to improve "hist to plot relative frequencies"

2012-06-18 Thread Deepayan Sarkar
On Fri, Jun 15, 2012 at 9:22 PM, gianni lavaredo wrote: > Dear Researches, > > sorry for disturb. I wish to improve my figure in R plotting the relative > frequencies of my data set. > > library(lattice) > a <- c(0,0,0,1,1,2,4,5,6,7,7,7,7,7,8,8,8,8,9,9,9,9,10,10,11) > histogram(a, xlab="myData") >

Re: [R] aligning axis labels in a colorkey from levelplot

2012-06-18 Thread Deepayan Sarkar
On Sat, Jun 16, 2012 at 1:41 PM, Stephen Eglen wrote: > R does a great job with the fine details regarding plots.  e.g in the > following: > > library(lattice) > y <- -4:4/10 > xyplot(y~1, las=1) > > the y axis is labelled with numbers -0.4, -0.2, 0.0, 0.2, 0.4 with the > numbers aligned on the de

Re: [R] exact relative positioning of lattice plots

2012-06-20 Thread Deepayan Sarkar
On Wed, Jun 20, 2012 at 9:26 AM, John G. Bullock wrote: > > Hello, > > I have two lattice plots for which panel.height is fixed.  I am trying to > position them > in a column so that there is exactly half an inch of vertical space between > them. > This would be a simple task if I were not fixin

Re: [R] how to make a histogram with percentage on top of each bar?

2012-06-22 Thread Deepayan Sarkar
On Thu, Jun 21, 2012 at 10:56 PM, york8866 wrote: > I have a dataset like the following: > ID      DV > 1       0.868576818 > 2       0.337120116 > 3       0.029233775 > 4       0.719783525 > 5       0.976631182 > 6       0.672941605 > 7       0.13239462 > 8       0.99936475 > 9       0.91540604 >

Re: [R] exact relative positioning of lattice plots

2012-06-22 Thread Deepayan Sarkar
On Wed, Jun 20, 2012 at 7:18 PM, John G. Bullock wrote: > >> In your actual use case, are there any annotations outside the panel >> (tick marks, labels, etc.)? Things would be much simpler if not (as in >> your example). In that case, just call the suitable panel function >> after setting up the

Re: [R] aligning axis labels in a colorkey from levelplot

2012-06-22 Thread Deepayan Sarkar
On Tue, Jun 19, 2012 at 10:55 PM, Stephen Eglen wrote: >> >> Justification is hard-coded, and that's not easy to change. This is >> not only for the colorkey; e.g., >> >>   xyplot(y~1, scales = list(alternating = 3)) >> >> will also give you left-aligned axes on the right. >> >> My only suggestion

Re: [R] Reordering levels of a factor within a lattice dotplot

2012-06-22 Thread Deepayan Sarkar
On Fri, Jun 22, 2012 at 5:50 PM, maxbre wrote: > Given my reproducible example > > myexample<-structure(list(site = structure(c(4L, 2L, 2L, 4L, 2L, 4L, 4L, > 3L, 1L, 3L, 1L, 1L, 3L, 4L, 5L, 2L), .Label = c("A", "B", "C", > "D", "E"), class = "factor"), obs = c(0.302, 0.956, 0.72, 1.21, > 0.887, 0.

Re: [R] lattice histogram log and non log values

2012-06-30 Thread Deepayan Sarkar
On Thu, Jun 28, 2012 at 2:41 AM, LCOG1 wrote: > Hello all, >  Please consider the following > > library(lattice) > Colors. <-rep(brewer.pal(7, "Dark2"),2) > color <- 1 > > Data.X.. <- data.frame(UnitArea = c(rnorm(1000), rnorm(1000)), Type = > c(rep("Base",1000),rep("Log",1000))) > >              

Re: [R] the meaning of subscripts

2012-06-30 Thread Deepayan Sarkar
On Thu, Jun 28, 2012 at 9:27 PM, startend wrote: > Hi, > > Now i am dealing with longitudinal data set and I want to see the rough > marginal plot for 2 variables separately. > I found the code from one example here, > > reading <- > read.table("http://www.ats.ucla.edu/stat/R/examples/alda/data/re

Re: [R] trellis margin sizes in absolute units

2012-07-12 Thread Deepayan Sarkar
On Thu, Jul 12, 2012 at 9:39 PM, Martin Ivanov wrote: > Dear R users, > > I have a lot of experience with traditional R graphics, but I decided to turn > to trellis as > it was recommended for spatial graphs by the sp package. In traditional R > graphics > I always first set the size of the dev

Re: [R] tck = 0 for the colorkey?

2012-07-13 Thread Deepayan Sarkar
On Fri, Jul 13, 2012 at 12:21 PM, Martin Ivanov wrote: > Dear R users, > > I am struggling with the colorkey on a levelplot lattice graphic. > I want that no ticks are printed on the colorkey. That is, I want their size > tck=0. > Merely setting tck=0 t in the colorkey parameter does not work. S

Re: [R] Accessor functions in lattice graphics

2011-06-20 Thread Deepayan Sarkar
On Mon, Jun 20, 2011 at 9:22 PM, David Winsemius wrote: > > On Jun 20, 2011, at 10:49 AM, Bert Gunter wrote: > >> Hi all: >> >> Thanks, David. This is a good example of knowledgeable "R forensic >> investigation." I leave it to Frank whether it meets his criteria. >> >> However, I would argue that

Re: [R] xyplot Legend Title and Position

2011-06-20 Thread Deepayan Sarkar
On Wed, Jun 15, 2011 at 6:32 PM, Justin McBride wrote: > Dennis, > > Thanks for your suggestion, but that is not exactly what I was after. > I was trying to get the legend in the margin on the top right of the > page and not in the plot frame.  Is there a way to do this? One option is: xyplot(Yi

Re: [R] giving factor names

2011-06-20 Thread Deepayan Sarkar
On Fri, Jun 10, 2011 at 10:27 PM, Ethan Brown wrote: > Hi Kieran, > > I'm not very familiar with lattice, but here's a workaround that works for > me. Basically, I just created a new data.frame column that was a factor > (combo$zf), and forced its levels to be what you're looking for here. This w

Re: [R] Lattice xyplot to group by two parameters

2011-06-24 Thread Deepayan Sarkar
On Thu, Jun 23, 2011 at 10:15 PM, Guy Jett wrote: > My thanks to this mailing list and its members for their great help in the > past.  I have yet another question per the following code and comments: > > # I need individual graphs grouped by "PARLABEL" AND "Event", with "PARLABEL" > #   controll

Re: [R] bwplot questions: box order, axis breaks, and multiple y-axis labels

2011-06-26 Thread Deepayan Sarkar
On Mon, Jun 27, 2011 at 2:35 AM, Saalem Adera wrote: > Hi all, > > I used bwplot in lattice to create a 6-panel boxplot grouped by a > conditioning variable (param) that displays concentration (conc) in > response to treatment (trtmnt).  Here is the functional part of my > code followed by my thre

Re: [R] Thinning Lattice Plot

2012-07-30 Thread Deepayan Sarkar
On Tue, Jul 31, 2012 at 2:43 AM, Elliot Joel Bernstein wrote: > Is there an easy way to "thin" a lattice plot? I often create plots from > large data sets, and use the "pdf" command to save them to a file, but the > resulting files can be huge, because every point in the underlying dataset > is re

Re: [R] lattice legen and auto.key conflict

2012-07-30 Thread Deepayan Sarkar
On Mon, Jul 30, 2012 at 10:16 PM, Bert Gunter wrote: > David: > > I think one needs to carefully parse the xyplot help, where it says: > > "To use more than one legend, or to have arbitrary legends not > constrained by the structure imposed by key, use the legend argument. > " > > So I presume tha

Re: [R] Thinning Lattice Plot

2012-07-31 Thread Deepayan Sarkar
On Tue, Jul 31, 2012 at 6:43 PM, Elliot Joel Bernstein wrote: > Thanks everyone for your replies. I didn't know about the ecdfplot function, > so I'll start using that instead of Ecdf. Why is Ecdf not a lattice plot? > The result certainly looks like other lattice plots, the arguments are > simil

Re: [R] Lattice xyplot log scale labels help!

2011-11-20 Thread Deepayan Sarkar
On Fri, Sep 16, 2011 at 6:56 PM, Deepayan Sarkar wrote: > On Fri, Sep 16, 2011 at 2:17 AM, Cram Rigby wrote: >> I have a problem with lattice log scales that I could use some help with. >> >> I'm trying to print log y-axis scales without exponents in the labels.

Re: [R] Drawing ticks in the 3rd and 4th row of a lattice

2011-11-22 Thread Deepayan Sarkar
On Fri, Nov 18, 2011 at 11:22 AM, Ashim Kapoor wrote: > Dear all, > > I want to draw ticks on the 3rd and 4th row of a lattice. How do I do this > ? In my search of the help, I discovered a parameter alternating,which kind > of says where the ticks will be but does not suffice for me. You need to

Re: [R] Adding units to levelplot's colorkey

2011-11-22 Thread Deepayan Sarkar
On Tue, Nov 15, 2011 at 6:53 PM, Carlisle Thacker wrote: > Sorry that I was not clear.  I was asking how to add annotation to > levelplot's colorkey, not the levelplot itself.  The only entry I can > find from the help pages is via its labels. > > Googling did yield this:  " draw.colorkey() doesn'

Re: [R] lines and points in xyplot()

2011-11-23 Thread Deepayan Sarkar
On Wed, Nov 23, 2011 at 10:48 PM, Doran, Harold wrote: > Given the following data, I want a scatterplot with the data points and the > predictions from the regression. > > Sigma <- matrix(c(1,.6,1,.6), 2) > mu <- c(0,0) > dat <- mvrnorm(5000, mu, Sigma) > > x <- dat[,1] * 50 + 200 > y <- dat[,2]

Re: [R] lattice key in blank panel

2011-12-15 Thread Deepayan Sarkar
On Fri, Dec 16, 2011 at 1:22 AM, Max Kuhn wrote: > Somewhere I've seen an example of an xyplot() where the key was placed > in a location of a missing panel. For example, if there were 3 > conditioning levels, the panel grid would look like: > > 34 > 12 > > In this (possibly imaginary) example, th

Re: [R] how to combine grouped data and ungrouped data in a trellis xyplot

2012-01-09 Thread Deepayan Sarkar
On Sun, Jan 8, 2012 at 9:45 AM, Mike Dahman wrote: > I'm hoping the community knowledge can help me out here. I have found great > value in R, especially using it to generate charts, but I am still scaling > the learning curve in a number of ways. > > I am looking plot one grouped line and one ung

Re: [R] Changing colour in barchart

2011-09-26 Thread Deepayan Sarkar
On Mon, Sep 26, 2011 at 2:55 PM, shikantaza wrote: > Hello. I've been trying to change the colour of the bars in the auto.key to > blue and red. I have tried: > > barchart(Rate~Digit,Ben,groups=Cat, horizontal=FALSE,ylab="Rate > (%)",auto.key=list(points=FALSE,rectangles=TRUE,space="right"),col =

Re: [R] lattice-dotplot: resize axis

2011-10-13 Thread Deepayan Sarkar
On Wed, Oct 5, 2011 at 5:00 PM, René Mayer wrote: > dear all, > > I want to make a dotplot with ratings from Items in 6 ItemsGroups. > I reordered the items by rating within each group. > I plotted the items by rating conditional on ItemGroup. > The ordering works as I wanted but my y-aches labels

Re: [R] Legend symbols (line, points) in one column.

2011-10-15 Thread Deepayan Sarkar
On Fri, Oct 14, 2011 at 10:02 AM, David Winsemius wrote: > Legends are built in columns. You need to find a graphics symbol to put in > the "points" column or you need to find something that the lines paramater > will turn into a dot (and I'm not sure what that might be.) A 'lines' component can

Re: [R] "pos" in panel.text

2011-10-15 Thread Deepayan Sarkar
On Mon, Oct 10, 2011 at 6:31 PM, Allan Sikk wrote: > Here's the code. The problem seems to be specific for lattice as I can > easily use a vector with pos in "plot". lattice::panel.text() does not support vector 'pos'. (Not very difficult to fix, and I'll put it on my TODO list). For now, you wil

Re: [R] Superposing mean line to xyplot

2011-10-15 Thread Deepayan Sarkar
mails in the archives and looked at some slides from Deepayan > Sarkar but still can not get the point. > > This is the context. I've got data on 9 microRNAs, each miRNA has been > measured on three different arrays and on each array I have 4 > replicates for each miRNA, which sum

Re: [R] Multiple levelplot with title

2011-10-15 Thread Deepayan Sarkar
On Sun, Oct 9, 2011 at 10:00 PM, Richard O. Legendi wrote: > Hi all, > > I'm new to R and to the mailing list, so please bear with me :-) > > I would like to create multiple levelplots on the same chart with a nice > main title with something like this: > >  print(levelplot(matrix(c(1,2,3,4), 2, 2

Re: [R] how to plot two surfaces with lattice::wireframe

2011-10-15 Thread Deepayan Sarkar
On Fri, Oct 14, 2011 at 3:07 AM, Carl Witthoft wrote: > Hi all, > I'd like to plot the Real and Imaginary parts of some f(z) as two different > surfaces in wireframe (the row/column axes are the real and imag axes).  I > know I can do it by, roughly speaking, something like > > plotz <- expand.gri

Re: [R] right justify right-axis tick values in lattice

2011-10-17 Thread Deepayan Sarkar
On Sun, Oct 16, 2011 at 7:20 PM, David Winsemius wrote: > > On Oct 16, 2011, at 1:17 AM, Richard M. Heiberger wrote: > >> How can I right justify the right-axis tick values?  They appear in the >> example below as left-justified. >> >> I have tried several different ways and all fail in different

Re: [R] Lattice 3d coordinate transformation

2012-02-11 Thread Deepayan Sarkar
On Fri, Feb 10, 2012 at 12:43 AM, ilai wrote: > Hello List! > I asked this before (with no solution), but maybe this time... I'm > trying to project a surface to the XY under a 3d cloud using lattice. > I can project contour lines following the code for fig 13.7 in > Deepayan Sarkar's "Lattice, Mu

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] Custom strips in lattice

2008-06-18 Thread Deepayan Sarkar
On 6/18/08, Jim Price <[EMAIL PROTECTED]> wrote: > > I've recently been playing with strip functions for a data presentation I'd > like to use, and have a couple questions. I've cannibalised the > useOuterStrips function from latticeExtra to give me the following sample > code: > > > > library

Re: [R] Problem with "date"-x-axis in lattice

2008-06-20 Thread Deepayan Sarkar
On 6/20/08, Henning Wildhagen <[EMAIL PROTECTED]> wrote: > Hello list, > > i am trying to plot a continous variable y against a "date" variable, both > in one dataframe named "df", using a code like this > > library(lattice) > plot1<-xyplot(y~date, data=df, type="b") > > "date" is of class "Da

Re: [R] Coloring Stripchart Points, or Better, Lattice Equivalent

2008-06-23 Thread Deepayan Sarkar
On 6/22/08, Bryan Hanson <[EMAIL PROTECTED]> wrote: > Thanks Gabor, I'm getting closer. > > Is there a way to spread out resp values vertically for a given value of > index? In base graphics, stripchart does this with method = "stack". But > in lattice, stack = TRUE does something rather diffe

Re: [R] levelplot question

2008-06-23 Thread Deepayan Sarkar
On 6/23/08, Pedro Mardones <[EMAIL PROTECTED]> wrote: > Dear all; > I have a data set with 3 groups and 2 response variables, say z1 and > z2, and I would like to create a single plot (using the levelplot > function) showing on the first row the leveplots for z1 for each group > and on the seco

Re: [R] after setting auto.key=TRUE, legend become inconsistent with the graph

2008-06-23 Thread Deepayan Sarkar
On 6/23/08, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > Set the various plotting parameters in par.settings= in which > case both the legend and the plot itself will be taken from there. > See for example: > > http://finzi.psych.upenn.edu/R/Rhelp02a/archive/90432.html > > where superpose.li

Re: [R] Coloring Stripchart Points, or Better, Lattice Equivalent

2008-06-24 Thread Deepayan Sarkar
On 6/24/08, Bryan Hanson <[EMAIL PROTECTED]> wrote: > If anyone remains interested, the solution in base graphics is to modify > stripchart.default, the last couple of lines where the coloring of points > defaults in a way that depends on groups. In my example, the groups are > being handled co

<    1   2   3   4   5   6   7   8   >