similar to: lattice histogram function and groups

Displaying 20 results from an estimated 10000 matches similar to: "lattice histogram function and groups"

2007 Jun 21
2
Overlaying lattice graphs (continued)
Dear R Users, I recently posted an email on this list about the use of data.frame and overlaying multiple plots. Deepayan kindly indicated to me the panel.superposition command which worked perfectly in the context of the example I gave. I'd like to go a little bit further on this topic using a more complex dataset structure (actually the one I want to work on). >mydata Plot
2011 Nov 02
1
Lattice plots and missing x-axis labels on second page
Hello, I'm trying to make a lattice plot (using xyplot()). I have included a "layout=c(3,4)" statement, giving me 12 plots per page and an "as.table=TRUE" statement, directing the way the plots are laid out. I have 18 plots altogether and so 6 of them end up on the second page. Everything looks fine for the first page, but the x-axis labels (e.g. 1993, 1994...) are all
2008 Oct 08
2
Histogram colours in lattice.
I am trying to do a histogram lattice plot and I would like the histogram to be filled with a different colour in each panel. Note: I want every bar in each histogram to be the same colour, but that there should be different colours *between* histograms. Can't seem to get this to work. I thought that something like the following would be a goer: set.seed(42) X <- rnorm(200) A <-
2009 Mar 28
1
Breaks in y-axis of histogram using lattice
Hello R-Users, I am plotting several histograms to demonstrate zero-inflated data using lattice. Because there are so many zeros, it is difficult to see the observations of non-zeros on the graph (i.e. the y-axis scale is too large). I would like to break the y-scale so that the non-zeros at least show up on the graph. Below is an example of the code for the histogram (e.g. I have several
2006 Oct 13
3
Adding per-panel text to panel strips in lattice xyplot
I would like to add auxiliary information to the bottom of two strips on each panel that comes from a table look-up using the values of two variables that define the panel. For example I might panel on sex and race, showing 3 randomly chosen time series in each panel and want to add (n=100) in the bottom strip to indicate the 3 curves were sampled from 100. Is there a not-too-hard way to do
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 =
2009 Apr 02
1
Histogram with lattice with two 'conditional' variables
Hello dear R-community, I have been trying to figure out a way to generate histograms of a numeric variable observed in different entities ('individual' below). Each one of this entities is classified as "A" or "B" (according to the pseudo-code below): variable<-sample(rep(1:10,10)) individual<-rep(1:10, length(variable))
2008 Feb 11
1
Histogram in Lattice with 3 factors
Dear R-help list, I am trying to construct a lattice histogram using 3 factors. My dataframe looks like this: (simulating a waterbalance over groundwater with different salinities) s days model EC EC_max 0.4 1 "A" 10 9 0.42 2 "A" 10 9 0.44 3 "A" 10 9 : : : :
2017 Aug 15
1
Lattice Histogram Scaling
My apologies, the data can now be found at: url <- "http://www.econ.uiuc.edu/~roger/research/ebayes/velo.d" x <- scan(url,skip = 1) If I could get each of the histograms to mimic what is produced by hist(x, 100, freq = FALSE) I?ve experimented with xlim, ylim, without success so far... url: www.econ.uiuc.edu/~roger Roger Koenker email rkoenker at uiuc.edu
2006 Apr 04
1
imaging and contouring
Dear R'Helpers and Colleagues, I have looked in the documentation, asked to some colleagues in the lab, but was unable to solve the following difficulty. I am running R on a iMac G5 with OS 10.4. The file below (73 rows x 144 col) shows the values of a climatic index on the globe with a grid of 2,5 ? x 2,5 ? (NA = no value): ? With image() and map() and running the following
2011 Jan 10
3
Lattice, combine histogram and line graph
Hello everyone, I have a simple histogram of gasoline prices going back a few years that I want to insert a line graph of consumer price index (cpi) over the histogram. I have looked through the "Lattice" book by Deepayan Sarkar but don't see anything there. How might this be done? An example would be wonderful. Current code snippet follows. For example additional field to add
2009 May 12
1
lattice histogram for multiple variables : adjusting x axis
Hello all, I have a large data frame and I want to look at the distribution of each variable very quickly by plotting an individual histogram for each variable. I'd like to do so using lattice. Here is a small example using the iris data set: histogram(as.formula(paste("~",paste(colnames(iris[,!sapply(iris,is.factor)]),collapse="+"))),data=iris[,!sapply(iris,is.factor)])
2017 Aug 14
1
Lattice Histogram Scaling
I am trying to do some comparisons of density estimators using lattice. The code below attempts to plot the same histogram in each panel and then overplots a kernel estimate with different bandwidths. Finding packet.number() was a bit arduous, but seems to do what I want. My concern now is that close examination of the 4 histograms reveals that they are different even though they use the same
2018 Apr 25
1
Can't Get Lattice Histogram Minor Tick Marks to Work
Thanks Jeff, I attached a file with the program to my earlier email because the posting guide seemed to imply that non-binary attachments would work. But I see that the file was stripped off. I installed the program file on a web site, but when I downloaded it, the line breaks were stripped out. So I've included the program below: ------------------------------------------------------- #
2009 Feb 03
2
Lattice histogram with vertical lines
I would like to add some vertical lines to a lattice plot of histograms. What I am after is a lattice version of abline(v = 1234). The lattice histogram plot is just: histogram( ~ LTSE | approach, data = arrivals) Can anyone point me in the right direction for this? David Scott _________________________________________________________________ David Scott Department of Statistics The
2005 Feb 16
1
panel/prepanel for polar plots ala xYplot
First a bit of background: After doing a search for a flexible polar plot function and coming up empty, I have begun writing one myself. Since I am new to writing mid-level graphics routines, this has required some learning about lattice, grid and related things. I am to the point where I have a workable proof of concept, but still need to make some improvements. My goal is to have
2018 Apr 25
0
Can't Get Lattice Histogram Minor Tick Marks to Work
Per the Posting Guide, why didn't you post the reproducible R code example? On April 24, 2018 8:22:15 PM PDT, Donald Macnaughton <donmac at matstat.com> wrote: >I'm drawing a paneled histogram using the lattice package. I've >succeeded in >adding minor tick marks to the vertical axis, but I can't get the >desired >number of minor tick marks between the major
2010 May 31
3
two questions about PLOT
here ,I want to plot two lines in one figure.But I have two problems 1) how to move one of the y-axis to be the right ? I tried to the command"axis(2)",But I failed. 2) how to add the axis information correctly.Since I have use the cmommand "axis(1,at=1:6,labels=gradeinfo$gradenam)" but it seems that the correct information that I want is superposition with the old axis
2018 Apr 25
3
Can't Get Lattice Histogram Minor Tick Marks to Work
I'm drawing a paneled histogram using the lattice package. I've succeeded in adding minor tick marks to the vertical axis, but I can't get the desired number of minor tick marks between the major tick marks. I've attached a self-contained program to illustrate the problem. Thanks for your help, Don Macnaughton Here's my sessionInfo: R version 3.4.3 (2017-11-30) Platform:
2004 Jul 01
2
y-axis of lattice panels not printing to paper
Greetings, I am printing lattice plots from the R-interface to a printer, and although the y-axes of the left-most panels are visable on the screen, they are not present on the paper when there are multiple panels (ie, >1). For example: trellis.device(bg='white') histogram(~dbh, data=diameter.df) ###print to a printer from the R-interface by clicking the print button on the