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

Drawing your first plot

To get a first feel for ggplot2, let's try to run some basic ggplot2 commands. The mtcars dataset contains information on 32 cars from a 1973 issue of Motor Trend magazine. This dataset is small, intuitive, and contains a variety of continuous and categorical variables.

Bu egzersiz

Introduction to Data Visualization with ggplot2

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

Egzersiz talimatları

  • Load the ggplot2 package using library().
  • Use str() to explore the structure of the mtcars dataset.
  • Submit the code. This will execute the example code. See if you can understand what ggplot does with the data.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Load the ggplot2 package
___

# Explore the mtcars data frame with str()
___

# Execute the following command
ggplot(mtcars, aes(cyl, mpg)) +
  geom_point()
Kodu Düzenle ve Çalıştır