-
Notifications
You must be signed in to change notification settings - Fork 634
Avoid layering multiple bars when there should be one #213
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
Changes from 3 commits
e32273a
3362a6b
c00b5b8
a026b9b
4e00343
d861518
edf055b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -579,11 +579,15 @@ geom2trace <- list( | |
# Convert days into milliseconds | ||
x <- as.numeric(x) * 24 * 60 * 60 * 1000 | ||
} | ||
L <- list(x=x, | ||
y=data$y, | ||
# if there is more than one y-value for a particular combination of | ||
# x, PANEL, and group; then take the _max_ y. | ||
data$x <- x | ||
dat <- plyr::ddply(data, c("x", "PANEL", if("group"%in%names(data))"group"), | ||
plyr::summarise, count = max(y)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not? I know this is not native R/ggplot2, as it won't render in the static There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was being overly paranoid since it won't make sense unless However, even when (BTW, this link should be more stable -- https://gallery.shinyapps.io/ggtree/ ) |
||
L <- list(x=dat$x, | ||
y=dat$count, | ||
type="bar", | ||
name=params$name, | ||
text=data$text, | ||
marker=list(color=toRGB(params$fill))) | ||
if (!is.null(params$colour)) { | ||
L$marker$line <- list(color=toRGB(params$colour)) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespaces in this conditional statement, please.