Skip to content

Commit 1e1e0ba

Browse files
authored
Merge branch 'master' into axis3d
2 parents daa24cf + f200f3d commit 1e1e0ba

File tree

12 files changed

+45
-15
lines changed

12 files changed

+45
-15
lines changed

.github/workflows/reference_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ jobs:
145145
# dev mono repo versions
146146
pkg"registry up"
147147
Pkg.update()
148-
pkg"dev . ./MakieCore ./WGLMakie ./ReferenceTests; add Bonito#sd/fix-ci"
148+
pkg"dev . ./MakieCore ./WGLMakie ./ReferenceTests"
149149
- name: Run the tests
150150
continue-on-error: true
151151
run: >

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## [Unreleased]
44

5+
- Added `alpha` keyword to `density` recipe [#4975](https://github.com/MakieOrg/Makie.jl/pull/4975).
6+
7+
## [0.22.5] - 2025-05-12
8+
59
- Added LegendElements for meshscatter, mesh, image, heatmap and surface [#4924](https://github.com/MakieOrg/Makie.jl/pull/4924)
610
- Moved some of the TextureAtlas logic to JS, speeding up text updates and fixing texture atlas updates [4942](https://github.com/MakieOrg/Makie.jl/pull/4942).
711
- Added ability to hide and show individual plot elements by clicking their corresponding `Legend` entry [#2276](https://github.com/MakieOrg/Makie.jl/pull/2276).
@@ -11,6 +15,7 @@
1115
- Fixed issues with anisotropic markersizes (e.g. `(10, 50)`) causing anti-aliasing to become blurry in GLMakie and WGLMakie. [#4918](https://github.com/MakieOrg/Makie.jl/pull/4918)
1216
- Added `direction = :y` option for vertical `band`s [#4949](https://github.com/MakieOrg/Makie.jl/pull/4949).
1317
- Fixed line-ordering of `lines(::Rect3)` [#4954](https://github.com/MakieOrg/Makie.jl/pull/4954).
18+
- Fixed issue with `sprint`ing to SVG using CairoMakie in Julia 1.11 and above [#4971](https://github.com/MakieOrg/Makie.jl/pull/4971).
1419

1520
## [0.22.4] - 2025-04-11
1621

@@ -794,7 +799,8 @@ All other changes are collected [in this PR](https://github.com/MakieOrg/Makie.j
794799
- Fixed rendering of `heatmap`s with one or more reversed ranges in CairoMakie, as in `heatmap(1:10, 10:-1:1, rand(10, 10))` [#1100](https://github.com/MakieOrg/Makie.jl/pull/1100).
795800
- Fixed volume slice recipe and added docs for it [#1123](https://github.com/MakieOrg/Makie.jl/pull/1123).
796801

797-
[Unreleased]: https://github.com/MakieOrg/Makie.jl/compare/v0.22.4...HEAD
802+
[Unreleased]: https://github.com/MakieOrg/Makie.jl/compare/v0.22.5...HEAD
803+
[0.22.5]: https://github.com/MakieOrg/Makie.jl/compare/v0.22.4...v0.22.5
798804
[0.22.4]: https://github.com/MakieOrg/Makie.jl/compare/v0.22.3...v0.22.4
799805
[0.22.3]: https://github.com/MakieOrg/Makie.jl/compare/v0.22.2...v0.22.3
800806
[0.22.2]: https://github.com/MakieOrg/Makie.jl/compare/v0.22.1...v0.22.2

CairoMakie/Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "CairoMakie"
22
uuid = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
33
author = ["Simon Danisch <sdanisch@gmail.com>"]
4-
version = "0.13.4"
4+
version = "0.13.5"
55

66
[deps]
77
CRC32c = "8bf52ea8-c179-5cab-976a-9e18b702a9bc"
@@ -24,7 +24,7 @@ FileIO = "1.1"
2424
FreeType = "3, 4.0"
2525
GeometryBasics = "0.5"
2626
LinearAlgebra = "1.0, 1.6"
27-
Makie = "=0.22.4"
27+
Makie = "=0.22.5"
2828
PrecompileTools = "1.0"
2929
julia = "1.3"
3030

CairoMakie/src/display.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,15 @@ function Base.display(screen::Screen{IMAGE}, scene::Scene; connect=false, screen
5151
end
5252

5353
function Makie.backend_show(screen::Screen{SVG}, io::IO, ::MIME"image/svg+xml", scene::Scene)
54+
mark(io)
55+
# fix for #4970, to avoid that the finalizer of this surface tries to write to `io` later
56+
# when `io` is possibly not valid anymore
57+
Cairo.finish(screen.surface)
58+
# we can't avoid that Cairo writes an svg scaffold into `io` unless
59+
# we refactor the whole screen setup code so the svg surface isn't initialized with the `io`
60+
# in the first place, so instead we just overwrite that part again with the string we build below
61+
reset(io)
62+
5463
Makie.push_screen!(scene, screen)
5564
# Display the plot on a new screen writing to a string, so that we can manipulate the
5665
# result (the io in `screen` should directly write to the file we're saving)

CairoMakie/test/runtests.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,3 +317,12 @@ end
317317
@test length(ps) == length(data) # this should never clip!
318318

319319
end
320+
321+
@testset "issue 4970 (invalid io use during finalization)" begin
322+
@testset "$mime" for mime in CairoMakie.SUPPORTED_MIMES
323+
@test_nowarn begin
324+
sprint(io -> show(io, mime, Scene()))
325+
GC.gc()
326+
end
327+
end
328+
end

GLMakie/Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "GLMakie"
22
uuid = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a"
3-
version = "0.11.5"
3+
version = "0.11.6"
44

55
[deps]
66
ColorTypes = "3da002f7-5984-5a60-b8a6-cbb66c0b333f"
@@ -30,7 +30,7 @@ FreeTypeAbstraction = "0.10"
3030
GLFW = "3.4.3"
3131
GeometryBasics = "0.5"
3232
LinearAlgebra = "1.0, 1.6"
33-
Makie = "=0.22.4"
33+
Makie = "=0.22.5"
3434
Markdown = "1.0, 1.6"
3535
MeshIO = "0.5"
3636
ModernGL = "1"

MakieCore/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "MakieCore"
22
uuid = "20f20a25-4f0e-4fdf-b5d1-57303727442b"
33
authors = ["Simon Danisch"]
4-
version = "0.9.2"
4+
version = "0.9.3"
55

66
[deps]
77
ColorTypes = "3da002f7-5984-5a60-b8a6-cbb66c0b333f"

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "Makie"
22
uuid = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
33
authors = ["Simon Danisch", "Julius Krumbiegel"]
4-
version = "0.22.4"
4+
version = "0.22.5"
55

66
[deps]
77
Animations = "27a7e980-b3e6-11e9-2bcd-0b925532e340"
@@ -97,7 +97,7 @@ KernelDensity = "0.5, 0.6"
9797
LaTeXStrings = "1.2"
9898
LinearAlgebra = "1.0, 1.6"
9999
MacroTools = "0.5"
100-
MakieCore = "=0.9.2"
100+
MakieCore = "=0.9.3"
101101
Markdown = "1.0, 1.6"
102102
MathTeXEngine = "0.5, 0.6"
103103
Observables = "0.5.5"

RPRMakie/Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "RPRMakie"
22
uuid = "22d9f318-5e34-4b44-b769-6e3734a732a6"
33
authors = ["Simon Danisch"]
4-
version = "0.8.4"
4+
version = "0.8.5"
55

66
[deps]
77
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
@@ -17,7 +17,7 @@ Colors = "0.9, 0.10, 0.11, 0.12, 0.13"
1717
FileIO = "1.6"
1818
GeometryBasics = "0.5"
1919
LinearAlgebra = "1.0, 1.6"
20-
Makie = "=0.22.4"
20+
Makie = "=0.22.5"
2121
Printf = "1.0, 1.6"
2222
RadeonProRender = "0.3.2"
2323
julia = "1.3"

WGLMakie/Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "WGLMakie"
22
uuid = "276b4fcb-3e11-5398-bf8b-a0c2d153d008"
33
authors = ["SimonDanisch <sdanisch@gmail.com>"]
4-
version = "0.11.4"
4+
version = "0.11.5"
55

66
[deps]
77
Bonito = "824d6782-a2ef-11e9-3a09-e5662e0c26f8"
@@ -27,7 +27,7 @@ FreeTypeAbstraction = "0.10"
2727
GeometryBasics = "0.5"
2828
Hyperscript = "0.0.3, 0.0.4, 0.0.5"
2929
LinearAlgebra = "1.0, 1.6"
30-
Makie = "=0.22.4"
30+
Makie = "=0.22.5"
3131
Observables = "0.5.1"
3232
PNGFiles = "0.3, 0.4"
3333
PrecompileTools = "1.0"

docs/src/reference/plots/density.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ f = Figure()
1212
Axis(f[1, 1])
1313
1414
density!(randn(200))
15+
density!(randn(200) .+ 2, alpha = 0.8)
1516
1617
f
1718
```

src/stats/density.jl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ Plot a kernel density estimate of `values`.
4949
weights = automatic
5050
cycle = [:color => :patchcolor]
5151
inspectable = @inherit inspectable
52+
"""
53+
The alpha value of the colormap or color attribute. Multiple alphas like
54+
in plot(alpha=0.2, color=(:red, 0.5), will get multiplied.
55+
"""
56+
alpha = 1.0
5257
end
5358

5459
function plot!(plot::Density{<:Tuple{<:AbstractVector}})
@@ -112,9 +117,9 @@ function plot!(plot::Density{<:Tuple{<:AbstractVector}})
112117
end
113118

114119
band!(plot, lower, upper, color = colorobs, colormap = plot.colormap, colorscale = plot.colorscale,
115-
colorrange = plot.colorrange, inspectable = plot.inspectable)
120+
colorrange = plot.colorrange, inspectable = plot.inspectable, alpha = plot.alpha)
116121
l = lines!(plot, linepoints, color = plot.strokecolor,
117122
linestyle = plot.linestyle, linewidth = plot.strokewidth,
118-
inspectable = plot.inspectable)
123+
inspectable = plot.inspectable, alpha = plot.alpha)
119124
plot
120125
end

0 commit comments

Comments
 (0)