开始使用免费开始使用

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.

本练习是课程的一部分

Introduction to Data Visualization with Julia

查看课程

练习说明

  • 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.

交互式实操练习

通过完成这段示例代码来试试这个练习。

# 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.____)
编辑并运行代码