Skip to content

Commit

Permalink
full penguins just without Axis3
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrumbiegel committed Jan 15, 2025
1 parent 894bda2 commit 739d324
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions docs/src/generated/penguins.jl
Original file line number Diff line number Diff line change
Expand Up @@ -163,18 +163,7 @@ draw(plt; axis = axis)

draw(plt, scales(Color = (; colormap = :grayC, colorrange = (0, 6))); axis = axis)

# A `Heatmap` (the default visualization for a 2D density) is a bit unfortunate if
# we want to mark species by color. In that case, one can use `visual` to change
# the default visualization and, optionally, fine tune some arguments.
# In this case, a `Wireframe` with thin lines looks quite nice. (Note that, for the
# time being, we must specify explicitly that we require a 3D axis.)

axis = (type = Axis3, width = 300, height = 300)
layer = density() * visual(Wireframe, linewidth=0.05)
plt = penguin_bill * layer * mapping(color = :species)
draw(plt; axis = axis)

# Of course, a more traditional approach would be to use a `Contour` plot instead:
# We could also use a `Contour` plot instead:

axis = (width = 225, height = 225)
layer = density() * visual(Contour)
Expand Down Expand Up @@ -210,14 +199,6 @@ layers = linear() * mapping(group = :species) + mapping(color = body_mass, marke
plt = penguin_bill * layers
draw(plt; axis = axis)

# Naturally, within each species, heavier penguins have bigger bills, but perhaps
# counter-intuitively the species with the shallowest bills features the heaviest penguins.
# We could also try and see the interplay of these three variables in a 3D plot.

axis = (type = Axis3, width = 300, height = 300)
plt = penguin_bill * mapping(body_mass, color = :species)
draw(plt; axis = axis)

#

plt = penguin_bill * mapping(body_mass, color = :species, layout = :sex)
Expand Down

0 comments on commit 739d324

Please sign in to comment.