LoslegenKostenlos loslegen

Pump it up

For this exercise, your task is to create a scatter plot using the data on music's effects on mental health and customize the marker attributes, including the marker color, size, and shape. Additionally, you will adjust the opacity of the markers to enhance the visualization of point density.

The Plots package has already been imported, and the streaming DataFrame is readily accessible.

Diese Übung ist Teil des Kurses

Introduction to Data Visualization with Julia

Kurs anzeigen

Anleitung zur Übung

  • Select the :vibrant theme for your plots.
  • Generate a scatter plot comparing the beats per minute (BPM) shown on the y-axis to the Age variable shown on the x-axis.
  • Customize the markers to have a size of 4, a :purple color, and a :pentagon shape.
  • Adjust the opacity level to 0.5.

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Choose theme
____(____)

# Create scatter plot
scatter(
	streaming.____, streaming.____,
    label=false,
    # Marker attributes
    markersize=____, markercolor=:____,
    markershape=:____,
    # Opacity
    ____=____,
)
xlabel!("Age")
ylabel!("BPM")
Code bearbeiten und ausführen