From d5bb1444d45b5f4866532fc6f70fd30e412c9fc7 Mon Sep 17 00:00:00 2001 From: Jasleen Sondhi Date: Tue, 1 Mar 2022 00:15:49 +0530 Subject: [PATCH] scatter plot 3 done --- .../R/12-visualization-relationships/README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/3-Data-Visualization/R/12-visualization-relationships/README.md b/3-Data-Visualization/R/12-visualization-relationships/README.md index a983d12..b436223 100644 --- a/3-Data-Visualization/R/12-visualization-relationships/README.md +++ b/3-Data-Visualization/R/12-visualization-relationships/README.md @@ -77,8 +77,11 @@ With this color scheme change, you can see that there's obviously a strong progr 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: -```python -sns.relplot(x="priceperlb", y="state", size="year", data=honey, height=15, aspect=.5); +```r +library(ggplot2) +ggplot(honey, aes(x = priceperlb, y = state)) + + geom_point(aes(size = year),colour = "blue") + + scale_size_continuous(range = c(0.25, 3)) ``` You can see the size of the dots gradually increasing.