similar to: How to insert gridlines in lattice density plot

Displaying 20 results from an estimated 1000 matches similar to: "How to insert gridlines in lattice density plot"

2007 Apr 13
2
replicates in repeated ANOVA
Hi, I have sort of a newbie question. I've seriously put a lot of effort into how to handle simple replicates in a repeated ANOVA design, but haven't had much luck. I really liked reading "Notes on the use of R for psychology experiments and questionnaires", by Jonathan Baron and Yuelin Li ( http://www.psych.upenn.edu/~baron/rpsych/rpsych.html ) but still didn't run across
2007 Feb 21
3
Different gridlines per panel in xyplot
In the example R script below, horizontal gray gridlines are drawn at y coordinates where the points are drawn with the code: panel.abline(h=y, v=xScale, col.line="gray") How do I change this so that the horizontal gray gridlines are drawn at y coordinates where the y labels are drawn? The challenge is that each panel has different y-ranges (in my real example the y-ranges and
2009 Nov 20
1
Hmisc and Lattice question on gridlines
I have been using lattice xyplot and am quite pleased, and I can use the type=c("b","g") to have it print gridlines into the page, yet if I want to have a line plot with points on it, how do I get the xYplot to print gridlines (I use Hmisc xYplot because of its bands method which allows plotting of confidence intervals). Any suggestions? I have looked at the panel functions but
2009 May 16
2
Question about barplot: gridlines & value labels
Hello! I promise I looked into help files before asking. Still cannot figure it out. I think it's because I am totally confused what packages use lettice, which use trellis, etc. Sections 1 and 2 below produce the data and the data to plot. My question is about barplot in Section 3. I am trying to: 1. add only horizontal gridlines and manipulate the type and color of that line. tck = 1 is not
2009 Feb 18
1
interaction.plot - gridlines and formatting legend title...
Thank you for providing advice on this graphics question. I am building an interaction.plot. d=data.frame(xx=c(3,3,2,2,1,1),yy=c(4,3,4,3,4,3),zz=c(5.1,4.2,4.4,3.5,3.3,-1.1,-1.3) d[[1]]<-as.factor(d[[1]]) d[[2]]<-as.factor(d[[2]]) print(d) interaction.plot(d$xx, d$yy, d$zz, type="b", col=c("red","blue"), legend=F, lty=c(1,2), lwd=2, pch=c(18,24),
2008 Jan 25
3
plotting gridlines
dear all, I have a very simple question but I could not figure out. I need to make plots with grid in the background. something like I old retrive like this a=runif(100)*10 b=runif(100)*10 plot(a,b, pch=20, xlim=c(0, round(max(a))), ylim=c(0, round(max(b)))) vs=seq(0, max(a), 0.5) for(i in 1:length(vs)){ abline(v=vs[i], col="lightgrey") } hs=seq(0, max(b), 0.5) for(i in
2006 Aug 30
4
Suggestion for read.table()
First, I compliment you all for such a useful project as R. Suggestion: If read.table() could take input from a character string, then one could write raw= " x y z 1 2 3 4 5 6 " df = read.table(raw,head=TRUE) Of course, one can cat() to write raw into a temporary file, and read.table() from that file. However, direct reading might be a good option? Hope this is
2023 Jul 01
1
Number of Cores limited to two in CRAN
This is the specific error messsage from R CMD check --as-cran Error in .check_ncores(length(names)) : 16 simultaneous processes spawned Calls: prepost -> makeCluster -> makePSOCKcluster -> .check_ncores Execution halted Thanks, Ravi ________________________________ From: Ravi Varadhan Sent: Saturday, July 1, 2023 1:15 PM To: R-Help <r-help at r-project.org> Subject: Number
2011 Mar 14
1
AOV() may misslabel random effects.
Greetings, The aov() function may mislabel the random effects as in the example below: Has anybody else noticed this? Cordially, Giles Crane, MPH, ASA, NJPHA gilescrane at verizon.net > m2 Call: aov(formula = y ~ ap + pe + Error(ju), data = d) Grand Mean: 77.50667 Stratum 1: ju Terms: ap Sum of Squares 4322.538 Deg. of Freedom 12 13 out of 25 effects not
2009 May 29
0
ggplot2 date help (minor gridlines months and major grid lines years in a readable format)
library(ggplot2) melt.updn <- (structure(list(date = structure(c(11808, 11869, 11961, 11992, 12084, 12173, 12265, 12418, 12600, 12631, 12753, 12996, 13057, 13149, 11808, 11869, 11961, 11992, 12084, 12173, 12265, 12418, 12600, 12631, 12753, 12996, 13057, 13149), class = "Date"), variable = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2008 Nov 19
1
paste() retains quotes (PR#13304)
Full_Name: Giles L Crane Version: 2.8.0 2008-10-20 OS: Windows XP Submission from: (NULL) (71.168.215.186) paste(rep(" ",10),sep="") [1] " " " " " " " " " " " " " " " " " " " " As I read the documentation for paste(), this should have produced " " that is,
2013 Jan 22
1
simple reshape
Dear friends - this is a very simple question - I have a data frame 'data.frame': 87 obs. of 3 variables: $ ID : int 1 1 1 2 2 2 3 3 3 4 ... $ prep : num 1.18 1.38 1.34 1.93 2.38 2.24 1.17 1.13 1.21 1.89 ... $ postp: num 0.63 0.71 0.75 1.01 1.12 1.07 0.87 0.64 0.7 0.8 ... - 29 persons (ID) each measured three times before and after an intervention: prep and postp - I need
2006 Dec 01
3
Vertical line in densityplot?
Hi all, I'm trying to get a vertical line at a specific point in a densityplot. abline seems to be what's required, but it doesn't align itself to the scale used in the plot. example: library(lattice) x<-rnorm(100) plot.new() densityplot(x) abline(v=0) ----- The line seems to use some other coordinate system. What kind of call do I use to make abline use the graph's
2008 Dec 11
2
call lattice function in a function passing "groups" argument
I'm trying to use a lattice function within a function and have problems passing the "groups" argument properly. Let's say I have a data frame d <- data.frame(x = rnorm(100), y = c("a", "b")) and want to plot variable x in a densityplot, grouped by the variable y, then I would do something like densityplot(~ x, d, groups = y) If however I wanted to
2012 Feb 22
2
Several densityplots in single figure
Hi, I have created two separate overlapping density plots- see example code below. What I wish now to do is combine them into one figure where they sit side by side. Any help would be great! many thanks in advance, josh. ##################### thedataA <- data.frame(x1=rnorm(100,1,1),x2=rnorm(100,3,1)) #create data thedataA.m<-melt(thedataA) densityplot(~value, thedataA.m,
2008 Aug 26
2
awkward behavior with densityplot function
Hi, I have the following script: ---- t.R --- grafica <- function() { v <- read.csv('preprocessed/komolongma.ece.uprm.edu.active',sep=',') x <- as.ts(v$active) bitmap(file="output.png") densityplot(~x,col='blue',main='Density Plot') dev.off() } grafica() ---- t.R --- When I "sourced" it from R prompt, it quietly runs.
2010 Dec 15
1
Problems drawing a colored 'rug' in the Lattice 'densityplot'
Hi All, I'm trying to add a 'rug' representation of my data to a plot created with densityplot(). While I can do this in the simple case, I can't do it properly when I include the "groups" argument. I have an example below. I am running a reasonably new version of R. print(sessionInfo()) R version 2.12.0 Patched (2010-11-07 r53537) Platform: i686-pc-linux-gnu
2006 Jun 26
1
How to generate a figure using par( ) with some densityplot( )'s
Hi Dear R users, For a pair plotting, usaully we use par( ) function. Apparently it does not work anywhere. I want to have 3 plots in a single figure, like this: par(mfrow=c(3,1)) densityplot( a) densityplot(b) densityplot(c) But it does not work. How is it possible to have such a figure with densityplot( ) in a single figure? So many thanks for any help. Amir Safari
2007 Aug 21
1
small issue with densityplot
Hi folks, This is really minor but to someone not familiar with the various tentacles of the lmer package it could be really annoying. I was trying to plot the posterior density of the fixed effect parameters of a lmer model, > hr.mcmc = mcmcsamp(hr.lmer, n=50000) > densityplot(hr.mcmc, plot.points=F) There is this error, "Error in densityplot(hr.mcmc, plot.points = F) : no
2008 Mar 10
2
Multiple density plots
Hi all, I'm interested in doing a multiple density plot on a number of columns in a dataframe. >DF lineA.1 lineA.2 lineB.1 lineB.2 r1 5.355354 6.665575 10.288498 11.74750 r2 3.643415 5.427600 11.407112 13.97065 r3 5.813674 6.438502 9.628871 11.57456 r4 5.241340 5.125049 10.456221 12.35381 r5 4.640885 8.635518 8.344704 11.98484 r6 4.559852 6.416171 10.419599 10.89247 r7