You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
p <- ggplot(district_density,aes(x=cluster, y=dem_margin, fill=cluster)) +
@@ -68,7 +68,7 @@ chart_link
68
68
```
69
69
70
70
### Flipping the Axes
71
-
With geom_violin(), the y-axis must always be the continuous variable, and the x-axis the ctegorical variable. To create horizontal violin graphs, add coord_flip() without changing .
71
+
With geom\_violin(), the y-axis must always be the continuous variable, and the x-axis the categorical variable. To create horizontal violin graphs, keep the x- and y-variables as is and add coord\_flip().
72
72
73
73
```{r, results='hide'}
74
74
library(plotly)
@@ -119,7 +119,7 @@ chart_link
119
119
```
120
120
121
121
### Customized Appearance
122
-
Add colour to the facet titles, centre-align the itle, rotate the y-axis title, change the font, and get rid of the unnecessary legend. Note that coord_flip() flips the axes for the variables and the titles, but does not flip theme() elements.
122
+
Add colour to the facet titles, centre-align the title, rotate the y-axis title, change the font, and get rid of the unnecessary legend. Note that coord_flip() flips the axes for the variables and the titles, but does not flip theme() elements.
123
123
124
124
```{r, results='hide'}
125
125
library(plotly)
@@ -150,7 +150,7 @@ chart_link
150
150
```
151
151
152
152
### Rotated Axis Text
153
-
Rotated the x-axis text 45 degrees, and used facet_grid to create a 4x4 facet (compared to facet_wrap, which defaults to 2x2).
153
+
Rotated the x-axis text 45 degrees, and used facet\_grid to create a 4x1 facet (compared to facet\_wrap, which defaults to 2x2).
With geom_violin(), the y-axis must always be the continuous variable, and the x-axis the ctegorical variable. To create horizontal violin graphs, add coord_flip() without changing .
71
+
With geom\_violin(), the y-axis must always be the continuous variable, and the x-axis the categorical variable. To create horizontal violin graphs, keep the x- and y-variables as is and add coord\_flip().
Add colour to the facet titles, centre-align the itle, rotate the y-axis title, change the font, and get rid of the unnecessary legend. Note that coord_flip() flips the axes for the variables and the titles, but does not flip theme() elements.
120
+
Add colour to the facet titles, centre-align the title, rotate the y-axis title, change the font, and get rid of the unnecessary legend. Note that coord_flip() flips the axes for the variables and the titles, but does not flip theme() elements.
0 commit comments