Displaying 20 results from an estimated 1446 matches for "histogram".
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...
2005 Feb 02
4
Combining two histograms
I have data like:
a <- rnorm(20000)
b <- rep(FALSE,20000)
b[sample(1:20000,15000)] <- TRUE
Using Lattice graphics, I can produce two side-by-side histograms quite
easily by:
histogram(a | b)
However, I would like to produce a "single" histogram with two bars
within each bin, one for each group, as the groups are in reality very
slightly different from each other. The difference isn't evident
unless one "overlays" the two...
2010 Feb 17
1
function to display histogram fails to do so when histogram is not the last expression in the function
TestHistogram_A is a function that plots a histogram, then returns 3. For
me it fails
to display the plot, at least in the order given below.
TestHistogram_B is a function that plots a histogram, then exits. The only
difference between
the 2 functions is that B does not return 3. It displays the pl...
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 bi...
2002 Sep 06
3
Histogram Ranking
Hello,
This is not exactly an R question, but I suspect that there is an R
procedure that does what I am calling (for lack of a better name)
"histogram ranking".
I'm trying to evaluate a set of regression features by segregating by
target class and comparing the feature histograms. My idea is that if the
histograms are the same for two different classes then there is no
predictive power in those features. Conversely, if the histograms...
2010 Aug 23
1
Plotting multiple histograms on same panel
Hey everyone,
So i cant figure this out. when using histogram() from lattice instead
of hist() i get what i want as far as output. But using histogram i can
seem to be able to figure out how to get multiple plots on the same panel.
So
par(mfrow=c(3,2))
for (i in 1:20) hist(rnorm(100),main="",cex.axis=.8)
gets me about what i want but i want t...
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 Departm...
1999 Jun 08
3
histograms
...stat.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 has to
> >> be a non-parametric density estimator, period.
> >>
> >> Enough already of polemics.
>
> PD> Not quite! There is a reason for doing it the other way, namely
> PD> that the concept of a histogram generally comes befor...
2005 Feb 21
4
49 histograms on one page
...(mfrow=c(7,7))
for (i in 1:49)
hist(RATDACOM[SUBJNO==i],breaks=0.5+(0:6),
main="",xlab="",ylab="",xaxt="n",yaxt="n")
(Don't think about what RATDACOM and SUBJNO are.)
I get an error
Error in plot.new() : Figure margins too large.
36 histograms with mfrow=c(6,6) work.
But the 36 histograms are then so small that I wonder why 49 do not fit.
It seems that though I have main="",xlab="",ylab="",xaxt="n",yaxt="n" the
area reserved for axes and labels is almost as large as it would be if I
woul...
2008 May 15
1
lattice histogram problem with integers values and nint
been puzzling over this for a day.
Summary
integer variable to use with histogram, 170,000 rows. Value is day of
year. Hist works, lattice histogram with nint does not work (spurious
spikes in display), lattice histogram using breaks=c(0:365) works
fine. Spike values appear to be sum of two adjacent bins. Want to
know if this is a familiar problem, and what the recommended
w...
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...
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 his...
2000 Mar 23
1
Some "new" stuff for hist.R
...format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
--0-201145637-953833073=:7710
Content-Type: TEXT/PLAIN; charset=US-ASCII
Dear all,
I've been hacking on histograms the past couple of days. I wanted to do
two things, add histograms where the breaks of one histogram is a
subset sequence of the other, and get a histogram plot from a histogram
object. I found no function to do these things and got no response on
r-help, so I started doing it myself. I think I ha...
2006 Dec 14
2
rotated histogram
I would like to make a scatterplot, with a histogram of the x and y
variables above and to the right . I can use layout to set up the areas,
and hist(x,y) works fine for the upper histogram. However, I need a
rotated histogram on the right, and I don't know how to do this. I've
seen a solution with a bar plot on the right, but I'd lik...
2008 Jul 05
3
trying to superimpose a line plot onto a histogram
Hello,
I'm trying to superimpose a line plot onto a histogram but I'm not having
any luck. I've attached the dataset. What I did was:
> hist(data,freq=F)
Now I'm trying to superimpose the following points with a line connecting
them onto the histogram:
x y
100 0.535665393824959
200 0.212744329736556
300 0.0844933242968584
400...
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...
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 th...
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-gra...
2010 Apr 23
1
help in conditional histogram
...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'
The following object(s) are masked _by_ .GlobalEnv :
panel.histogram
>
>
>
> histogram(~ vt|ta, data=to, layout=c(1,3), type = "count",
+ panel = function(x, breaks, ...) {
+ panel.histogram(x = x, breaks = breaks, ...)
+ hh <- hist(x, breaks = breaks, plot = FALSE)
+ with(hh, panel.text(x = m...
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...