Skip to content

Commit

Permalink
Merge branch 'master' into ctarn/barplot
Browse files Browse the repository at this point in the history
  • Loading branch information
ctarn authored Oct 7, 2023
2 parents db5861c + ce5c214 commit 542f5ac
Show file tree
Hide file tree
Showing 19 changed files with 185 additions and 140 deletions.
4 changes: 2 additions & 2 deletions CairoMakie/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "CairoMakie"
uuid = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
author = ["Simon Danisch <sdanisch@gmail.com>"]
version = "0.10.10"
version = "0.10.11"

[deps]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Expand All @@ -23,7 +23,7 @@ FFTW = "1"
FileIO = "1.1"
FreeType = "3, 4.0"
GeometryBasics = "0.4.1"
Makie = "=0.19.10"
Makie = "=0.19.11"
PrecompileTools = "1.0"
julia = "1.3"

Expand Down
4 changes: 2 additions & 2 deletions GLMakie/Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "GLMakie"
uuid = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a"
version = "0.8.10"
version = "0.8.11"

[deps]
ColorTypes = "3da002f7-5984-5a60-b8a6-cbb66c0b333f"
Expand Down Expand Up @@ -29,7 +29,7 @@ FixedPointNumbers = "0.7, 0.8"
FreeTypeAbstraction = "0.10"
GLFW = "3"
GeometryBasics = "0.4.1"
Makie = "=0.19.10"
Makie = "=0.19.11"
MeshIO = "0.4"
ModernGL = "1"
Observables = "0.5.1"
Expand Down
5 changes: 3 additions & 2 deletions MakieCore/Project.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
authors = ["Simon Danisch"]
name = "MakieCore"
uuid = "20f20a25-4f0e-4fdf-b5d1-57303727442b"
version = "0.6.7"
authors = ["Simon Danisch"]
version = "0.6.8"

[deps]
Observables = "510215fc-4207-5dde-b226-833fc4488ee2"
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"

[compat]
Observables = "0.5.1"
Expand Down
3 changes: 3 additions & 0 deletions MakieCore/src/MakieCore.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ end
using Observables
using Observables: to_value
using Base: RefValue
# Needing REPL for Base.Docs.doc on julia
# https://github.com/MakieOrg/Makie.jl/issues/3276
using REPL


include("types.jl")
Expand Down
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
## master
- Fix grouping of a zero-height bar in `barplot`. Now a zero-height bar shares the same properties of the previous bar, and if the bar is the first one, its height is treated as positive if and only if there exists a bar of positive height or all bars are zero-height. [#3058](https://github.com/MakieOrg/Makie.jl/pull/3058)

- Fixed a bug where Axis still consumes scroll events when interactions are disabled [#3272](https://github.com/MakieOrg/Makie.jl/pull/3272)

## v0.19.11

- Setup automatic colorbars for volumeslices [#3253](https://github.com/MakieOrg/Makie.jl/pull/3253).
- Colorbar for arrows [#3275](https://github.com/MakieOrg/Makie.jl/pull/3275).
- Small bugfixes [#3275](https://github.com/MakieOrg/Makie.jl/pull/3275).

## v0.19.10

- Fix bugs with Colorbar in recipes, add new API for creating a recipe colorbar and introduce experimental support for Categorical colormaps [#3090](https://github.com/MakieOrg/Makie.jl/pull/3090).
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Makie"
uuid = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
authors = ["Simon Danisch", "Julius Krumbiegel"]
version = "0.19.10"
version = "0.19.11"

[deps]
Animations = "27a7e980-b3e6-11e9-2bcd-0b925532e340"
Expand Down Expand Up @@ -82,7 +82,7 @@ Isoband = "0.1"
KernelDensity = "0.5, 0.6"
LaTeXStrings = "1.2"
MacroTools = "0.5"
MakieCore = "=0.6.7"
MakieCore = "=0.6.8"
Match = "1.1"
MathTeXEngine = "0.5"
Observables = "0.5.3"
Expand Down
4 changes: 2 additions & 2 deletions RPRMakie/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "RPRMakie"
uuid = "22d9f318-5e34-4b44-b769-6e3734a732a6"
authors = ["Simon Danisch"]
version = "0.5.10"
version = "0.5.11"

[deps]
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
Expand All @@ -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.10"
Makie = "=0.19.11"
RadeonProRender = "0.3.0"

[extras]
Expand Down
4 changes: 2 additions & 2 deletions WGLMakie/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "WGLMakie"
uuid = "276b4fcb-3e11-5398-bf8b-a0c2d153d008"
authors = ["SimonDanisch <sdanisch@gmail.com>"]
version = "0.8.14"
version = "0.8.15"

[deps]
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
Expand All @@ -26,7 +26,7 @@ FreeTypeAbstraction = "0.10"
GeometryBasics = "0.4.1"
Hyperscript = "0.0.3, 0.0.4"
JSServe = "2.2"
Makie = "=0.19.10"
Makie = "=0.19.11"
Observables = "0.5.1"
RelocatableFolders = "0.1, 0.2, 0.3, 1.0"
ShaderAbstractions = "0.4"
Expand Down
22 changes: 1 addition & 21 deletions WGLMakie/src/particles.jl
Original file line number Diff line number Diff line change
Expand Up @@ -230,31 +230,13 @@ value_or_first(x) = x

function create_shader(scene::Scene, plot::Makie.Text{<:Tuple{<:Union{<:Makie.GlyphCollection, <:AbstractVector{<:Makie.GlyphCollection}}}})
glyphcollection = plot[1]
res = map(x->Vec2f(widths(x)), pixelarea(scene))
projview = scene.camera.projectionview
transfunc = Makie.transform_func_obs(plot)
pos = plot.position
space = plot.space
markerspace = plot.markerspace
offset = plot.offset

# TODO: This is a hack before we get better updating of plot objects and attributes going.
# Here we only update the glyphs when the glyphcollection changes, if it's a singular glyphcollection.
# The if statement will be compiled away depending on the parameter of Text.
# This means that updates of a text vector and a separate position vector will still not work if only the text
# vector is triggered, but basically all internal objects use the vector of tuples version, and that triggers
# both glyphcollection and position, so it still works
if glyphcollection[] isa Makie.GlyphCollection
# here we use the glyph collection observable directly
gcollection = glyphcollection
else
# and here we wrap it into another observable
# so it doesn't trigger dimension mismatches
# the actual, new value gets then taken in the below lift with to_value
gcollection = Observable(glyphcollection)
end
atlas = wgl_texture_atlas()
glyph_data = map(pos, gcollection, offset, transfunc, space) do pos, gc, offset, transfunc, space
glyph_data = map(pos, glyphcollection, offset, transfunc, space; ignore_equal_values=true) do pos, gc, offset, transfunc, space
Makie.text_quads(atlas, pos, to_value(gc), offset, transfunc, space)
end

Expand All @@ -281,10 +263,8 @@ function create_shader(scene::Scene, plot::Makie.Text{<:Tuple{<:Union{<:Makie.Gl
end
end

cam = scene.camera
plot_attributes = copy(plot.attributes)
plot_attributes.attributes[:calculated_colors] = uniform_color

uniforms = Dict(
:model => plot.model,
:shape_type => Observable(Cint(3)),
Expand Down
11 changes: 6 additions & 5 deletions src/basic_recipes/arrows.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ grid.
`arrows` can also work in three dimensions.
If a `Function` is provided in place of `u, v, [w]`, then it must accept
If a `Function` is provided in place of `u, v, [w]`, then it must accept
a `Point` as input, and return an appropriately dimensioned `Point`, `Vec`,
or other array-like output.
Expand Down Expand Up @@ -165,7 +165,8 @@ function plot!(arrowplot::Arrows{<: Tuple{AbstractVector{<: Point{N}}, V}}) wher

linesegments!(
arrowplot, headstart,
color = line_c, colormap = colormap, colorscale = colorscale, linestyle = linestyle,
color=line_c, colormap=colormap, colorscale=colorscale, linestyle=linestyle,
colorrange=arrowplot.colorrange,
linewidth=lift(lw -> lw === automatic ? 1.0f0 : lw, arrowplot, linewidth),
fxaa = fxaa_bool, inspectable = inspectable,
transparency = transparency, visible = visible,
Expand All @@ -176,7 +177,7 @@ function plot!(arrowplot::Arrows{<: Tuple{AbstractVector{<: Point{N}}, V}}) wher
marker=marker_head,
markersize = lift(as-> as === automatic ? theme(scene, :markersize)[] : as, arrowplot, arrowsize),
color = arrow_c, rotations = rotations, strokewidth = 0.0,
colormap = colormap, markerspace = arrowplot.markerspace,
colormap=colormap, markerspace=arrowplot.markerspace, colorrange=arrowplot.colorrange,
fxaa = fxaa_bool, inspectable = inspectable,
transparency = transparency, visible = visible
)
Expand Down Expand Up @@ -212,7 +213,7 @@ function plot!(arrowplot::Arrows{<: Tuple{AbstractVector{<: Point{N}}, V}}) wher
start, rotations = directions,
marker=marker_tail,
markersize = msize,
color = line_c, colormap = colormap, colorscale = colorscale,
color=line_c, colormap=colormap, colorscale=colorscale, colorrange=arrowplot.colorrange,
fxaa = fxaa_bool, ssao = ssao,
diffuse = diffuse,
specular = specular, shininess = shininess, inspectable = inspectable,
Expand All @@ -223,7 +224,7 @@ function plot!(arrowplot::Arrows{<: Tuple{AbstractVector{<: Point{N}}, V}}) wher
start, rotations = directions,
marker=marker_head,
markersize = markersize,
color = arrow_c, colormap = colormap, colorscale = colorscale,
color=arrow_c, colormap=colormap, colorscale=colorscale, colorrange=arrowplot.colorrange,
fxaa = fxaa_bool, ssao = ssao,
diffuse = diffuse,
specular = specular, shininess = shininess, inspectable = inspectable,
Expand Down
Loading

0 comments on commit 542f5ac

Please sign in to comment.