similar to: Histogram color

Displaying 20 results from an estimated 10000 matches similar to: "Histogram color"

2007 Sep 17
3
Histogram with colors
Is there a simple way to plot a histogram with colors? For example, suppose I generate random points in the N(2,1) distribution: x <- rnorm(100000, mean = 2, sd = 1) Now I would like to plot the histogram: hist(x) but I would like to show the bars with x < 0 in red, and the bars with x >= 0 in lightgreen. Is there any simple way to do it? I think I can do it in two steps:
2011 Aug 23
1
histogram with mean for every break
Dear R-users, I need to produce a histogram where for every breaks there are the mean of the data. I tried tu use the function >hist(x, break=20 ... ) but this return the numerosity for every breaks, not the mean. Any hint? Thanks in advance, francesco --------------------------------------- Francesco Nutini CNR-IREA Ist. per il Rilevamento Elettromagnetico dell'Ambiente Via
2008 Oct 21
5
how to plot the histogram and the curve in the same graph
i want to plot the histogram and the curve in the same graph.if i have a set of data ,i plot the histogram and also want to see what distribution it was.So i want to plot the curve to know what distribution it like. -- View this message in context: http://www.nabble.com/how-to-plot-the-histogram-and-the-curve-in--the-same-graph-tp20082506p20082506.html Sent from the R help mailing list archive at
2008 Jul 17
3
Histogram with two colors depending on condition
Dear List, Say, we generate data like this- dat<-rnorm(1000,1,2) hist(dat) How do i make the histogram, say, red (col = 2) before X = dat = 0, and rest say, green (col = 3) beyond X = dat = 0 in R? The resulting histogram could be like this http://ehsan.karim.googlepages.com/histogram.JPG (edited) Thanks in advance. Ehsan http://ehsan.karim.googlepages.com/diaryofastatistician
2007 Dec 30
1
Histogram with different colors for different portions
Dear Rusers, I would like to color different sections of a histogram different colors. I have an example that was done by "brute force" given below. Has anyone implemented something like this in general? If not, any suggestions/pointers on how to write a general function to do so would be most appreciated. Alan-
2011 Dec 31
1
Histogram omitting/collapsing groups
I have two large datasets (156K and 2.06M records). Each row has the hour that an event happened, represented by an integer from 0 to 23. R's histogram is combining some data. Here's the command I ran to get the histogram: > histinfo <- hist(crashes$hour, right=FALSE) Here's histinfo: > histinfo $breaks ?[1] ?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 10 11 12 13 14 15 16 17 18 19 20 21
2012 Dec 03
3
Histogram plot help
Dear All: I plotted a histogram with Abline, clipping with color codes but i run into some problems. The "abline' does not show up at all, and when i request the 'prob=True' (to obtain the freqs), my clipped region colors the section of the graph instead of the plot only. Is there any way i can get the y-axis figures to be in whole numbers rather than decimals? Many thanks
2004 Aug 19
3
probability histogram question
Hello, all; I get an unexpected result when trying to plot a probability histogram with R1.9.1 on windows xp: #with the following code: > x <- runif(100,0,1) > hist(x) > hist(x, freq=F) > h <- hist(x, freq=F) > summary(h) # Length Class Mode #breaks 11 -none- numeric #counts 10 -none- numeric #intensities 10 -none- numeric #density 10
2009 Oct 01
4
Color of graph
I am trying to plot a line graph for 3 or more regression lines abline(m1) abline(m2) abline(m3) Can I change the color of each line? if so how? Thanks in advance Ashta [[alternative HTML version deleted]]
2009 Dec 27
3
help: creating a unified histogram
Good evening, I would like to put the histograms of several matrices on the same graph, together on a unified histogram (instead of having one bar per value on the x-axis, have multiple bars: one representing each matrix, with different colored bars for example to distinguish between the matrices). I couldn't find a function doing that involving "hist", "plot" nor other
2008 Sep 01
3
another histogram question
Hi there, I hope this question is not as stupid as the one before ... I tried to shorten my histogram (because the distribution is quite skewed and I simply don't want to see the long tail but still use the histogram plot). How can I do something like this? (The example does not work but I don't know why...) data <- rnorm(100) # as example, of course this is not skewed... h <-
2012 Feb 06
2
histogram
With R and the hist function, is there a way to make a histogram in which the y axis denotes propotion with respect to a separate sample dataset of the same range instead of frequency? [[alternative HTML version deleted]]
2000 Jul 09
1
Modified Histogram functions
Dear all, I have done further modifications on the histogram functions that I reported earlier this year, and I hope this can be of use and perhaps included in the distribution. I have been using this stuff a couple of months myself, and while it is nothing sophisticated, it has it's applications. :-) I did a few small modifications today to make it a bit more compact. I have modified the
2010 Apr 23
1
help in conditional histogram
Dear Dr. Sarkar, When I try to run the codes, I found the following problem: > h<- sample(1:14, 319, rep=T) > c<- sample(1:14, 608, rep=T) > n<- sample(1:14, 1140, rep=T) > vt<-c(h, c, n) > ta<-rep(c("h", "c", "n"), c(319, 608, 1140)) > > to<-data.frame(vt,ta) > library(lattice) Attaching package: 'lattice'
2005 Mar 10
1
Transparent colors OR two series on one histogram
Hi, I want to be able to plot a single histogram of a measured trait with trait values from two conditions on the same histogram to allow easy comparison. I have previously done this in excel by plotting the two series on a single bargraph having calculated frequencies in bins. You then get one condition plotted immediately to the right of the other. I hope that makes sense? I don't
2011 Jan 16
3
rootogram for normal distributions
Using R-2.12.1 and latticeExtra-0.6-14, I would like to understand why a rootogram displaying samples from the Poisson distribution looks like I expected it, whereas a rootogram using the normal distribution does not: library(latticeExtra) rootogram(~rpois(1000, lambda = 50), dfun = function(x) dpois(x, lambda = 50)) rootogram(~rnorm(1000), dfun = function(x) dnorm(x,mean(x),sd(x))) I
2011 May 05
4
Insert values to histogram
I'm trying to add the exact value on top of each column of an Histogram, i have been trying with the text function but it doesn't work. The problem is that the program it self decides the exact value to give to each column, and ther is not like in a bar-plot that I know exactly which values are been plotting. If anyone have any new idea on how to do this Thanks Matias -- View this
2008 Oct 28
2
color individual bar of histogram?
Anyone know a quick way to color one bar of a histogram? I want to mark the bar in which the most recent observation falls. So, for instance: x <- rnorm(100) latest.ob <- x[100] hist(x) ## how do I mark the bucket that latest.ob falls into? Thanks, Whit
2010 Aug 30
3
log y 'axis' of histogram
All, I have been trying to get calls to hist(...) to be plotted with the y-axis having a log scale. I have tried: par(ylog=TRUE) I have also looked at the histogram package. Suggestions welcome. -- Derek M. Jones tel: +44 (0) 1252 520 667 Knowledge Software Ltd mailto:derek at knosof.co.uk Source code analysis http://www.knosof.co.uk
2007 Aug 15
4
Possible to "import" histograms in R?
Hi, I have a large amount of data that I would like to create a histogram of and plot and do things with in R. It is pretty much impossible to read the data into R, so I have written a program to bin the data and now have a list of counts in each bin. Is it possible to somehow import this into R and use hist(), so I can, for instance, plot the probability density? I have looked at the help page