similar to: Histogram colours in lattice.

Displaying 20 results from an estimated 20000 matches similar to: "Histogram colours in lattice."

2011 Jun 07
1
ggplot2 Histogram with density curve
I am learning ggplot2 commands and I have figured out how to create histograms and density curves but I am not sure how to add a density curve on top of a histogram. Here are the two graphs that I created. ## Histogram t<-rnorm(500) w<-qplot(t, main="Normal Random Sample", fill=I("blue"), colour=I("black"), geom="histogram") w ##Density Curve
2009 Jan 03
2
R Stacked Histogram
I've seen this asked, but never fully answered.  Is it possible to plot stacked histograms in R? I have four data sets that I would like to show combined vertically in histogram format.  Is this possible?  Thank you for any feedback you can provide. P.S. I know I can show the four sets side by side, but I want to combine them, but still uniquely identify each.   Thanks again.
2003 Jan 25
7
Plotting coloured histograms...
Hi, I am having some trouble trying to plot a histogram in more than one colour. What I want to do is, plot two vectors in the same histogram, but with different colours, for instance: > x <- rnorm(1000,20,4); > y <- rnorm(1000,10,2); Then I'd like to have x and y ploted on the same hist (I can do that already doing w <- c(x,y) then hist(w)) but the bars
2010 Nov 30
2
ggplot2 histograms
Hi With ggplot2 I can very easily create beautiful histograms but I would like to put two histograms on the same plot. The histograms may be over-lapping. When they are overlapping the bars are shown on top of each other (so that the overall height is the sum of the two). Is there any way to get them to display overlapping (with smaller value in front, larger value behind) so that the overall
2004 Oct 01
3
controlling colour in Trellis histogram
Hello. I am sorry for posting a (seemingly) simple question, but I have just spent 2 hours trying to find the answer, without success. I want to make a histogram with conditioning on a factor, using Trellis graphics. However, I do not want any colours (only black and white) either in the histograms or in the strip. There must be some simple argument but I can’t find it. Here is my code so
2008 Jan 15
4
Overlay plots from different data sets using the Lattice package
#After spending the entire day working on this question, I have decided to reach out for support: #I am trying to overlay a densityplot from one data set over a histogram of another, if I were to plot the two individually, they would look like: # data frame construction data.frame.A <- data.frame(rnorm(12*8), c(rep("one", 4), rep("two", 4), rep("three", 4)),
2009 Aug 19
1
histogram scaling
Hi, I'm drawing two histograms in the same plot.However, my point of comparison is the difference in their x coordinates.But my problem is one histogram is much taller than the other.How can I get them both to the same height? -- Rajesh.J [[alternative HTML version deleted]]
2009 Apr 22
1
converting histogram to barchart
Hi list, After a lot of tweaking i have managed to create a histogram with an overlaying density plot. The histogram shows a sample of birth weights of babies and the density plot shows birth weights from a much larger reference populaton. My data is divided in 0.1 Kg bins so in the code below binweigh=0.1. The trouble with the current graph is that it is not very clear since the density plot
2010 Jul 29
2
ggplot2 histograms... a subtle error found
Hello all, I have a peculiar and particular bug that I stumbled across with ggplot2. I cannot seem to replicate it with anything other than my specific data set. Here is the problem: - when I try to plot a histogram, allowing for ggplot2 to decide the binwidths itself, I get the following error: - stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to
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
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 : : : :
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
2011 Jul 25
4
ggplot question: changing the label for the Y axis on a histogram
Some help with how to re-label the vertical axis in a histogram would be appreciated. qplot(off.sc,weight=rel.freq,binwidth=.29,main="test Figure"+ylab("New from inside"))+ylab("New from outside")+ xlab("off.sc\nAggregated frequency plots for 17 equal intervals.") The code
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
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
2010 Jun 28
2
Stacked Histogram, multiple lines for dates of news stories?
Dear colleagues, I have extracted the dates of several news stories from a newspaper data base to chart coverage trends of an issue over time. They are in a data frame that looks just like one generated by the reproducible code below. I can already generate a histogram of the dates with various intervals (months, quarters, weeks years) using hist.Date. However, there are two other
2010 Feb 19
1
Set Colour of Histogram Bars (lattice)
Hello there, I have a bunch of histogram bars that I'd like the first to be a certain colour, second to be another colour, third to be a third colour, and repeat for all my 39 bars. I thought this was the way to go, but I get the same cyan coloured bars for all the bars. I did a vector of 3 colours, hoping it'd recycle them for the other bars. > levels(forPlot$type) [1]
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
2010 Feb 05
1
histogram scott
Dear all, I want to use the histogtam as a density estimator, with the binwidths calculated using scott's formula which is binwidth = 3.49*ST.dev.*n^(-1/3) for the following data  (30 data points) 12-9-3-6-1-23-21-7-18-16-15-4-19-22-20-2-3-18-8-10-1-7-5-4-11-12-3-9-19-7 so first,I' ve tried this manually, and substituted in the above formula and I got st.dev.=7.02745 and thus the