Re: [R] lattice plot: points and lines for different variables in same plotlattice plot

2015-10-04 Thread Duncan Mackay
Hi Naresh Try xyplot(y + y.fit ~ x | name, data = my.df, type = c("p","l"), distribute.type = TRUE, panel = panel.superpose ) Your code seems to be a direct copy from the command line; sometimes it makes it clearer to arguments and functions within the panel function o

Re: [R] lattice plot formatting: pch, abbreviation and labels

2014-04-29 Thread Duncan Mackay
e, panel.groups = function(x, y, group.number, ...) { panel.segments(x0= x-notch, x1=x+notch, y0=mean(y), y1=mean(y), lty = c(1:2)[group.number], lwd=c(2:1)[group.number], col = c(1:2)[group.number]) panel.stripplot(x,

Re: [R] lattice plot formatting: pch, abbreviation and labels

2014-04-29 Thread Duncan Mackay
lot(x,y, ...) } ) If you wanted full N P then scales = list(x = list(at = c(0,1), alternating = F, labels = c("Negative","Positive"), rot = 90)), # rot = 0 if labe

Re: [R] lattice plot formatting: pch, abbreviation and labels

2014-04-29 Thread Duncan Mackay
lot(x,y, ...) } ) If you wanted full N P then scales = list(x = list(at = c(0,1), alternating = F, labels = c("Negative","Positive"), rot = 90)), # rot = 0 if labe

Re: [R] lattice plot formatting: pch, abbreviation and labels

2014-04-27 Thread Duncan Mackay
h = datmeA[datmeA[,2]== levels(datmeA[,2])[pnl],"ratio"], col = c("red","black"), lty=3) for (j in 1:2){ with(subset(datmeA, (positivity == j-1 & stimulation == levels(datmeA$stimulation)[pnl])), panel.abline(

Re: [R] lattice plot formatting: pch, abbreviation and labels

2014-04-26 Thread Duncan Mackay
Hi Luigi You are typing things unnecessarily: do not use the attach command unless absolutely necessary - it has unfortunate consequences. It is better to use with or within. alpha is not available with some devices with bad consequences if used; its default is 1 anyway. Once you have stated a da

Re: [R] Lattice plot problem outputting to jpeg

2011-07-19 Thread Justin
creamers rdeft.nhs.uk> writes: > > Thanks David...I am trying to plot out data for various consultants by > specialty - each specialty has a varying number of consultants - each > consultant a varying number of data pointsI found direct access of the > elements of the dataframe was the only

Re: [R] Lattice plot problem outputting to jpeg

2011-07-19 Thread creamers
Thanks David...I am trying to plot out data for various consultants by specialty - each specialty has a varying number of consultants - each consultant a varying number of data pointsI found direct access of the elements of the dataframe was the only way to plot this type of variation, otherwis

Re: [R] Lattice plot problem outputting to jpeg

2011-07-19 Thread David Winsemius
On Jul 19, 2011, at 5:40 AM, creamers wrote: Hi.I am relatively new to R but was quite pleased with myself at having generated a series of lattice plots as PDFs. I was very surprised when plotting these out as jpegs (or png or tiff) that the strip title information above each lattice plot

Re: [R] lattice plot query

2011-06-10 Thread Vijayan Padmanabhan
, "217", "218", "219", "220", "221", "222", "223", "224", "225", "226", "227", "228", "229", "230", "231", "232", "233", "234

Re: [R] lattice plot query

2011-06-09 Thread Dennis Murphy
Hi: Try the following - the illustration below is for exactly one set of panel plots. Adapt as necessary to your situation: # Reorder the levels of subject - in this case I put them in a new variable MyData$subj <- factor(MyData$Subj, levels = c(paste('S', 1:13, sep = ''))) xyplot(value ~ Time |

Re: [R] lattice: plot alignment fails

2010-09-01 Thread Marius Hofert
Okay, I solved it. After using the same arguments for "scales" (in particular: relation="free"), the plots are perfectly aligned. Cheers, Marius On 2010-08-24, at 20:39 , Marius Hofert wrote: > Dear expeRts, > > I would like to have four plots appearing in one figure. The minimal example > s

Re: [R] Lattice Plot formatting problem/s

2010-01-06 Thread Peter Ehlers
fishman wrote: Hi I am having difficulty getting the right format for a lattice plot I am trying to produce. Here is a pic of the plot as I get it now http://i235.photobucket.com/albums/ee37/scotrivers/lattice_plot01.jpg and here is the code I am using: RN<-read.csv("N:/data.dat",header=T) DA

Re: [R] Lattice plot

2009-11-18 Thread Deepayan Sarkar
On Wed, Nov 18, 2009 at 4:14 AM, Tim Smith wrote: > Hi, > > I was trying to get a graph in lattice with the following data frame (7 rows, > 5 cols): > chr start1 end1 meth positive > 1   1     10   20  1.5        y > 2   2     12   18 -0.7        n > 3   3     22   34  2.0        y > 4   1     35

Re: [R] Lattice plot

2009-11-18 Thread baptiste auguie
Hi, ggplot2 can also split the graphs in different panels, d= read.table(textConnection( "chr start1 end1 meth positive 1 1 10 20 1.5y 2 2 12 18 -0.7n 3 3 22 34 2.0y 4 1 35 70 3.0y 5 1120 140 -1.3n 6 1180 190

Re: [R] Lattice Plot Ordering?

2008-12-18 Thread Rolf Turner
On 19/12/2008, at 2:03 PM, Haoda Fu wrote: Hi, When I plot multi-panel in R by using lattice package, the order is always starting from bottom to the top, e.g., panel 1,2,3,4 will looks like the following, 3,4 1,2 How can I change it to 1,2 3,4 ? many thanks! Use the ``as.table'' argument;