Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
ggplot2 is an actively maintained open-source chart-drawing package for R, written by Hadley Wickham, based upon the principles of "Grammar of Graphics". It partially replaces R's basic plot and the lattice package, while providing a clean, powerful, orthogonal and fun API.
3
votes
Accepted
Adding a trend line or horizontal mean±stdev lines in facet_grid view
See below;
library(dplyr)
library(tidyr)
library(ggplot2)
Interactions %>%
group_by(Tier) %>%
summarise(mean = mean(TotalInteractions),
`mean-stdev` = sum(mean(TotalInteractions), -sd …
3
votes
Mirror column plot with different y-axis in ggplot
library(dplyr)
library(ggplot2)
library(tidyr)
## Calling geom_col twice
mpg %>%
group_by(manufacturer) %>%
summarise_if(is.numeric, mean) %>%
select(manufacturer, cty, hwy) %>%
ggplot() + …