Displaying 20 results from an estimated 10000 matches similar to: "Combining two histograms"
2005 Jun 13
3
Lattice: Combining xyplot and histogram
Dear all,
I am trying to create a lattice plot which consists of 1 xyplot and 2
histograms (each for x and y).
My first try was like this:
x<-rnorm(1000)
y<-rnorm(1000)
xy <- xyplot(y~x)
hist.x <- histogram(x)
hist.y <- histogram(y)
print(xy, position=c(0, 0.2, 1, 1), more=TRUE)
print(hist.x, position=c(0, 0, 1, 0.33),more=T)
print(hist.y, position=c(0.8, 0, 1, 1))
Ok, this is
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
2005 Nov 29
1
Superimpose Histograms
Hi all,
I have data which is represented as a histogram and want to add more
data / another histogram to this plot using another color. That is I
need to superimpose multiple histograms.
But have no idea how to do this.
Can anybody please give me a hint?
Thanks,
Andreas
--
Andreas Wilm
Institut fuer Physikalische Biologie
Heinrich-Heine-Universitaet Duesseldorf
2003 Jul 03
4
Generating a vector for breaks in a histogram
Hi
I have two lots of numbers which I would like to histogram using the hist() function. For comparative reasons, I want them to be on the same scale, which I can use the xlim and ylim options to achieve.
However, having them on the same scale is meaningless unless they have the same "breaks". Consulting the documentation, there are 4 ways of defining the number of breaks, only one
1999 Jun 08
3
histograms
> >>>>> "PD" == Peter Dalgaard BSA <p.dalgaard at biostat.ku.dk> writes:
>
> PD> "Venables, Bill (CMIS, Cleveland)" <Bill.Venables at cmis.CSIRO.AU>
> PD> writes:
> >> The fact that every elementary book on statistics does it this way
> >> does not make it correct. To be helpful, a histogram really
2006 Aug 10
3
Multiple density curves
Hi,
I am new to R...a recent convert from SAS.
I have a dataset that looks like this:
SEQ A1 A2
A 532.5 554.5
B 25.5 35.5
C 265.2 522.2
D 245.55 521.56
E 546.52 141.52
F 243.25 32.56
G 452.55 635.56
H 15.14 16.54
I 543.4 646.56
J 54.4 654.5
K 646.5 64.54
L 645.4 614.46
M 646.54 634.46
I want to make a histogram
2006 Jun 28
2
superimposing histograms con't
Earlier, I posted the following question:
I want to superimpose histograms from three populations onto the same graph,
changing the shading of the bars for each population. After consulting the
help files and the archives I cannot find out how to do this (seemly)
simple graph. To be clear, I want
- a single x axis (from -3 to 18)
- three groups of bars forming the histograms of each population
2001 Nov 12
3
histogram question
hist(rbinom(1000,10,0.5),col=2,xlim=c(0,10),ylim=c(0,300))
gives a histogram with "touching bars"
hist(rbinom(100000,10,0.5),col=2,xlim=c(0,10),ylim=c(0,30000))
gives a histogram with space between the bars.
is there a way to control the space betweent he bars easily?
--
Erich Neuwirth, Computer Supported Didactics Working Group
Visit our SunSITE at http://sunsite.univie.ac.at
2011 Jul 27
1
How to adjust y-axis when using panel.densityplot within histogram function
Hi
I would like to superimpose group-specific densityplots on top of an overall
histogram using panel.histogram and panel.densityplot. Furthermore, I would
like to automatically adjust the range of the y-axis to take into account
the ranges of both histogram and densityplot. This last part is where I have
a problem. I believe using the prepanel argument of histogram is typically
the way to go,
2005 Nov 02
1
Visualizing a Data Distribution -- Was: breaks in hist()
> > Leaf Sun wrote:
> > The histogram is highly screwed to the right, say, the range
> > of the vector is [0, 2], but 95% of the value is squeezed in
> > the interval (0.01, 0.2).
I guess the histogram is as you wrote. See
http://web.maths.unsw.edu.au/~tduong/seminars/intro2kde/
for a short explanation.
> -----Original Message-----
> From: Berton Gunter
2010 May 31
4
Y-axis range in histograms
Hi,
I'm trying to create a histogram with R. The problem is that the frequency
is high for a couple of x-axis categories (e.g. 1500) and low for most of
the x-axis categories (e.g. 50)
http://r.789695.n4.nabble.com/file/n2237476/LK3_hist.jpg . When I create the
histogram, it is not very informative, because only the high frequencies can
be seen clearly. Is there any way I could cut the
2005 Nov 02
2
breaks in hist()
Dear listers,
A quick question about breaks in hist().
The histogram is highly screwed to the right, say, the range of the vector is [0, 2], but 95% of the value is squeezed in the interval (0.01, 0.2). My question is : how to set the breaks then make the histogram look even?
Thanks in advance,
Leaf
2011 Aug 10
2
Histograms in R
HI everyone,
I'm plotting a histogram in R and within that histogram i need to
demonstrate the percentage of another variable (Percentage of MutStatus)
within the bins plotted inthe histogram....I don't know how to do that!
Data:Validation_Status Mutation_Status TvarRatio
Wildtype None 0.08
Wildtype None 0.08
Wildtype None 0.08
Wildtype None 0.08
Wildtype None 0.080139373
Wildtype None
2010 Jul 09
3
how to plot two histograms overlapped in the same plane coordinate
Dear R-help listers,
I am new. I just want to get helps on how to plot two histograms
overlapped in the same plane coordinate. What I did is very ugly.
Could you please help me to improve it? I want to got a plot with semi-
transparent overlapping region. And, I want to know how to specify the
filled colors of the different histograms.
I also prefer other solutions other than ggplot2.
Many
2003 Oct 28
1
stacking histograms
Hi,
I have a set of observations which are divided into two sets A and B.
I have some code that bins the dataset into 10 bins based on the max and
min of the observed values.
I would like to make a histogram of A & B using my calculated bins but
plot the distribution of B on top of A (like a stacked barplot). This is
possible since both sets A & B are binned using the same bin ranges.
2008 Feb 11
2
Questions about histograms
Hello
I'm doing some experiments with the various histogram functions and I
have a two questions about the "prob" option and binning.
First, here's a simple plot of my data using the default hist()
function:
> hist(data[,1], prob = TRUE, xlim = c(0, 35))
http://go.sneakymustard.com/tmp/hist.jpg
My first question is regarding the resulting plot from hist.scott() and
2006 Oct 13
1
side by side plot of Histogram and densityplot
Using "par" seems easily put a "hist" and a density side by side on the same output window.
I would like to use some features in "histogram" from Lattice, but how can I put
"histogram" and "densityplot" side by side on the same graph?
Thank you
par(mfrow=c(2,1))
hist(y)
plot(density(y))
Jue Wang, Biostatistician
Contracted Position for
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, ...) {
2008 May 12
2
Cumulative lattice histograms
An embedded and charset-unspecified text was scrubbed...
Name: inte tillg?nglig
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20080512/9533b31f/attachment.pl>
2008 Jan 24
4
two histograms in the same graph
Dear Contributors:
I have two vectors x and z, and I want to display the histograms of both
vectors in the same graph, x in red bars, z in blue bars.
If you have any clue on how to do that, I will be very glad to hear it!!!!!!
Thanks in advance again,
Juan Pablo Fededa
[[alternative HTML version deleted]]