similar to: two histograms in the same graph

Displaying 20 results from an estimated 7000 matches similar to: "two histograms in the same graph"

2008 Jun 13
1
overlaid transparent histograms
Hello all-- I'm attempting to produce overlaid histograms with partially transparent columns. Whether this display will end up being useful, I can't say. But I do want to get it right. I've already got one solution (shown below), but I tried some other versions and had questions about my results. (Note: I'm using a quartz device, so transparency shows up correctly. You might
2010 Oct 11
2
compare histograms
Hello How to compare  two statistical histograms? How i can know if these histograms are equivalent or not??   Regards [[alternative HTML version deleted]]
2008 Jan 17
1
Res: vector generation
hi Juan, It is not so elegant, but work fine. I know that our colleagues can do it on a simple line. z<-c(526,723,110,1110,34,778,614,249,14) v1<-NULL v2<-NULL for (i in 1:(length(z)-1)) { for (j in i:length(z)) { v1<-rbind(v1,z[i]) v2<-rbind(v2,z[j]) } } df<-data.frame(cbind(v1=v1,v2=v2)) names(df)<-c("v1","v2") df$ratio<-df$v1/df$v2 Kind regards,
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
2011 Oct 21
2
stacked plot
Hi! I am trying to use ggplot2 to create a stacked bar plot. Previously I tried using barplot() but gave up because of problems with the positioning of the legend and other appearance problems. I am now trying to learn ggplot2 and use it for all the plots that I need to create for my dissertation. I am able to create normal bar plots using ggplot2, but I am stomped with the stacked bar plots.
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 Aug 19
2
ggplot2 legend problem
I'm trying to overlay two histograms using transparency to enable viewing of multiple distributions on a single scale. So far ggplot2 seems to do what I want. However I'm having a problem generating the legend coloring appropriate to each distribution in the plot. Here is a test case to show my best (failed) effort so far: library(ggplot2) x <- data.frame(X=rnorm(1000, mean=0)) y
2017 Dec 13
1
overlay two histograms ggplot
Hi all, How can I overlay these two histograms? ggplot(gg, aes(gg$Alz, fill = gg$veg)) + geom_histogram(alpha = 0.2) ggplot(tt, aes(tt$Cont, fill = tt$veg)) + geom_histogram(alpha = 0.2) thanks for any help! Elahe
2011 Jul 25
1
two sample histogram
dear all, i am anewcomer. i have a set of paired data, the values are great different from each other. i want to show them in histogram. first, how to draw each bar for corresponding paired data side by side; second, how to set the scale of y axis? one is up to 100-fold to the other. ifdoubleslash is used to omit some coordinates, the histogram will looks better. is there anyone that can help
2009 Jul 20
3
Histograms on a log scale
Dear All, I would like to be able to plot histograms/densities on a semi-log or log-log scale. I found several suggestions online http://tolstoy.newcastle.edu.au/R/help/05/09/12044.html https://stat.ethz.ch/pipermail/r-help/2002-June/022295.html http://www.harding.edu/fmccown/R/#histograms Now, consider the code snippet taken from http://www.harding.edu/fmccown/R/#histograms # Get a random
2008 Jul 08
4
Histogram with colors according to factor
Given a data frame with a continuous variable and a factor. I would like to generate a histogram of the continuous variable, where each bar is filled with different colors according to the percentage of factor values falling into this region of the continuous variable. I looked into packages like 'lattice' and 'ggplot2'. Searching R-help revealed that 'histogram' is
2012 Aug 06
4
Overlay Histogram
Dear all, For two sets of random variables, say, x <- rnorm(1000, 10, 10) and y <- rnorm(1000. 3, 20). Is there any way to overlay the histograms (and density curves) of x and y on the plot of y vs. x? The histogram of x is on the x axis and that of y is on the y axis. The density curve here is to approximate the shape of the distribution and does not have to have area 1. Thank you
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 Mar 25
5
histogram plots with many different samples
Dear R users, I would like to draw some histograms as seen in the page whose address I wrote below. I searched through the web a lot and I found a page which describes how I can do it for older versions of R. For newer versions they recommend to install the package R.basics in R.clusters but this does not exist. The address of the web page is http://www1.maths.lth.se/help/R/plot.histogram/
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
2007 Nov 22
4
more outrageous plotting
Dear Contributors: I have the next matrix: "X" "Y" "Z" 1 2 526 2 5 723 3 10 110 4 7 1110 5 9 34 6 8 778 7 1 614 8 4 876 9 6 249 10 3 14 I want to order the matrix from bigest Z (1110) to lower Z (14). Then I want to asign a color scale vector from blue ( bigest Z) to orange
2007 Jul 05
3
help with vector construction
Hi all, I want to make a vector with the third column of a matrix, but only for the 2+3n rows of the matrix, with n being an entire number from 0 to a million. How can I do that in an easy way? Thanks in advance, Juan Pablo [[alternative HTML version deleted]]
2003 Jan 10
1
Superposed histograms
I woud like to plot cumulative histograms. Specifically, I have data like Sex M M F M F F M F Height 6 6.3 6.1 5.5 7.2 6.2 5.9 6.0 .... and I want to plot a histogram of the distribution of all heights, colouring the histogram bars according to sex, for example | o | oo o | o oo ** o o = observations of women | o o*o***o * = observations of
2008 Jan 17
3
vector generation
Dear Contributors: I have the next vector: "Z" 526 723 110 1110 34 778 614 249 14 I want to generate a vector containing the ratios of all the values versus all the values of the z vector. I mean a vector containing the values of 526/723, 526/110, and so on, 723/723, 723/110, and so on, and so on. Is this doable in a simple way?? Thanks in advance again, Juan Pablo Fededa
2009 Feb 22
2
filtering a simple matrix
Hi all, I have the next matrix: a b c 1 2 23 2 3 42 3 0 54 4 5 23 5 0 22 6 7 21 7 1 20 8 9 19 I want to filter the rows with the values of b higher than 1 in a way that leaves me the next matrix: a b c 1 2 23 2 3 42 4