對數散佈圖配方
在這個練習中,你將建立一個序列配方,用來產生 y 軸為對數尺度的散佈圖。此外,你的配方會用額外的屬性來自訂圖表。
已載入 Plots 套件,且 streaming DataFrame 可供使用。
本練習屬於課程
Julia 資料視覺化入門
練習說明
- 建立一個名為
logscatter、型別為:scatter的序列配方。 - 定義繪圖用的
logscatter函式。 - 依序將配方套用在
Age與Hours_per_day欄位上。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# 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.____)