Displaying 20 results from an estimated 4000 matches similar to: "ggplot2 box plot notches"
2008 Oct 08
1
Strange horns on notched box plots
Hi I'm getting a weird result when I try to switch from a normal box
plot to a notched one. The ends of the box fold down toward the
median giving a horned appearance. Is just the sample itself? It is
small, but the un-notched plot looks okay. Anyway to fix this?
e7=as.vector(c(234,37,98,116,47))
boxplot(e7, plot=TRUE, notch=TRUE)
Thanks very much.
2018 Mar 21
1
Plotting Notched Box Plots Log Scale - Losing bottom portion of box plot
Hello,
I'm using the code below to generate some notched box plots. The issue is
whenever I use log scale, the sides of the bottom part of the box plots
don't plot. I've tried it in RStudio Ver 1.1.419 and R version 3.4.3 and I
get the same result.
The code and link to my data is below.
Thank you for your time
David
MyData <-
2012 Dec 02
1
Problem with figures
I am having problem making ggplot2, tikzDevice, and knitr working together.
I used a very simple example:
---------------------------example.Rnw-----------------------------
\documentclass[preview]{standalone}
\begin{document}
\begin{figure}
<<fig1,eval=TRUE,echo=FALSE,dev='tikz'>>=
library(ggplot2)
qplot(displ, hwy, data = mpg, colour = factor(cyl))
@
\end{figure}
2006 Jan 23
1
too-large notches in boxplot (PR #7690)
PR #7690 points out that if the confidence intervals (+/-1.58
IQR/sqrt(n)) in a boxplot with notch=TRUE are larger than the
hinges -- which is most likely to happen for small n and asymmetric
distributions -- the resulting plot is ugly, e.g.:
set.seed(1001)
npts <- 5
X <- rnorm(2*npts,rep(3:4,each=npts),sd=1)
f <- factor(rep(1:2,each=npts))
boxplot(X~f)
boxplot(X~f,notch=TRUE)
I can
2004 Mar 01
3
boxplot notches
Dear list members,
Can anyone tell me how the notches in boxplot(Y~X,notch=T) are
calculated? What do these notches represent exactly? I?d suppose they
are Conficence Intervals for the median, but I?ve also been told they
might show Least Significant Difference (LSD) equivalents.
I would very much appreciate any help from you.
Best regards
Chris.
2006 Oct 09
1
boxplot, notches, etc.
Sorry to repost this, but it looks like it's getting
buried in r-help (originally posted October 5: my experience
says that if it hasn't been answered by then it won't be).
I wouldn't bother, but I'm worried that r-devel might be
better, *and* a previous e-mail of mine on the subject in
January also seemed to get buried.
Synopsis: boxplot notches look weird when notches
are
2006 Feb 26
2
How to produce notches in bwplot?
Dear r-helpers,
tst <- data.frame(as.numeric(x <- 1:20), f <- rep(c('hi','lo'), times
= 10))
with(tst, bwplot(f ~ x, panel = function(x, y){panel.bwplot(x, y, pch
= '|', stats = boxplot.stats, fill = 8, varwidth = T)}))
I can't figure out from the documentation how to tell stats that I
would like to see notches or (even bands).
Here is what I've
2009 Mar 02
3
ways to put multiple graphs on single page (using ggplot2)
Hi, Here are three plots:
library(ggplot2)
data(diamonds)
randind <- sample(nrow(diamonds),1000,replace=FALSE)
dsmall <- diamonds[randind,]
qplot(carat, data=dsmall, geom="histogram",binwidth=1)
qplot(carat, data=dsmall, geom="histogram",binwidth=.1)
qplot(carat, data=dsmall, geom="histogram",binwidth=.01)
What are ways to put these three plots on a single
2012 Jan 19
3
Not generating line chart
Hi All,
Can you please help me, why this code in not generating line chart?
library(ggplot2)
par(mfrow=c(1,3))
#qplot(TIME1, BASCHGA, data=Orange1, geom= c("point", "line"), colour= ACTTRT)
unique(Orange1$REFID) -> refid
for (i in refid)
{
Orange2 <- Orange1[i == Orange1$REFID, ]
pdf('PGA.pdf')
qplot(TIME1, BASCHGA, data=Orange2, geom= c("line"),
2010 Feb 18
2
Error message when using error.bars(x,add=TRUE)
Hey hey,
I`m analyzing a data set containing the element contentrations of various
samples...
I wanted to construct notched boxplots and got quite ugly results for some
of the boxplots. The notches are often larger then the hinges which resulted
in weird looking edges (even though I`m using a log-boxplot). To avoid this
problem I thought about using "normal" log-boxplots and adding some
2010 Jan 26
5
Strange tick in ggplot geom_area; and ordering, again
In the area plots below, I see 4 triangle ticks at both sides of the bar; I
believe these are non-stacked values for p, but they are definitively
confusing.
In addition, I would like to get the order of the colors in the plot the
same as in the legend, and not arranged alphabetically (the factor is
ordered, don't touch my order). Hadley once mentioned an undocumented
aestetics
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
2009 Apr 21
3
ggplot2 - boxplot of variables / columns
Hi,
ggplot/qplot is great - it has really helped me do some nice things.
However, simple boxplot of different columns/variables is a bit
tricky, because of (i think) qplot's generic Y conditional on X input
form. Se below.
# Some data:
a <- rnorm(100)
b <- rnorm(100,1,2)
c <- rnorm(100,2,0.5)
# normal boxplot of a,b,c
boxplot(a,b,c) # Looks good
library(ggplot2) # loads qqplot2
#
2012 Jan 16
2
ggplot2 stacked bar - sum of values rather than count
Hi,
I'm trying to create a stacked bar plot using ggplot2. Rather than
plotting the count of each of the 13 "Bar" factors on the Y axis, I
would like to represent the sum of the Values associated with each of
the 13 "Bar" factors. Is there a way to do that? Given the following
data, that would obviously mean that there would be some negative sums
represented. Here's
2009 Aug 05
2
labeling in qplot
HI
am plotting different density plots in one graph each with a different
color.
And i want to add labels to plot mentioning which color belongs to which
data series.
p2 <- qplot(corArms, data = data1, geom = "density", adjust=0.4, main="Arms
Correlation All") +
layer(data=data2, geom="density", adjust=0.4, color=I(2)) +
layer(data=data3,
2011 Feb 11
1
Time Series in R with ggplot2
Hi Folks,
First, the important information.
> sessionInfo()
R version 2.12.1 (2010-12-16)
Platform: i386-pc-mingw32/i386 (32-bit)
Second, my problem.
I have a series of data sets comprised in the following format.
> totsoc
Location Year Value
1 SOUTH 1998 29
2 SOUTH 1999 20
3 SOUTH 2000 32
4 SOUTH 2001 29
5 SOUTH 2002 25
6 SOUTH 2003 28
7
2008 Feb 21
2
jpeg() creating empty files with qplot() in a loop
Hello all,
I'm stuck with a strange issue with writing jpegs of plots to a folder
in a loop.
This works:
for (step in 1:length(steps)) {
jpeg(filename=paste("frame_",sprintf("%05d",step),".jpg",sep=""))
plot(steps[[step]])
dev.off()
}
But if I use qplot to generate the plot (which is my aim):
for (step in 1:length(steps)) {
2008 Sep 17
1
ggplot2 - deprecated guide= argument in
In the help for scale_fill_identity, it is written
## Not run:
colour <- c("red","green","blue","yellow")
qplot(1:4, 1:4, fill=colour, geom="tile")
qplot(1:4, 1:4, fill=colour, geom="tile") + scale_fill_identity()
# To get a legend, you also need to supply the labels to
# be used
2011 Jun 08
3
How to suppress factor labels
I am using ggplot2 to make a boxplot that overlays a scatterplot:
pp = qplot(time, error, data=times, size=I(1), geom="jitter", main=title,
ylab="Error (min)", xlab="Time before ON (min)", alpha=I(1/10),
color=times$runway,
ylim=c(-30,40))
pp2 = pp + with(times, facet_wrap(~ runway, ncol=2))
print(pp2 + geom_boxplot(alpha=.5,
2012 Sep 15
2
qplot: plotting precipitation data
Dear list,
I wish to plot chromatin precipitation data: I would like to have a
rectangles (x:end-start, y:peak) but I do not have an idea how to define x
(in terms of qplot syntax) and to choose the correct geom.
mydata is a subset of a larger file.
> mydata
chrom start end peak
1 chr11 5291000 5291926 8
2 chr11 10988025 10988526 7
3 chr11 11767950 11768676 8
4