BaşlayınÜcretsiz Başlayın

Changing one geom or every geom

If you have multiple geoms, then mapping an aesthetic to data variable inside the call to ggplot() will change all the geoms. It is also possible to make changes to individual geoms by passing arguments to the geom_*() functions.

geom_point() has an alpha argument that controls the opacity of the points. A value of 1 (the default) means that the points are totally opaque; a value of 0 means the points are totally transparent (and therefore invisible). Values in between specify transparency.

The plot you drew last time is provided in the script.

Bu egzersiz

Introduction to Data Visualization with ggplot2

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Map the color aesthetic to clarity
ggplot(diamonds, aes(carat, price)) +
  geom_point() +
  geom_smooth()
Kodu Düzenle ve Çalıştır