From ecbb0edefb7085d6954f9dd6aeca65b9325d3a24 Mon Sep 17 00:00:00 2001 From: Simon Date: Sat, 22 Jul 2023 13:49:00 +0200 Subject: [PATCH] prepare 0.19.7 release (#3079) * prepare 0.19.7 release * try non breaking version for MakieCore * rename plot attribute functions --- CairoMakie/Project.toml | 4 +- GLMakie/Project.toml | 4 +- MakieCore/Project.toml | 2 +- MakieCore/src/basic_plots.jl | 96 ++++++++++++++-------------- NEWS.md | 3 +- Project.toml | 4 +- RPRMakie/Project.toml | 4 +- WGLMakie/Project.toml | 4 +- src/basic_recipes/streamplot.jl | 10 +-- src/makielayout/defaultattributes.jl | 2 +- src/makielayout/lineaxis.jl | 2 +- 11 files changed, 68 insertions(+), 67 deletions(-) diff --git a/CairoMakie/Project.toml b/CairoMakie/Project.toml index 7cda71a68ec..7ce30776da2 100644 --- a/CairoMakie/Project.toml +++ b/CairoMakie/Project.toml @@ -1,7 +1,7 @@ name = "CairoMakie" uuid = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" author = ["Simon Danisch "] -version = "0.10.6" +version = "0.10.7" [deps] Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" @@ -23,7 +23,7 @@ FFTW = "1" FileIO = "1.1" FreeType = "3, 4.0" GeometryBasics = "0.4.1" -Makie = "=0.19.6" +Makie = "=0.19.7" PrecompileTools = "1.0" julia = "1.3" diff --git a/GLMakie/Project.toml b/GLMakie/Project.toml index ad8027ba3a2..52af9bc22e1 100644 --- a/GLMakie/Project.toml +++ b/GLMakie/Project.toml @@ -1,6 +1,6 @@ name = "GLMakie" uuid = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a" -version = "0.8.6" +version = "0.8.7" [deps] ColorTypes = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" @@ -29,7 +29,7 @@ FixedPointNumbers = "0.7, 0.8" FreeTypeAbstraction = "0.10" GLFW = "3" GeometryBasics = "0.4.1" -Makie = "=0.19.6" +Makie = "=0.19.7" MeshIO = "0.4" ModernGL = "1" Observables = "0.5.1" diff --git a/MakieCore/Project.toml b/MakieCore/Project.toml index 729ca0b07e5..8f276dee845 100644 --- a/MakieCore/Project.toml +++ b/MakieCore/Project.toml @@ -1,7 +1,7 @@ authors = ["Simon Danisch"] name = "MakieCore" uuid = "20f20a25-4f0e-4fdf-b5d1-57303727442b" -version = "0.6.3" +version = "0.6.4" [deps] Observables = "510215fc-4207-5dde-b226-833fc4488ee2" diff --git a/MakieCore/src/basic_plots.jl b/MakieCore/src/basic_plots.jl index b1db6a60b18..897216bdd31 100644 --- a/MakieCore/src/basic_plots.jl +++ b/MakieCore/src/basic_plots.jl @@ -1,4 +1,4 @@ -default_theme(scene) = default_theme!(Attributes()) +default_theme(scene) = generic_plot_attributes!(Attributes()) """ @@ -13,7 +13,7 @@ default_theme(scene) = default_theme!(Attributes()) - `model::Makie.Mat4f` sets a model matrix for the plot. This replaces adjustments made with `translate!`, `rotate!` and `scale!`. - `space::Symbol = :data` sets the transformation space for box encompassing the volume plot. See `Makie.spaces()` for possible inputs. """ -function default_theme!(attr) +function generic_plot_attributes!(attr) attr[:transformation] = automatic attr[:model] = automatic attr[:visible] = true @@ -26,7 +26,7 @@ function default_theme!(attr) return attr end -function default_attributes(attr) +function generic_plot_attributes(attr) return ( transformation = attr[:transformation], model = attr[:model], @@ -53,7 +53,7 @@ end - `highclip::Union{Nothing, Symbol, <:Colorant} = nothing` sets a color for any value above the colorrange. - `alpha = 1.0` sets the alpha value of the colormap or color attribute. Multiple alphas like in `plot(alpha=0.2, color=(:red, 0.5)`, will get multiplied. """ -function colormap_args!(attr, colormap) +function colormap_attributes!(attr, colormap) attr[:colormap] = colormap attr[:colorscale] = identity attr[:colorrange] = automatic @@ -129,17 +129,17 @@ Plots an image on range `x, y` (defaults to dimensions). - `interpolate::Bool = true` sets whether colors should be interpolated. -$(Base.Docs.doc(colormap_args!)) +$(Base.Docs.doc(colormap_attributes!)) -$(Base.Docs.doc(MakieCore.default_theme!)) +$(Base.Docs.doc(MakieCore.generic_plot_attributes!)) """ @recipe(Image, x, y, image) do scene attr = Attributes(; interpolate = true, fxaa = false, ) - default_theme!(attr) - return colormap_args!(attr, [:black, :white]) + generic_plot_attributes!(attr) + return colormap_attributes!(attr, [:black, :white]) end """ @@ -154,9 +154,9 @@ Plots a heatmap as an image on `x, y` (defaults to interpretation as dimensions) - `interpolate::Bool = false` sets whether colors should be interpolated. -$(Base.Docs.doc(colormap_args!)) +$(Base.Docs.doc(colormap_attributes!)) -$(Base.Docs.doc(MakieCore.default_theme!)) +$(Base.Docs.doc(MakieCore.generic_plot_attributes!)) """ @recipe(Heatmap, x, y, values) do scene attr = Attributes(; @@ -166,8 +166,8 @@ $(Base.Docs.doc(MakieCore.default_theme!)) linewidth = 0.0, fxaa = true, ) - default_theme!(attr) - return colormap_args!(attr, theme(scene, :colormap)) + generic_plot_attributes!(attr) + return colormap_attributes!(attr, theme(scene, :colormap)) end """ @@ -193,9 +193,9 @@ Available algorithms are: $(Base.Docs.doc(shading_attributes!)) -$(Base.Docs.doc(colormap_args!)) +$(Base.Docs.doc(colormap_attributes!)) -$(Base.Docs.doc(MakieCore.default_theme!)) +$(Base.Docs.doc(MakieCore.generic_plot_attributes!)) """ @recipe(Volume, x, y, z, volume) do scene attr = Attributes(; @@ -206,9 +206,9 @@ $(Base.Docs.doc(MakieCore.default_theme!)) fxaa = true, ) - default_theme!(attr) + generic_plot_attributes!(attr) shading_attributes!(attr) - return colormap_args!(attr, theme(scene, :colormap)) + return colormap_attributes!(attr, theme(scene, :colormap)) end """ @@ -229,9 +229,9 @@ Plots a surface, where `(x, y)` define a grid whose heights are the entries in $(Base.Docs.doc(shading_attributes!)) -$(Base.Docs.doc(colormap_args!)) +$(Base.Docs.doc(colormap_attributes!)) -$(Base.Docs.doc(MakieCore.default_theme!)) +$(Base.Docs.doc(MakieCore.generic_plot_attributes!)) """ @recipe(Surface, x, y, z) do scene attr = Attributes(; @@ -241,8 +241,8 @@ $(Base.Docs.doc(MakieCore.default_theme!)) fxaa = true, ) shading_attributes!(attr) - default_theme!(attr) - return colormap_args!(attr, theme(scene, :colormap)) + generic_plot_attributes!(attr) + return colormap_attributes!(attr, theme(scene, :colormap)) end """ @@ -264,9 +264,9 @@ Creates a connected line plot for each element in `(x, y, z)`, `(x, y)` or `posi - `linestyle::Union{Nothing, Symbol, Vector} = nothing` sets the pattern of the line (e.g. `:solid`, `:dot`, `:dashdot`) - `linewidth::Union{Real, Vector} = 1.5` sets the width of the line in pixel units. -$(Base.Docs.doc(colormap_args!)) +$(Base.Docs.doc(colormap_attributes!)) -$(Base.Docs.doc(MakieCore.default_theme!)) +$(Base.Docs.doc(MakieCore.generic_plot_attributes!)) """ @recipe(Lines, positions) do scene attr = Attributes(; @@ -278,8 +278,8 @@ $(Base.Docs.doc(MakieCore.default_theme!)) fxaa = false, cycle = [:color], ) - default_theme!(attr, ) - return colormap_args!(attr, theme(scene, :colormap)) + generic_plot_attributes!(attr, ) + return colormap_attributes!(attr, theme(scene, :colormap)) end """ @@ -300,9 +300,9 @@ Plots a line for each pair of points in `(x, y, z)`, `(x, y)`, or `positions`. - `linestyle::Union{Nothing, Symbol, Vector} = nothing` sets the pattern of the line (e.g. `:solid`, `:dot`, `:dashdot`) - `linewidth::Union{Real, Vector} = 1.5` sets the width of the line in pixel units. -$(Base.Docs.doc(colormap_args!)) +$(Base.Docs.doc(colormap_attributes!)) -$(Base.Docs.doc(MakieCore.default_theme!)) +$(Base.Docs.doc(MakieCore.generic_plot_attributes!)) """ @recipe(LineSegments, positions) do scene default_theme(scene, Lines) @@ -328,9 +328,9 @@ Plots a 3D or 2D mesh. Supported `mesh_object`s include `Mesh` types from [Geome $(Base.Docs.doc(shading_attributes!)) -$(Base.Docs.doc(colormap_args!)) +$(Base.Docs.doc(colormap_attributes!)) -$(Base.Docs.doc(MakieCore.default_theme!)) +$(Base.Docs.doc(MakieCore.generic_plot_attributes!)) """ @recipe(Mesh, mesh) do scene attr = Attributes(; @@ -341,8 +341,8 @@ $(Base.Docs.doc(MakieCore.default_theme!)) cycle = [:color => :patchcolor], ) shading_attributes!(attr) - default_theme!(attr) - return colormap_args!(attr, theme(scene, :colormap)) + generic_plot_attributes!(attr) + return colormap_attributes!(attr, theme(scene, :colormap)) end """ @@ -369,9 +369,9 @@ Plots a marker for each element in `(x, y, z)`, `(x, y)`, or `positions`. - `rotations::Union{Real, Billboard, Quaternion} = Billboard(0f0)` sets the rotation of the marker. A `Billboard` rotation is always around the depth axis. - `transform_marker::Bool = false` controls whether the model matrix (without translation) applies to the marker itself, rather than just the positions. (If this is true, `scale!` and `rotate!` will affect the marker.) -$(Base.Docs.doc(colormap_args!)) +$(Base.Docs.doc(colormap_attributes!)) -$(Base.Docs.doc(MakieCore.default_theme!)) +$(Base.Docs.doc(MakieCore.generic_plot_attributes!)) """ @recipe(Scatter, positions) do scene attr = Attributes(; @@ -396,8 +396,8 @@ $(Base.Docs.doc(MakieCore.default_theme!)) fxaa = false, cycle = [:color], ) - default_theme!(attr) - return colormap_args!(attr, theme(scene, :colormap)) + generic_plot_attributes!(attr) + return colormap_attributes!(attr, theme(scene, :colormap)) end """ @@ -421,9 +421,9 @@ Plots a mesh for each element in `(x, y, z)`, `(x, y)`, or `positions` (similar $(Base.Docs.doc(shading_attributes!)) -$(Base.Docs.doc(colormap_args!)) +$(Base.Docs.doc(colormap_attributes!)) -$(Base.Docs.doc(MakieCore.default_theme!)) +$(Base.Docs.doc(MakieCore.generic_plot_attributes!)) """ @recipe(MeshScatter, positions) do scene attr = Attributes(; @@ -438,8 +438,8 @@ $(Base.Docs.doc(MakieCore.default_theme!)) cycle = [:color], ) shading_attributes!(attr) - default_theme!(attr) - return colormap_args!(attr, theme(scene, :colormap)) + generic_plot_attributes!(attr) + return colormap_attributes!(attr, theme(scene, :colormap)) end """ @@ -468,9 +468,9 @@ Plots one or multiple texts passed via the `text` keyword. - `glowcolor::Union{Symbol, <:Colorant} = (:black, 0)` sets the color of the glow effect. - `word_wrap_with::Real = -1` specifies a linewidth limit for text. If a word overflows this limit, a newline is inserted before it. Negative numbers disable word wrapping. -$(Base.Docs.doc(colormap_args!)) +$(Base.Docs.doc(colormap_attributes!)) -$(Base.Docs.doc(MakieCore.default_theme!)) +$(Base.Docs.doc(MakieCore.generic_plot_attributes!)) """ @recipe(Text, positions) do scene attr = Attributes(; @@ -492,8 +492,8 @@ $(Base.Docs.doc(MakieCore.default_theme!)) offset = (0.0, 0.0), word_wrap_width = -1, ) - default_theme!(attr) - return colormap_args!(attr, theme(scene, :colormap)) + generic_plot_attributes!(attr) + return colormap_attributes!(attr, theme(scene, :colormap)) end """ @@ -524,9 +524,9 @@ Plots polygons, which are defined by - `strokewidth::Real = 0` sets the width of the outline around a marker. - `linestyle::Union{Nothing, Symbol, Vector} = nothing` sets the pattern of the line (e.g. `:solid`, `:dot`, `:dashdot`) -$(Base.Docs.doc(colormap_args!)) +$(Base.Docs.doc(colormap_attributes!)) -$(Base.Docs.doc(MakieCore.default_theme!)) +$(Base.Docs.doc(MakieCore.generic_plot_attributes!)) """ @recipe(Poly) do scene attr = Attributes(; @@ -541,8 +541,8 @@ $(Base.Docs.doc(MakieCore.default_theme!)) cycle = [:color => :patchcolor], ) - default_theme!(attr) - return colormap_args!(attr, theme(scene, :colormap)) + generic_plot_attributes!(attr) + return colormap_attributes!(attr, theme(scene, :colormap)) end @recipe(Wireframe) do scene @@ -579,8 +579,8 @@ end ssao = false ) - default_theme!(attr) - colormap_args!(attr, theme(scene, :colormap)) + generic_plot_attributes!(attr) + colormap_attributes!(attr, theme(scene, :colormap)) attr[:fxaa] = automatic attr[:linewidth] = automatic diff --git a/NEWS.md b/NEWS.md index 4f309f7f721..5e752ac134b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,8 @@ ## master +## v0.19.7 + - Allow arbitrary functions to color `streamplot` lines by passing a `Function` to `color`. This must accept `Point` of the appropriate dimension and return a `Point`, `Vec`, or other arraylike object [#2002](https://github.com/MakieOrg/Makie.jl/pull/2002). - `arrows` can now take input of the form `x::AbstractVector, y::AbstractVector, [z::AbstractVector,] f::Function`, where `f` must return a `VecTypes` of the appropriate dimension [#2597](https://github.com/MakieOrg/Makie.jl/pull/2597). - Exported colorbuffer, and added `colorbuffer(axis::Axis; include_decorations=false, colorbuffer_kws...)`, to get an image of an axis with or without decorations [#3078](https://github.com/MakieOrg/Makie.jl/pull/3078). @@ -26,7 +28,6 @@ - Adjusted scaling of scatter/text stroke, glow and anti-aliasing width under non-uniform 2D scaling (Vec2f markersize/fontsize) in GLMakie [#2950](https://github.com/MakieOrg/Makie.jl/pull/2950). - Scaled `errorbar` whiskers and `bracket` correctly with transformations [#3012](https://github.com/MakieOrg/Makie.jl/pull/3012). - Updated `bracket` when the screen is resized or transformations change [#3012](https://github.com/MakieOrg/Makie.jl/pull/3012). -- Added auto-resizing functionality to WGLMakie plot figures [#3042](https://github.com/MakieOrg/Makie.jl/pull/3042) ## v0.19.6 diff --git a/Project.toml b/Project.toml index e6d2419da51..36b12693102 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Makie" uuid = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" authors = ["Simon Danisch", "Julius Krumbiegel"] -version = "0.19.6" +version = "0.19.7" [deps] Animations = "27a7e980-b3e6-11e9-2bcd-0b925532e340" @@ -82,7 +82,7 @@ Isoband = "0.1" KernelDensity = "0.5, 0.6" LaTeXStrings = "1.2" MacroTools = "0.5" -MakieCore = "=0.6.3" +MakieCore = "=0.6.4" Match = "1.1" MathTeXEngine = "0.5" Observables = "0.5.3" diff --git a/RPRMakie/Project.toml b/RPRMakie/Project.toml index e0aea02aeb2..564a226a6f8 100644 --- a/RPRMakie/Project.toml +++ b/RPRMakie/Project.toml @@ -1,7 +1,7 @@ name = "RPRMakie" uuid = "22d9f318-5e34-4b44-b769-6e3734a732a6" authors = ["Simon Danisch"] -version = "0.5.6" +version = "0.5.7" [deps] Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" @@ -17,7 +17,7 @@ julia = "1.3" Colors = "0.9, 0.10, 0.11, 0.12" FileIO = "1.6" GeometryBasics = "0.4.1" -Makie = "=0.19.6" +Makie = "=0.19.7" RadeonProRender = "0.3.0" [extras] diff --git a/WGLMakie/Project.toml b/WGLMakie/Project.toml index 09053cbf7bb..0def8bf49bf 100644 --- a/WGLMakie/Project.toml +++ b/WGLMakie/Project.toml @@ -1,7 +1,7 @@ name = "WGLMakie" uuid = "276b4fcb-3e11-5398-bf8b-a0c2d153d008" authors = ["SimonDanisch "] -version = "0.8.10" +version = "0.8.11" [deps] Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" @@ -26,7 +26,7 @@ FreeTypeAbstraction = "0.10" GeometryBasics = "0.4.1" Hyperscript = "0.0.3, 0.0.4" JSServe = "2.2" -Makie = "=0.19.6" +Makie = "=0.19.7" Observables = "0.5.1" RelocatableFolders = "0.1, 0.2, 0.3, 1.0" ShaderAbstractions = "0.3" diff --git a/src/basic_recipes/streamplot.jl b/src/basic_recipes/streamplot.jl index f892860627f..9a999d27300 100644 --- a/src/basic_recipes/streamplot.jl +++ b/src/basic_recipes/streamplot.jl @@ -36,8 +36,8 @@ See the function `Makie.streamplot_impl` for implementation details. linewidth = theme(scene, :linewidth), linestyle = nothing, ) - MakieCore.colormap_args!(attr, theme(scene, :colormap)) - MakieCore.default_theme!(attr) + MakieCore.colormap_attributes!(attr, theme(scene, :colormap)) + MakieCore.generic_plot_attributes!(attr) return attr end @@ -176,7 +176,7 @@ function plot!(p::StreamPlot) streamplot_impl(P, f, limits, resolution, stepsize, maxsteps, density, color_func) end colormap_args = MakieCore.colormap_attributes(p) - default_attributes = MakieCore.default_attributes(p) + generic_plot_attributes = MakieCore.generic_plot_attributes(p) lines!( p, @@ -185,7 +185,7 @@ function plot!(p::StreamPlot) linestyle = p.linestyle, linewidth = p.linewidth; colormap_args..., - default_attributes... + generic_plot_attributes... ) N = ndims(p.limits[]) @@ -220,6 +220,6 @@ function plot!(p::StreamPlot) color=lift(x -> x[4], p, data), marker = lift((ah, q) -> arrow_head(N, ah, q), p, p.arrow_head, p.quality), colormap_args..., - default_attributes... + generic_plot_attributes... ) end diff --git a/src/makielayout/defaultattributes.jl b/src/makielayout/defaultattributes.jl index da2aaec776a..12603db1821 100644 --- a/src/makielayout/defaultattributes.jl +++ b/src/makielayout/defaultattributes.jl @@ -34,7 +34,7 @@ function inherit(::Nothing, attr::NTuple{N, Symbol}, default_value::T) where {N, default_value end -function default_attributes(::Type{LineAxis}) +function generic_plot_attributes(::Type{LineAxis}) Attributes( endpoints = (Point2f(0, 0), Point2f(100, 0)), trimspine = false, diff --git a/src/makielayout/lineaxis.jl b/src/makielayout/lineaxis.jl index 2f345b736b4..d8dbcd3b6a9 100644 --- a/src/makielayout/lineaxis.jl +++ b/src/makielayout/lineaxis.jl @@ -1,5 +1,5 @@ function LineAxis(parent::Scene; @nospecialize(kwargs...)) - attrs = merge!(Attributes(kwargs), default_attributes(LineAxis)) + attrs = merge!(Attributes(kwargs), generic_plot_attributes(LineAxis)) return LineAxis(parent, attrs) end