Displaying 20 results from an estimated 10000 matches similar to: "ggplot2 - boxplot of variables / columns"
2010 Feb 14
2
Problems with boxplot in ggplot2:qplot
Dataframe closed contains balances of closed accounts: each row has month of
closure (Date-type column month) and latest balance. I would like to plot
by-month distributions of balances. A qplot call below produces several
warnings and no output.
Can anyone help?
Thank you.
PS. A really basic task, very similar to the examples on p. 71 of the
ggplot2 book, apart from a Date grouping column; I
2009 May 05
2
problem with ggplot2 boxplot, groups and facets
I have a following problem:
The call
qplot(wg, v.realtime, data=df.best.medians$gv1, colour=sp, geom="boxplot")
works nice: for each value of the wg factor I get two box-plots (two levels in
the sp factor) in different colours, side-by-side, centered at the wg x-axis.
However, I want to separate the data belonging to different levels of the n
factor, so I add the facets option:
2008 Oct 21
1
GGPLOT/QPLOT Boxplot with summary
I'd like to generate a boxplot that has BOTH the overall distribution of a
continuous variable (say age), and then a boxplot for each level of a
stratifying variable (e.g. site). Does anyone have prototype code for this?
Thanks,
--
View this message in context: http://www.nabble.com/GGPLOT-QPLOT-Boxplot-with-summary-tp20095591p20095591.html
Sent from the R help mailing list archive at
2009 Feb 26
1
ggplot2: labels points with different colors or idnumbers
Dear list,
Using ggplot2 I could produce both boxplot and points in the same plot but instead of points I would like to label the different
subjects with different colors or their idnumbers. Is there away to do it? Also how can I put three plots on the same graph with ggplot2?
mfrow=c(3,1) did not do the job.
> dat
group time id freq
1 1 00 0018 5.21
2 1 00 3026 3.13
2010 Jun 18
1
ggplot2 boxplot: horizontal, univariate
In ggplot2, I would like to make a boxplot that has the following properties:
(1) Contrary to default, the meaningful axis should be the horizontal axis.
Lattice does this, for instance, by
library(lattice);bwplot(~mtcars$mpg)
(2) It is *univariate*, i.e., of a single vector, say mtcars$mpg. I do not wish to make separate plots for the different values of mtcars$cyl.
(3) Nothing on the
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,
2009 Sep 29
2
ggplot2 box plot notches
Dear List,
I just googled to find out if notched box plots are possible with
ggplot2, but couldn't find a answer to it.
boxplot() has the option: notch = TRUE, e.g.: boxplot(mpg$hwy, notch=TRUE)
My example code (taken from the net) is:
require(ggplot2)
qplot(class, hwy, fill=factor(year), data=mpg, geom="boxplot",
position="dodge")+theme_bw()
Thank you for you help!
2011 Nov 16
1
boxplot strange behavior
Hello,
I generate box plots from my data like this:
qplot(x=xxx,y=column,data=data,geom="boxplot") + xlab("xxx") + ylab(ylabel) + theme_bw() + scale_y_log10() + geom_jitter(alpha=I(1/10))
The problem is that I see lot of points above the maximum at the same level as some outliers. It looks very weird as I expected the outliers to be "few" and specially not see any
2011 Jun 10
1
Double x grid in ggplot2
I am trying to overlay raw data with a boxplot as follows:
pp = qplot(factor(time, levels=0:60, ordered=TRUE),
error, data=dfsub, size=I(1), main =" title", ylab="Error
(min)",
xlab="Time before ON (min)", alpha=I(1/10),
ylim=c(-30,40), geom="jitter") +
facet_wrap(~ runway, ncol=2) +
2009 Sep 11
1
bar chart with means - using ggplot
Like this?
# example using qplot
library(ggplot2)
meanprice <- tapply(diamonds$price, diamonds$cut, mean);meanprice
cut <- factor(levels(diamonds$cut), levels = levels(diamonds$cut))
qplot(cut, meanprice, geom="bar", stat="identity", fill = I("grey50"))
dev.new() # create a new graph to compare with qplot
# Example using ggplot
ggdata <-
2010 Mar 23
2
Creating pdfs using qplot in qqplot2
I am trying to create plots within a for loop and output them to a pdf.
Here is a working example using plot:
gg <- data.frame(datadate=1:4, spread=5:8)
pdf()
for (i in 1:3) {
plot(gg$datadate, gg$spread, main=i)
}
dev.off()
I am trying to learn more about ggplot2 so I try a slight modification
and it doesn't work. Anyone
2008 Aug 25
2
ggplot boxplot - how to order categories
I am interested in creating a boxplot using ggplot or qplot where I can
specify the order of the categories being plotted on the x-axis. For
example, the following command plots the categories (diamond color) in
alphabetic order (D, E, ..., J):
qplot(color, price/carat, data=diamonds, geom="boxplot")
I want to know how I can modify this command so that the categories are
plotted in a
2012 Aug 04
2
ggplot2 boxplot help
Hello,
I have a data set that looks like this:
name G-ID test_id g-id g
1 00077464 C_068131 C_068131 OC_068131 -
2 00051728 C_044461 C_044461 OC_044461 -
3 00058738 C_050343 C_050343 OC_050343 -
4 00059239 C_050649 C_050649 OC_050649 -
5 00001761 C_000909 C_000909 OC_000909 -
6 00005119 C_002752 C_002752 OC_002752 -
locs
2009 Jan 11
2
connecting boxplots
Hii,
I created some boxplots with this commands:
x <-read.table(file="test.txt")
x$group <- rep(1:8, each=5)
boxplot(V3~gruppe, data=x)
Now, I will connect the boxplots to each other to the min, max and median
values.
Can anybody help me how to do it ?
greetings,
J
--
View this message in context: http://www.nabble.com/connecting-boxplots-tp21405459p21405459.html
Sent from
2009 Apr 26
7
Bumps chart in R
Hi there,
I would like to make a 'bumps chart' like the ones described e.g.
here: http://junkcharts.typepad.com/junk_charts/bumps_chart/
Purpose: I'd like to plot the proportion of people in select countries
living for less then one USD pr day in 1994 and 2004 respectively. I
have already constructed a barplot - but I think a bumps chart would
be better
# The barplot and data
2009 Feb 03
3
Boxplots by variable
Dear R users,
I have a matrix "final" which looks like this:
final
oSO4 oNO3 mSO4 mNO3
[1,] 3.3728 0.2110 1.9517421 1.01883602
[2,] 0.8249 0.0697 1.5970292 0.11368781
[3,] 0.2636 0.1004 0.6012445 0.24356332
[4,] 8.0072 0.3443 6.1016998 3.63207149
[5,] 13.5079 0.6593 12.4011068 1.55323386
[6,] 6.1293 0.1989 5.7620926 0.12884845
[7,] 0.6004 0.0661
2008 May 12
1
Converting qqplot2 qplot() to grammar?
Hello all,
I've been using the following qplot command:
qplot(pixX,pixY, data=som, geom="tile", fill=rgb) +
scale_fill_identity() + opts(aspect.ratio = .75) + facet_grid(unitX ~ unitY)
Now I would like to convert it into the explicit ggplot grammar, so I
can remove the extras: axes, labels, background, borders, facet labels,
and extra white-space around the plot. (If anyone has
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
2010 Jun 16
2
qplot
Hello,
I am a new r-user, and after a great effort I have made this fantastic
figure with qplot:
qplot(ROI, CBF, fill=factor(Carrier), data=combinedboxplot_dataset_se_1_CBF,
geom="boxplot", position="dodge",xlab=NULL,ylab=("CBF,white
matter-normalized"),main=("Differences between carriers and non-carriers on
baseline"))+theme_bw()
Can anyone help me
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