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

Aging and having kids

In this exercise, you will generate a two-dimensional histogram to visualize the distribution of data points based on both age and the number of children.

To facilitate this task, the DataFrames and StatsPlots packages have already been imported, and the insurance DataFrame has been successfully loaded.

Bu egzersiz, kursun bir parçasıdır

Introduction to Data Visualization with Julia

Kursa Göz Atın

Egzersiz talimatları

  • Generate a two-dimensional histogram to display the data from the insurance DataFrame.
  • Utilize the :Age and :Children columns for the histogram.
  • Ensure that the points with no counts are filled in the histogram plot.

Uygulamalı etkileşimli egzersiz

Bu egzersizi bu örnek kodu tamamlayarak deneyin.

# Create 2d histogram
@df insurance ____(
	# Pass column names
	:____,
    :____,
    fillcolor=:haline,
    # Fill empty bins
    ____=____
)
xlabel!("Age")
ylabel!("Number of Children")
Kodu Düzenle ve Çalıştır