MulaiMulai sekarang secara gratis

Log scatter recipe

In this exercise, you will create a series recipe that generates scatter plots with a logarithmic y-axis scale. Additionally, your recipe will customize the plot with additional attributes.

The Plots package is loaded, and the streaming DataFrame is available.

Latihan ini adalah bagian dari kursus

Introduction to Data Visualization with Julia

Lihat Kursus

Petunjuk latihan

  • Create a series recipe called logscatter of type :scatter.
  • Define the plotting logscatter function.
  • Apply the recipe on the Age and Hours_per_day columns, in that order.

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Series recipe
____ function f(::Type{Val{:____}}, x, y, z)
    seriestype := :____
    framestyle := :box
    label := false
    yscale := :log10
    markershape := :star4
    markercolor := :purple3
    markersize := 5
    markeralpha := 0.5
end
# Define plotting function
____ ____
# Apply recipe
____(streaming.____, streaming.____)
Edit dan Jalankan Kode