Skip to content

Commit 0b1c770

Browse files
committed
2 parents 9b32813 + d5bb144 commit 0b1c770

File tree

1 file changed

+5
-2
lines changed
  • 3-Data-Visualization/R/12-visualization-relationships

1 file changed

+5
-2
lines changed

3-Data-Visualization/R/12-visualization-relationships/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,11 @@ With this color scheme change, you can see that there's obviously a strong progr
7777

7878
Another way to visualize this progression is to use size, rather than color. For colorblind users, this might be a better option. Edit your visualization to show an increase of price by an increase in dot circumference:
7979

80-
```python
81-
sns.relplot(x="priceperlb", y="state", size="year", data=honey, height=15, aspect=.5);
80+
```r
81+
library(ggplot2)
82+
ggplot(honey, aes(x = priceperlb, y = state)) +
83+
geom_point(aes(size = year),colour = "blue") +
84+
scale_size_continuous(range = c(0.25, 3))
8285
```
8386
You can see the size of the dots gradually increasing.
8487

0 commit comments

Comments
 (0)