Skip to content

Commit

Permalink
Add compat for new Makie and GeometryBasics (#587)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrumbiegel authored Jan 15, 2025
1 parent 1c9ce43 commit 10099b0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 22 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- Increased compat to Makie 0.22 and GeometryBasics 0.5 [#587](https://github.com/MakieOrg/AlgebraOfGraphics.jl/pull/587).

## v0.8.13 - 2024-10-21

- Added aesthetics for `Stairs` [#573](https://github.com/MakieOrg/AlgebraOfGraphics.jl/pull/573).
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ Dictionaries = "0.3, 0.4"
FileIO = "1.1"
GLM = "1.7"
GeoInterface = "1"
GeometryBasics = "0.4.1"
GeometryBasics = "0.4.1, 0.5"
GridLayoutBase = "0.6, 0.7, 0.8, 0.9, 0.10, 0.11"
Isoband = "0.1"
KernelDensity = "0.6"
Loess = "0.5.1, 0.6.1"
Makie = "0.21.13"
Makie = "0.21.13, 0.22"
NaturalSort = "1"
PlotUtils = "1"
PolygonOps = "0.1.1"
Expand Down
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 10099b0

Please sign in to comment.