Fixed ggplot.profr to produce meaningful output (i.e. similar to plot.profr) #2

Open
wants to merge 2 commits into
from

Projects

None yet

2 participants

@andrie

Fixed ggplot.profr to produce meaningful output (i.e. similar to plot.profr)

@hadley hadley commented on an outdated diff Aug 31, 2011
stop("Please install ggplot2 to use this plotting method")
data$range <- diff(range(data$time))
-
- ggplot(as.data.frame(data)) +
- geom_rect(aes(xmin = start, xmax = end, ymin = level - 0.5, ymax = level + 0.5),
- fill = "grey95", colour = "black", size = 0.5) +
- geom_text(aes(start + range / 60, level, label = f),
- data = subset(data, time > max(time) * minlabel),
- size = 4, angle = angle, hjust = 0) +
- scale_y_continuous("time") +
- scale_x_continuous("level")
+ ggplot(as.data.frame(data), aes(y=level)) +
+ geom_rect(
+ #aes(xmin=(level), xmax=factor(level)+1, ymin=start, ymax=end),
@hadley
hadley Aug 31, 2011

Can you remove the commented lines? Remembering them is git's job ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment