Thanks a lot, Brian!
--
View this message in context:
http://n4.nabble.com/Problems-with-boxplot-in-ggplot2-qplot-tp1555338p1558810.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.ethz.ch
Now that we have a reproducible example... ;)
--
View this message in context:
http://n4.nabble.com/Problems-with-boxplot-in-ggplot2-qplot-tp1555338p1557994.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing
On 2/15/2010 2:41 PM, Dimitri Shvorob wrote:
> library(sqldf)
> library(ggplot2)
>
> t = data.frame(t = seq.Date(as.Date("2009-01-01"), to =
> as.Date("2009-12-01"), by = "month"))
> x = data.frame(x = rnorm(5))
> df = sqldf("select * from t, x")
A simpler way to get random data that doesn't invo
library(sqldf)
library(ggplot2)
t = data.frame(t = seq.Date(as.Date("2009-01-01"), to =
as.Date("2009-12-01"), by = "month"))
x = data.frame(x = rnorm(5))
df = sqldf("select * from t, x")
qplot(factor(df$t), df$x, geom = "boxplot") + theme_bw()
qplot(factor(df$t), df$x, geom = "boxplot") + the
Without a reproducible example, it's impossible to give you any more
suggestions.
Hadley
On Mon, Feb 15, 2010 at 2:16 PM, Dimitri Shvorob
wrote:
>
> Trying
>
> + scale_x_date(format = "%b")
>
> produces a peculiar result: Apr and Dec facets are labeled "Jan", remaining
> labels are blank.
> --
>
Trying
+ scale_x_date(format = "%b")
produces a peculiar result: Apr and Dec facets are labeled "Jan", remaining
labels are blank.
--
View this message in context:
http://n4.nabble.com/Problems-with-boxplot-in-ggplot2-qplot-tp1555338p1556573.html
Sent from the R help mailing list archive at N
Thank you, Hadley. I try
jpeg(file, width = 800, height = 600, quality = 100)
qplot(factor(closed$close.month), closed$closing.balance, geom = "boxplot",
main = "Monthly distributions of closing balances", xlab = "Month",
ylab = "Balance, USD") + theme_bw() + scale_x_date(major = "months",
Hi Dimitri,
Have you looked at the examples for scale_x_date -
http://had.co.nz/ggplot2/scale_date.html? They show you how to both
set the limits and control the labels.
Hadley
On Sun, Feb 14, 2010 at 1:34 PM, Dimitri Shvorob
wrote:
>
> ... Unfortunately, a problem remains: I cannot label x ti
My bad: once I ran dev.off(), I did get a plot, albeit a blank one. Then I
removed xlim - which I put in after qplot's complain about xlim - and voila!
Thanks a lot.
--
View this message in context:
http://n4.nabble.com/Problems-with-boxplot-in-ggplot2-qplot-tp1555338p1555352.html
Sent from the
... Unfortunately, a problem remains: I cannot label x ticks a la 'names.arg
= '.
month has values like '2009-01-01', '2009-02-01', etc., while I would prefer
'Jan', 'Feb'. Using
closed$month = format(closed$month, "%b")
disrupts the order of plot's panels, which now follows the alphabetic o
Hi,
it's hard to tell what's wrong without a reproducible example, but I
noted two things:
- AFAIK there is no plot method for ggplot2. You probably meant print(p) instead
- if you map x to factor(month), I think it will be incompatible with
your xlim values range(month).
HTH,
baptiste
On 14
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
12 matches
Mail list logo