Displaying 20 results from an estimated 20000 matches similar to: "[ggplot] some questions"
2009 Feb 04
5
ggplot: problem with fill option in stat_smooth()
Hi all,
I am using ggplot2 and continuing to find it very useful and pretty.
However, I am trying to create some graphics for publication that would be
included in an MS Word document (not my choice!) in Windows Vista.
The problem is that I want to use stat_smooth() to add an fitted linear
model line along with its 95% confidence band, but I cannot seem to get the
confidence band in a format
2006 Oct 27
2
qplot of ggplot package how to plot different size according to the values and not to the weights?
I have the following Data structure
$ step45 : Factor w/ 2 levels
$ obserror : num 6.2 6.2 5.6 6.6 6.6 ...
$ Mon : num 2.2 2.0 1.0 3.2 2.0 ...
$ inc.comp : num 4 5 2 5 5 5 5 5 4 4 ...
all I wanted to do is plotting Mon against obserror, the colors should
be by step45 and the size of the symbol should be according to inc.comp
so I did this:
2007 Sep 20
1
ggplot and xlim/ylim
Hello everyone,
I am (happily) using ggplot2 for all my plotting now and I wondered
is there is an easy way to specify xlim and ylim somewhere when using
the ggplot syntax, as opposed to the qplot syntax. Eg.
qplot(data=mtcars,y=wt, x=qsec,xlim=c(0,30))
<->
ggplot(mtcars, aes(y=wt, x=qsec)) + geom_point() + ???
Indeed the ggplot syntax is in general more flexible and powerful and
2007 Apr 16
2
Plotting data with a fitted curve
Suppose you have a vector of data in x and response values in y. How
do you plot together both the points (x,y) and the curve that results
from the fitted model, if the model is not y ~ x, but a higher order
polynomial, e.g. y~poly(x,2)? (In other words, abline doesn't work
for this case.)
Thanks,
--Paul
--
Paul Lynch
Aquilent, Inc.
National Library of Medicine (Contractor)
2007 May 13
1
adding custom details to ggplot subplots
? stato filtrato un testo allegato il cui set di caratteri non era
indicato...
Nome: non disponibile
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20070513/ab60c7ed/attachment.pl
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?
2009 May 14
1
text() to label points in ggplot
is there a way to label points in a graph using text(locator(1),"text")
after ggplot() or qplot() ?
> qplot(date, psavert, data = economics, geom = "line",main="jhdjd")->p
> p+opts(text(locator(1),"HHHH"),new=T)
does not work.
--
View this message in context: http://www.nabble.com/text%28%29-to-label-points-in-ggplot-tp23545135p23545135.html
Sent
2009 Feb 26
1
bottom legends in ggplot2 ?
Has anyone had success with producing legends to a qplot graph such that the legend is placed on the bottom, under the abcissa rather than to the right hand side ?
The following doesn't move the legend:
library(ggplot2)
qplot(mpg, wt, data=mtcars, colour=cyl, gpar(legend.position="bottom") )
I am using ggplot2_0.8.2.
Thanks in advance,
Avram
2007 Oct 01
4
how to plot a graph with different pch
I am trying to plot a graph but the points on the graph should be
different symbols and colors. It should represent what is in the legend.
I tried using the points command but this does not work. Is there
another command in R that would allow me to use different symbols and
colors for the points?
Thank you kindly.
data(mtcars)
plot(mtcars$wt,mtcars$mpg,xlab= "Weight(lbs/1000)",
2007 Nov 08
1
ggplot2 geom_abline slope not working?
I am learning ggplot2, and need your help.
When I try
> p <- ggplot(mtcars, aes(x = wt, y=mpg)) + geom_point()
> p + geom_abline(slope=5)
(from http://had.co.nz/ggplot2/geom_abline.html)
the slope of the abline does not change, but this works:
> p + geom_abline(intercept=20)
In order to have slope work, I have to use
> p + geom_abline(aes(slope=5))
Is it a bug, or is there
2008 Jan 27
1
Putting frame around single panels in ggplot 2 and facet_grid()
Hi
I want to highlight two panels in a grid created with facet_grid() by
putting a box around it or usiong another background colour. Is this
possible, and if yes, how?
Thanks
Rainer
--
Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation
Biology (UCT)
Plant Conservation Unit
Department of Botany
University of Cape Town
Rondebosch 7701
South Africa
Tel: +27 - (0)21 650 5776 (w)
Fax:
2008 Mar 20
1
ggplot - axis labels angle
dear R-tists,
im an struggling with labeling ticks of the axis in a ggplot.
i would like to print the text associated with the ticks being ploted
with a 90 degree angle.
how can i possibly do this?
cheers.
bernd.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Bernd Ebersberger
Management Center Innsbruck, Austria
[[alternative HTML version deleted]]
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
2012 Dec 10
1
qplot error -
Dear friends, I'm on windows, R 2.15.1 -
library(ggplot2)
#compiled under 2.15.2
qplot(mpg, wt, data=mtcars, colour=cyl) # directly from the qplot help
Error in rename(x, .base_to_ggplot, warn_missing = FALSE) :
could not find function "revalue"
Is that due to a .1 lack in R
All the best
Troels Ring
2009 Jan 07
1
Fw: Re: R Stacked Histogram
Hi Jason,
> Well, one last questions about stack plot (please forgive the lame example
> below). I thought the below allow me to resize the the "title" of the
> stacked histogram, but no luck. Any suggestions as to the modificaiton
> necessary to get it to work? Right now the title is obscured by the plot
> and my boss will be none too happy. Thanks again.
Yes,
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!
2007 Dec 12
1
two-way categorical anova post-hoc data extraction
Hi list,
I have a question regarding post-hoc extraction of data from a two-way categorical anova.
I have a categorical anova of this form:
width ~ steepness + patchiness (4 steepness levels, 4 patchiness levels)
This simple setup answers if for the widths I collected across different levels of steepness and patchiness significant differences can be found. Is there a way to look at these
2007 Dec 13
2
use ggplot in a function to which a column name is given
Hi everyone, Hi ggplot users in particular,
ggplot makes it very easy to plot things given their names when you
use it interactively (and therefore can provide the names of the
columns).
qplot(x,foo,data=A) where A has columns (x,y,foo,bar) for example
but I would like to use this from inside a function to which the name
of the column is given. I cannot find an elegant way to make this
2006 Oct 24
1
[ggplot] trouble with ggabline and log-log-plots
Hello,
I'm trying to generate a log-log plot with ggplot. Within this plot, I
would like to draw a straight line with the help of ggabline which does
not work. The code is
pl1 <- qplot(correlFunc, correlFunc.ref, data=all, log=c("xy"))
pl1 <- ggabline(pl1, slope=1, intercept=0)
print(pl1) ## no line in plot :(
I can produce plots as I want, if I transform all values before
2006 Sep 03
2
lm, weights and ...
> lm2 <- function(...) lm(...)
> lm2(mpg ~ wt, data=mtcars)
Call:
lm(formula = ..1, data = ..2)
Coefficients:
(Intercept) wt
37.285 -5.344
> lm2(mpg ~ wt, weights=cyl, data=mtcars)
Error in eval(expr, envir, enclos) : ..2 used in an incorrect context,
no ... to look in
Can anyone explain why this is happening? (Obviously this is a
manufactured example, but it