similar to: ltext - adding text to each panel from a matrix

Displaying 20 results from an estimated 6000 matches similar to: "ltext - adding text to each panel from a matrix"

2009 Apr 27
1
Changing color of points in violin plot
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 changes, but to no avail. Thanks for your help, John bwplot(voice.part ~ height, singer, panel = function(..., box.ratio) {
2011 Mar 24
1
Colour makes my life; but not my bwplot (panel.violin)
Using Trellis, am successfully setting up a number of panels (25) in which I have two box and violin plots. I would like to colour - one plot as RED and the other as BLUE (in each panel). I can do that with the box plots, but the violin density areas just take on one colour. My basic call is as follows: bwplot(rmsd ~ file | code, data=spread_data.filtered, panel = function(...,
2004 Jan 27
1
ltext( pos=NULL )
ltext( 0, 0, pos=NULL, label="xxxx") gives an error message. The help page of ``ltext'' references to the help page of ``text'' where the default value of pos is set to NULL. To solve the problem ``ltext'' could be changed: OLD: if (!missing(pos)) NEW: if (!missing(pos) && ! is.null(pos) ) Wolfram
2010 Jan 24
1
lattice ltext
Dear friends - please give me a hand. I have a dataset of 40 patients in two groups observed on three occasions. I only want to plot a line for each patient in the two groups. I use the ltext function to put the patient number but fail to make lattice understand the numbers as unique since apparently it starts all over with 1:20 for each panel instead of respecting my desires to have 1:20
2010 Jan 12
2
Placing eps files from R into Adobe InDesign documents: specifying fontfamily
This is a solution I am posting for a problem that others may have. If you want to: 1. Place lattice graphics from R into an Adobe InDesign document, and 2. Use the export as eps function in R to maximize resolution (it is much better than exporting as a metafile or bitmap), and 3. Use long strings of text in your titles or captions or to label your axes. Then you will have problems because:
2004 Apr 14
1
ltext, plotmath, and substitute
I am interested to use plotmath functions within a panel function but am having some problems getting the code right. Within each panel I am plotting the data, fitting a regression line, and would like to print the regression equation. Here is a trivial example of what I'd like to do: # generate simple data tmp.df <- data.frame(id = rep(1:4, each=4), time = rep(1:4, 4), das =
2009 Oct 30
1
insert a text in panels, always in the same position (lattice, ltext, ?prepanel?)
Dear R-users, my present problem is related to lattice. I would like to put some text in each panel, namely a p-value. I therefore wrote a simple panel function as reported here below. I'm able to write the value in each panel at the maximum value of y for each panel, but this obviously overlay the text to the points. What I'm looking for is to write the text always in the same
2002 Feb 15
1
latex in ltext
Hi. I have been able to get things like text(9,46, expression(hat(beta) == (X^t * X)^{-1} * X^t * y)) to work in regular plots but ltext(9,46, expression(hat(beta) == (X^t * X)^{-1} * X^t * y)) does not do the same in lattice (trellis) plots. Has it not been implemented or am I missing something? Thanks - Mary
2006 Jul 19
2
trellis.focus with postscript device
Hello. First: R 2.3.1 on Windows XP. I am trying to add information (sample size) to the Trellis strips which I am successful using the trellis.focus function with the default Windows device. However, I typically use the postscript device as I use LaTeX and \includegraphic for incorporating graphs into stat reviews. Here's some example code (apologies for the lack of creativity and
2002 Aug 21
2
More help with Lattice
Hi: Thanks a lot to Deepayan Sarkar, author of lattice I think, who solved my first query. I am afraid that I have another one. I am plotting several mutipanels boxplots (with one conditioning variable) on one page. The x, y and conditioning variable are all continuous variables. The x and conditioning variables are transformed to shingles before being plotted. The plot looks nice but there
2012 Nov 26
1
A problem subsetting a data frame
Hi all, I have this microarray large microarray data set (ALL) from which I would like to subset or extract a set of data based on a factor ($mol.biol). I looked up some example of subsetting in, picked up two commands and tried both but I got error messages as follows > testset <- subset(ALL, ALL$mol.biol %in% c("BCR/ABL","ALL1/AF4")) >> Error in
2002 Apr 23
1
Writing text in lattice graphics
I'm trying to obtain a set of regression lines obtained for different values of a factor using lattice. I would like to add a string to each panel showing the R^2 value of the respective line, but I'm having difficulties positioning the text (namely on which coordinates to give to the "ltext" function). Here is what I'm using (I've used ?? for the things I would like
2011 May 06
1
Weighted box or violin plots in Lattice?
Is it possible to create weighted boxplots or violin plots in lattice? It seems that you can specify weights for panel.histogram() and panel.densityplot(), but not for panel.bwplot or panel.violin(). Please let me know if I've missed something in the package documentation. Thanks! -- Raphael D. Mazor Freshwater Biologist Southern California Coastal Water Research Project 3535 Harbor Blv
2007 Dec 09
1
Saving lattice plot as a PDF
Hi there, I need to save a series of lattice plots as a PDF, this is my code so far: windows(height=8,width=6) plot.new() library('grid') lattice.options(layout.heights=list(top.padding=list(x=0.15, units="inches"))) print(plot1, split=c(1,1,2,3), more=TRUE) print(plot2, split=c(1,2,2,3), more=TRUE) print(plot3, split=c(1,3,2,3), more=TRUE) print(plot4, split=c(2,1,2,3),
2010 Apr 01
2
How to get the scale limits in lattice plot
I am drawing a density histogram, and want to label the plots with the mean using ltext(). But I need the x,y coordinates to feed into ltext, and I can't calculate them easily from my data. Is there a way to get the x and y ranges being used for the plot, so I can put the text at the correct position in the panel.function? Thanks, Jim Rome
2010 Apr 24
2
left-to-right series of box and whisker plots from a csv file
Hi, I've got a csv file with scores like this: 40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,32,38,40,20,40,26,40,30,40,5,5,13,12,40,40,3,33,29,23,2,24,9,15,4,21,16,5,26,8,8,18 40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,32,40,40,30,40,40,37,34,40,36,13,40,13,40,5,40,8,29,5,15,34,5,22,14,20
2010 Dec 23
1
Vioplot / list help
Hi, I have some data (lots of year,distance pairs), which I can straightforwardly boxplot: dists <- read.table("movedists.dat") with(dists,plot(as.factor(V1),V2)) If I want to plot these data as violin plots using vioplot, this approach doesn't work: > with(dists,vioplot(as.factor(V1),V2)) Error in Summary.factor(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, : min not
2005 Feb 15
1
lattice multiple plots per page
Dear R-sters, I was wondering if anyone has encountered the following issues. I've figured out how to get multiple levelplots [library(lattice)] on a single plot. However, when I add text (adding axis labels for the entire four panel plot) the text is missing when I insert the *.eps file I've created into my LaTeX document (via MikTeX-WinEdt). And, I've just upgraded to R
2011 Jan 21
1
Help for lattice. par(new=TRUE)
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",digit=2)),cex=0.8) ltext(0.8,1.5,paste("s.d.=","0.06",digit=2)),cex=0.8) } histogram(sh2,
2004 Apr 13
1
lattice problem in R-1.9.0
Hi all, I just installed R-1.9.0 on Windows 2000 from binaries. Yesterday, on R-1.8.1 I ran a script that looked like: library(lattice) tmp <- expand.grid(A = 1:3, B = letters[1:2]) tmp$z <- runif(NROW(tmp)) trellis.device(png, file = "x1081.png", theme = col.whitebg) xyplot(z ~ A | B, data = tmp, panel = function(x, y, i) { panel.xyplot(x, y)