similar to: Lattice histogram with vertical lines

Displaying 20 results from an estimated 2000 matches similar to: "Lattice histogram with vertical lines"

2012 Jun 27
1
lattice histogram log and non log values
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))) histogram( ~ UnitArea | Type, data = Data.X.., xlab = "Unit Area", type = "density", panel =
2012 Jan 04
1
Adding a vertical line to plot with two overlapping density plots
Hi, A simple question I hope. I wish to add a single vertical line to a plot with several density plots. Here is a simplified example. ############ thedata <- data.frame(x1=rnorm(100,1,1),x2=rnorm(100,3,1)) #create data thedata.m<-melt(thedata) densityplot(~value, thedata.m, groups=variable,auto.key=list(columns=2)) #this gives the two density plots ######### what I wish now is to add a
2007 Mar 08
2
curve of density on histogram
Hi R users, I would like to know why these following curve densities don't appear correctly on the histograms. Thank you for your help library(lattice) library(grid) resp <- rnorm(2000) group <- sample(c("G1", "G2", "G3", "G4"), replace = TRUE, size = 1000) histogram(~ resp | group, col="steelblue", panel = function(x, ...){ std
2010 Aug 13
1
Lattice: Superimposing histograms with different colors and transparency effects
Dear users, I would like to plot several histograms superimposed on the same panel with different colors, with superimposed polygons appearing with transparency effects. I also want estimated densities to appear on the same plot. For several reasons, including that I like it, I want to use the lattice package. I have several questions regarding the use of the 'histogram' function with a
2006 Sep 01
3
histograms
I am interested in plotting histograms for the following data Isoform Tumor_65_198 Tumor_50_192 Tumor_80_167 Tumor_80_204 Tumor_95_197 Tumor_70_189 Tumor_90_202 Tumor_40_177 Tumor_60_21 Tumor_70_174 Tumor_70_147 Tumor_50_5 ABCC4-2007 1 1 1 6 1 9 10 1 2 0 10 1 ABCC4-2008 5 8 7 5 3 10 5 5 7 3 10 3 ABCC4-2009 0 0 0 0 0 0 0 0 0 0 0 0 ABCC4-2010
2004 Jul 26
1
lattice / pdf bug ?
I've been scrathing my head over this one. Suppose I have a data.frame which maps to a 'n x k' lattice, and that one of those cells is empty. An artificial example is generated by Q<-data.frame(x1=sample(c("A","B"),10,replace=TRUE), x2=c("C", rep("D",9)), y=rnorm(10)) where by having only one obs. for the first level of the
2012 Jan 17
2
Separate ablines in lattice panels
Searched archives and found some old email threads on the topic. But mot exactly what I think I need. Suppose I have a datafile such as tmp. tmp <- data.frame(var1 = c(rnorm(1000), rnorm(1000, 1, 1)), var2 = gl(2, 1000)) I'd like a plot similar to the one below, but with an abline of v=0 in the lower panel and v=1 in the upper panel. Code below creates two lines in each panel, not quite
2007 Sep 10
1
overlay lattice histograms with goodness-of-fit pdfs
Hello, I am new to R exploratory data analysis and plotting. Is anyone aware of a way to overlay a set of conditional histograms with conditional PDFs? Below, I generate a lattice plot of precipitation histograms based on different months and stations, given a subset of the dataset: histogram(~ data | month * station, data = sta.stack[sta.stack[,"type"]=="precip" &
2013 Jan 22
2
Adding a line to barchart
R-helpers: I need a quick help with the following graph (I'm a lattice newbie): require("lattice") npp=1:5 names(npp)=c("A","B","C","D","E") barchart(npp,origin=0,box.width=1) # What I want to do, is add a single vertical line positioned at x = 2 that lays over the bars (say, using a dotted line). How do I go about doing this?
2003 Oct 02
2
Query: What is 'Trellis'?
I'm an R-beginner and have found the function 'panel.mathdensity' in the full manual. R can't find the function and under 'Description' in the manual it says that they "are available in Trellis". What is it and where can I find the function? Regards, M?rten M?rten Bjellerup Doctoral Student in Economics School of Management and Economics V?xj? University
2001 Aug 27
1
Error meesage from RGUI
I am using Version 1.3.0 (2001-06-22) on Windows/2000. Had loaded the 'lattice' and 'grid' libraries and was trying the example on densityplot: data(singer) densityplot( ~ height | voice.part, data = singer, layout = c(2, 4), xlab = "Height (inches)", bw = 5) ## Using a predefined panel function to fit a normal distribution
2007 Jan 28
2
Adding lines to xYplot
I am using xYplot to plot data and CIs. How do I add several lines to the figure? _____________________________ Professor Michael Kubovy University of Virginia Department of Psychology USPS: P.O.Box 400400 Charlottesville, VA 22904-4400 Parcels: Room 102 Gilmer Hall McCormick Road Charlottesville, VA 22903 Office: B011 +1-434-982-4729 Lab: B019
2012 Jun 06
5
how to add a vertical line for each panel in a lattice dotplot with log scale?
by considering this example from barley dataset #code start dotplot(variety ~ yield | site, data = barley, scales=list(x=list(log=TRUE)), layout = c(1,6), panel = function(...) { panel.dotplot(...) #median.values <- tapply(x, y, median) # medians for each variety #panel.abline(v=median.values, col.line="red") # but this
2011 Feb 16
2
how to create normalized pdf plot?
Hello, I have multiple data files. Each file contains a single column and 1.5 million rows. I want to create normalized pdfs (area under curve is 1) and histograms to compare with one another. Could anybody suggest if there exists an easy way or built in function in R. At present I am using Origin and Excel together to do this. A single file needs 10 minutes and I have a total of 929 files! So
2009 Feb 20
4
adding a reference line to an xyplot
Hi, I want to add a dashed vertical line to a number of xyplots. Here is a simple script of the type of plot I have but then I want to add a reference line to 1995 on each of the panels. I have tried panel.abline and other suggestions on the forum but can't get it to work. plot<-rep(letters[1:3],each=10) year<-rep(1991:2000,times=3) matter<-rep(seq(2,6.5,0.5),times=3)
2006 Dec 14
2
xyplot: discrete points + continuous curve per panel
I have a number of x, y observations (Time, Conc) for a number of Subjects (with subject number Subj) and Doses. I can plot the individual points with xyplot fine: xyplot(Conc ~ Time | Subj, Groups=Dose, data=myData, panel = function(x,y) { panel.xyplot(x, y) panel.superpose(???) # Needs more here } ) I also like to plot on
2005 Sep 25
4
hist(x, ...) with normal distribution curve
. I am looking for a histogram or box plot with the adding normal distribution curve I think that must be possible, but I am not able to find out how to do. Regards Knut
2007 Jan 09
3
Can i manage part of a file ..
Can I use puppet to ensure that a file includes certain text but not be required to maintain the entire file? For example, I would like /etc/modprobe.conf to contain the following lines but the file will also contain lines that are system dependent. --------------------------------------------------------------------------------------- # Disable IPV6 alias net-pf-10 off alias ipv6 off
2004 Oct 19
3
densityplot and histogram
Is there any function like par(new=T) for lattice. I want to plot a histogram in percentages on the right hand side and also superimpose the densityplot with its density scale on the lhs. so far I am only able to do this histogram( temp[,2]~ temp[,1],nint=100,type="desnity", xlab = "Population Size", panel = function(x, ...) {
2009 Jan 29
2
Adding vertical line to histogram and qplot "stacked" plot
R-users it appears I am leaning on your knowledge once again.  Is there any way to add a vertical line to a histogram and qplot "stacked" plot?  Here is my current attempt:   "qplot" approach attempt: qplot(Run, data = data_dataframe, breaks = breaks, fill = Temperature, main = short_title) + scale_x_continuous("Data") + scale_y_continuous("Freq")