Skip to content

Commit

Permalink
Revert "Setup automatic colorbars for volumeslices (#3253)"
Browse files Browse the repository at this point in the history
This reverts commit 389ca5e.
  • Loading branch information
SimonDanisch committed Oct 12, 2023
1 parent 2edc261 commit 71d257c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
5 changes: 1 addition & 4 deletions ReferenceTests/src/tests/figures_and_makielayout.jl
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,7 @@ end

# TO not make this fail in CairoMakie, we dont actually plot the volume
_f, ax, cp = contour(x, y, z, values; levels=10, colormap=:viridis)
Colorbar(fig[2, 1], cp; size=300)

_f, ax, vs = volumeslices(x, y, z, values, colormap=:bluesreds)
Colorbar(fig[2, 2], vs)
Colorbar(fig[2, :], cp; size=300)

# horizontal colorbars
Colorbar(fig[1, 3][2, 1]; limits=(0, 10), colormap=:viridis,
Expand Down
4 changes: 0 additions & 4 deletions src/makielayout/blocks/colorbar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ function extract_colormap(plot::StreamPlot)
return extract_colormap(plot.plots[1])
end

function extract_colormap(plot::Combined{volumeslices})
return extract_colormap(plot.plots[1])
end

function extract_colormap(plot::Union{Contourf,Tricontourf})
levels = plot._computed_levels
limits = lift(l -> (l[1], l[end]), levels)
Expand Down
7 changes: 0 additions & 7 deletions test/makielayout.jl
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,6 @@ end
f, ax, pl = barplot(1:3; color=1:3)
cbar = Colorbar(f[1, 2], pl)
@test cbar.limits[] == Vec(1.0, 3.0)

let data = fill(1.0, 2,2,2)
data[1] = 3.0
f, ax, pl = volumeslices(1:2, 1:2, 1:2, data)
cbar = Colorbar(f[1,2], pl)
@test cbar.limits[] == Vec(1.0, 3.0)
end
end
end

Expand Down

0 comments on commit 71d257c

Please sign in to comment.