Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

navigationg ggplot2 #3

Open
cbarbu opened this issue Sep 6, 2013 · 0 comments
Open

navigationg ggplot2 #3

cbarbu opened this issue Sep 6, 2013 · 0 comments

Comments

@cbarbu
Copy link
Owner

cbarbu commented Sep 6, 2013

ggplot2 uses it's own graphics tricks and it would take a bit of work to adapt (but should fix at the same time session and navigation)

It replayPlot fine but the use of do.call is messed up:
Error in do.call(fn, alst) : could not find function "drawGTree"
and the modif of the xlim/ylim may well be messed up too.

If anybody is interested in fixing that, please do and make a pull request.

The aim would be to make the basic example to work:
df <- data.frame(gp = factor(rep(letters[1:3], each = 10)),
y = rnorm(30))
# Compute sample mean and standard deviation in each group
library(plyr)
ds <- ddply(df, .(gp), summarise, mean = mean(y), sd = sd(y))

 # Declare the data frame and common aesthetics.
 # The summary data frame ds is used to plot
 # larger red points in a second geom_point() layer.
 # If the data = argument is not specified, it uses the
 # declared data frame from ggplot(); ditto for the aesthetics.
 ggplot(df, aes(x = gp, y = y)) +
    geom_point() +
    geom_point(data = ds, aes(y = mean),
               colour = 'red', size = 3)

zm()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant