Hi all,
When I run the R code in Shell to draw the graph , it shows the following mistake:
‘Error in structure(list(call = match.call(), aesthetics = aesthetics, :
object 'percent' not found
Calls: drawCI ... scale_y_continuous -> continuous_scale -> structure
Execution halted’
The function I use to draw the graph is:
if(nrow(ExpInfo) == 3) {
title <- paste('(',as.character(ExpInfo$Name[1]), ", version: ",as.character(vrsn),')',sep='')
}
df = as.data.frame(forplot)
df$metric = as.factor(unlist(df$metric))
df$lift = unlist(df$lift)
df$name = unlist(df$name)
g = ggplot(df, aes(metric, lift))
g + scale_x_discrete(name='Metrics',
breaks=n,
labels=displayname
) + scale_colour_hue(name='Legend') + scale_y_continuous('Lift', label = percent) + opts(title = paste(expID, title, rawStr), axis.text.x=theme_text(angle=90)) + stat_summary(
fun.y = function(x) median(x),
fun.ymin = function(x) min(x),
fun.ymax = function(x) max(x),
geom='pointrange', aes(color=name), position=position_dodge(width=0.20)) + geom_hline(aes(yintercept=0), colour='#AA0000')
ggsave(file=plotfile, width=15, height=6)
Thanks,
yuanyuan
--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2
---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
| From: | "Jiang, Yuan-yuan(AWF)" <yuan...@ebay.com> |
| To: | "ggp...@googlegroups.com" <ggp...@googlegroups.com> |
| Date: | 03/21/2013 09:27 AM |
| Subject: | problem about ggplot2 |
| Sent by: | ggp...@googlegroups.com |
--
--
You received this message because you are subscribed to the ggplot2 mailing
list.
Please provide a reproducible example:
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2
---
You received this message because you are subscribed to the Google Groups
"ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to ggplot2+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.