Displaying 20 results from an estimated 800 matches similar to: "ggplot2 histogramm"
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
2006 Oct 13
4
Log-scale in histogramm
Hello
My data looks ugly in a normal histogramm. How can I create a histogramm with a Y-axis in log-scale?
Thanks for your help!
David Graf
--
2011 Jan 31
2
Can i make an histogramm with bars on the Y-axis ?
Hi,
My question is in the subject.
Here, a picture that's illustrating my problem :
http://r.789695.n4.nabble.com/file/n3248321/graph.png
This figure comes from an article published in Cancer Cell by K.E. Gascoigne
and S.S. Taylor in 2008.
Thanks you very much and sorry for my English.
--
View this message in context:
2006 Nov 30
1
3D histogramm
thank you for your answer i checked my code and it now works
One more question... do you know how to have an 3D histogramm from a known
matrix of probabilities
Cline
>From: "David Barron" <mothsailor at googlemail.com>
>To: "C?line Henzelin" <celine_appui at hotmail.com>, r-help
><r-help at stat.math.ethz.ch>
>Subject: Re: [R] (no subject)
2008 Dec 26
1
histogramm$density
hello,
i am using the hist function with classified values. The class breaks are >1, so
histogram$density is != 1.
How to plot the histogram with freq=FALSE and the real class density values.
I used:
> h2 = hist(value, breaks = breaks_vector)
> h2$density = round(h2$counts/sum(h2$counts), 2)
> h2$intensities = h2$density
> plot(h2, freq=F)
but this isn't the best way, i
2005 Jun 01
3
histogramm?
Hello there!
When I do freq=F on hist, I get on the left a small number, what exactly
does that mean?
Thanks,
Martin
2016 Apr 09
1
Run script R
hi all ,?
i have an problem in script R . But when I execute the script R I face this error . can you help me please ???error:-----------------------------------------
Error in FUN(X[[i]], ...) :?? Theme element 'text' has NULL property: margin, debugIn addition: Warning messages:1: Removed 361 rows containing non-finite values (stat_smooth).?2: Removed 361 rows containing missing values
2009 Dec 07
2
data.frame to "stacked frame"
Hi,
have anybody a hint how i could avoid the cumbersome way (..especially
the value part)
change the data representation from n column data.frame to an stacked
representation.
many thanks
Christian
#example data
dfw <- as.data.frame(matrix(runif(10*10),ncol=10))
dfw$group <- sample(c("X","Z"),nrow(dfw),replace=T,prob=c(0.75,0.25))
# change
var <-
2009 Jul 23
1
Another question on gplot
I am getting following strange error :
library(sn)
library(ggplot2)
dat1 <- as.matrix(rsn(1000, 0, 1, 0))[,1]
ggplot() + geom_histogram(aes(x = dat1, y = ..density.., fill = ..count..))
+
xlab("Distribution") + scale_y_continuous("")
Error: No data for layer
Can anyone please tell me why it is coming?
--
View this message in context:
2003 Jul 29
4
pxelinux 2.04+ hangs after loading kernel
Hi,
I just tried to boot my token ring devices with 2.05 - to no avail,
it hangs after loading the kernel. I then tried older versions, and found
2.03 booting like a charm, and every 2.04-pre including 2.04 hanging.
Here's the config of the devices:
- Networkstation 2800 with IBM PCI Token Ring card 2
- IBM Thinkpad T21 with IBM PCI Token Ring card 2
Maybe this has to do with the changes
2017 Aug 05
2
Nested for loop
Hi! Thanks for taking the time to read this.
The code below creates a graph that takes 100 samples that are between 5%
and 15% of the population (400).
What I'd like to do, however, is add two other sections to the graph. It
would look something like this:
from 1-100 samples take 100 samples that are between 5% and 15% of the
population (400). From 101-200 take 100 samples that are between
2012 Sep 19
2
ggplot formato dígitos en ggplot2
Hola de nuevo.
Resulta que al actualizar a la versión 0.9.2 de ggplot2 , ahora en mi
eje continuo y , los valores se etiquetan en formato científico , cuando
antes era normal. Es decir, mis valores máximos están sobre 300000, pero
en el eje ahora pone 3e+05 y no he encontrado como cambiarlo.
He visto que se puede cambiar utilizando el paquete scales y utilizando
por ejemplo , siendo p un
2012 Feb 01
1
ggplot2(0.9.0): could not find function "=="
Hi,
I have a question related to the newest version of ggplot2 (0.9.0). I
just updated this morning and from CRAN it looks like the Mac version
is the only one at 0.9.0 as of right now.
http://cran.r-project.org/web/packages/ggplot2/index.html
Anyway, I was in the midst of a project where I was trying to
replicate "Back-to-back Bar Charts" in this blog post.
2011 Jan 14
2
bug in qplot (library ggplot2)
Hello,
this following code give a nice png:
/library(ggplot2)
i <- 1
png(file=paste('test ',i,'.png',sep=''))
qplot(carat, data=diamonds,
fill=color,geom='histogram')+scale_y_continuous(i)
dev.off()
/
I would like to get more files, but the following code doesn't make any
file:
/library(ggplot2)
for (i in 1:2) {
png(file=paste('test
2007 Dec 11
2
ggplot - Setting the y-scale in a bar plot
Dear All (probably Hadley),
I am now trying to customise some plots using a bar geom.
I do not want to use the default binning statistic, but rather
calculate the bar heigths separately. I do manage this, but for
comparison purposes I would like to have a set of plots all with the
same y-axis height. But I do not seem to find out how to fix the
scale of the y-axis in this case.
Any tips?
2013 Mar 25
2
Plot Matrix with Data
Hi ,
I would like to use ggplot2 to plot a matrix as an image.
You can copy paste the following
Data<-matrix(data=rnorm(900,80,20),nrow=30,ncol=30)
lengthOut<-5
Lengths<- 15
library(reshape2)
library(ggplot2)
tdm <- melt(Data)
ggplot(tdm, aes(x = Var2, y = Var1, fill = factor(value)),levels=seq(0,1,by=0.1)) +
labs(x = "MHz", y =
2010 Nov 02
5
Question about ggplot2
Dear All,
I am trying to graph a simple scatter plot where the x axis is year
and the y axis is a percentage (percentage of infant death). Instead
of plotting the raw data, I want to plot summary statistics such as
mean and median. Here is the problem: the value range of y is between
0 and 1, but since infant death is a rare event, the mean and median
is very low (something like 5%), which shows
2007 Nov 01
1
ggplot2 - expand range?
Dear UserRs,
I am trying to use systematically ggplot2 for most of my plots, but I
am fighting some lack of documentation, which I try to overcome.
I want to build a scatterplot where the axes cross exactly at (0,0).
I tried using scale_y_continuous(limits=c(0,10)), but I always get an
extra space at the bottom of the axes. The code I used is below.
> plotdata<-data.frame(x=1:10,
2017 Oct 12
2
dual y-axis for ggplot
Hi,
To my knowledge, an excellent of ggplot with a second y-axis is
https://rpubs.com/MarkusLoew/226759
In this example, the author uses two colors for the two lines, but the
line shapes are the same -- both are solid. Could each line have its own
color as well as its own shape? For example, can I make the red line with
the linetype "twodash", while the blue line with the
2002 Jul 21
1
change margins or regions?!
Dear guRus,
after solving serveral other probs with boxplots, my ylabs do not appear
correct.
They area cut off.
I guess I have to change the letf and right margins, but I do not know
how.
Here is an example:
http://frosch.homelinux.org/tmp/plot.png
Thats the code i tried to use:
<R-code>
oldpar <- par()
# changing the margins
par(mar=c(4.1,5.1,4.1,5.1) +0.1)
P <- boxplot(bs.s ~