How can I add a colour bar to this map in GeoStat?
viz(longt.geometry, color = log10.(longt.rat), colorscheme = colorschemes[:hawaii], facetcolor = "black", showfacets=true)
Thanks!
How can I add a colour bar to this map in GeoStat?
viz(longt.geometry, color = log10.(longt.rat), colorscheme = colorschemes[:hawaii], facetcolor = "black", showfacets=true)
Thanks!
You can do it as you would normally do with Makie.jl. The viz
recipe returns the figure and axis:
fig, ax = viz(...)
You can then pass these objects to the Colorbar constructor. Alternatively, you can send the geotable to the viewer, which already comes with the colorbar:
geotable |> viewer
Note that the viz
recipe is called automatically if you pass a geotable.geometry
to the standard Makie.plot
command. The name viz
is just shorter to type.
As a side note, you can pass colorscheme = :hawaii
directly.
The Makie “Basic” page shows:
fig, ax, hm = heatmap(randn(20, 20))
Colorbar(fig[1, 2], hm)
fig
How do I tell Colorbar the hm part?
fig, ax, v = viz(longt.geometry, color = log10.(longt.rat), colorscheme = :hawaii, facetcolor = "black", showfacets=true)
Mke.Colorbar(fig[1, 2], v)
tells me Multiple colormaps found for plot
at that second line.
Can you share a MWE with the same type of domain you are trying? Some of the Makie.jl functions don’t work well with Colorbar
as far as I remember, and we had to build the colorbar differently in the viewer
.
You can check the source code of the viewer
here:
using GeoStats, GeoIO, CSV, DataFrames, Colors, ColorSchemes
import CairoMakie as Mke
# List of London Boroughs
lon = ["Westminster", "Ealing", "Kingston upon Thames", "Islington", "Merton", "Hackney", "Camden", "Wandsworth", "Enfield", "Southwark", "City of London", "Lambeth", "Hillingdon", "Tower Hamlets", "Kensington and Chelsea", "Greenwich", "Haringey", "Richmond upon Thames", "Hounslow", "Harrow", "Lewisham", "Hammersmith and Fulham", "Newham", "Waltham Forest", "Croydon", "Brent", "Redbridge", "Barnet", "Bromley", "Barking and Dagenham", "Havering", "Sutton", "Bexley"]
# Shape file from ONS: https://geoportal.statistics.gov.uk/datasets/127c4bda06314409a1fa0df505f510e6_0/explore
LAs = GeoIO.load("LAD_DEC_2023_UK_BFC.shp") |> Rename("LAD23CD" => "LADcode")
#combo = CSV.read("combo.csv", DataFrame)
# Subset of CSV data just covering London
combo = DataFrame(
LADcode=["E09000033", "E09000009", "E09000021", "E09000019", "E09000024", "E09000012", "E09000007", "E09000032", "E09000010", "E09000028", "E09000001", "E09000022", "E09000017", "E09000030", "E09000020", "E09000011", "E09000014", "E09000027", "E09000018", "E09000015", "E09000023", "E09000013", "E09000025", "E09000031", "E09000008", "E09000005", "E09000026", "E09000003", "E09000006", "E09000002", "E09000016", "E09000029", "E09000004"],
newLocalAuthority=["Westminster", "Ealing", "Kingston upon Thames", "Islington", "Merton", "Hackney", "Camden", "Wandsworth", "Enfield", "Southwark", "City of London", "Lambeth", "Hillingdon", "Tower Hamlets", "Kensington and Chelsea", "Greenwich", "Haringey", "Richmond upon Thames", "Hounslow", "Harrow", "Lewisham", "Hammersmith and Fulham", "Newham", "Waltham Forest", "Croydon", "Brent", "Redbridge", "Barnet", "Bromley", "Barking and Dagenham", "Havering", "Sutton", "Bexley"],
Total_Awarded=[1551248258, 110166558, 38033540, 865003501, 46621989, 395602425, 915273792, 197296888, 86772623, 573171051, 321575633, 665770100, 39514648, 374049415, 307431197, 812345843, 181261693, 176262413, 131028168, 48236040, 173721339, 257659057, 246970981, 95473179, 86525712, 304128061, 77681457, 82934564, 88862200, 63604751, 46974062, 42463929, 41183878],
subpop=[205087, 366127, 167845, 216767, 215324, 259956, 210390, 328367, 329601, 306374, 8618, 317498, 304792, 312273, 143940, 289254, 264130, 195232, 287940, 260987, 299810, 183295, 350626, 278050, 390506, 338918, 309836, 388639, 329830, 218534, 262022, 209517, 246543]
)
# Funding per capita
natave = sum(skipmissing(combo.Total_Awarded)) / sum(skipmissing(combo.subpop))
combo.rat .= (combo.Total_Awarded) ./ (combo.subpop) ./ natave
# Add combo to the GeoTable
table1 = values(LAs) |> DataFrame
table1.index = [i for i in 1:nrow(table1)]
table = leftjoin(table1, combo, on=:LADcode, matchmissing=:equal, order=:left)
sort!(table, :index)
gt = georef(table, LAs.geometry)
# Draw the map with colorbar
longt = gt |> Filter(row -> !ismissing(row.newLocalAuthority) && row.newLocalAuthority in lon)
fig, ax, v = viz(longt.geometry, color=log10.(longt.rat), colorscheme=:hawaii, facetcolor="black", showfacets=true)
Mke.Colorbar(fig[1, 2], v)
Mke.current_figure()
Produces this stacktrace in VScode:
ERROR: LoadError: Multiple colormaps found for plot MakieCore.Poly{Tuple{Vector{GeometryBasics.Polygon{2, Float64, GeometryBasics.Point2{Float64}, GeometryBasics.LineString{2, Float64, GeometryBasics.Point2{Float64}, Base.ReinterpretArray{GeometryBasics.Line{2, Float64}, 1, Tuple{GeometryBasics.Point2{Float64}, GeometryBasics.Point2{Float64}}, GeometryBasics.TupleView{Tuple{GeometryBasics.Point2{Float64}, GeometryBasics.Point2{Float64}}, 2, 1, Vector{GeometryBasics.Point2{Float64}}}, false}}, Vector{GeometryBasics.LineString{2, Float64, GeometryBasics.Point2{Float64}, Base.ReinterpretArray{GeometryBasics.Line{2, Float64}, 1, Tuple{GeometryBasics.Point2{Float64}, GeometryBasics.Point2{Float64}}, GeometryBasics.TupleView{Tuple{GeometryBasics.Point2{Float64}, GeometryBasics.Point2{Float64}}, 2, 1, Vector{GeometryBasics.Point2{Float64}}}, false}}}}}}}, please specify which one to use manually. Please overload `Makie.extract_colormap(::MakieCore.Poly{Tuple{Vector{GeometryBasics.Polygon{2, Float64, GeometryBasics.Point2{Float64}, GeometryBasics.LineString{2, Float64, GeometryBasics.Point2{Float64}, Base.ReinterpretArray{GeometryBasics.Line{2, Float64}, 1, Tuple{GeometryBasics.Point2{Float64}, GeometryBasics.Point2{Float64}}, GeometryBasics.TupleView{Tuple{GeometryBasics.Point2{Float64}, GeometryBasics.Point2{Float64}}, 2, 1, Vector{GeometryBasics.Point2{Float64}}}, false}}, Vector{GeometryBasics.LineString{2, Float64, GeometryBasics.Point2{Float64}, Base.ReinterpretArray{GeometryBasics.Line{2, Float64}, 1, Tuple{GeometryBasics.Point2{Float64}, GeometryBasics.Point2{Float64}}, GeometryBasics.TupleView{Tuple{GeometryBasics.Point2{Float64}, GeometryBasics.Point2{Float64}}, 2, 1, Vector{GeometryBasics.Point2{Float64}}}, false}}}}}}})` to allow for the automatical creation of a Colorbar.
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:35
[2] extract_colormap_recursive(plot::MakieCore.Poly{Tuple{Vector{GeometryBasics.Polygon{2, Float64, GeometryBasics.Point2{Float64}, GeometryBasics.LineString{2, Float64, GeometryBasics.Point2{Float64}, Base.ReinterpretArray{GeometryBasics.Line{2, Float64}, 1, Tuple{GeometryBasics.Point2{Float64}, GeometryBasics.Point2{Float64}}, GeometryBasics.TupleView{Tuple{GeometryBasics.Point2{Float64}, GeometryBasics.Point2{Float64}}, 2, 1, Vector{GeometryBasics.Point2{Float64}}}, false}}, Vector{GeometryBasics.LineString{2, Float64, GeometryBasics.Point2{Float64}, Base.ReinterpretArray{GeometryBasics.Line{2, Float64}, 1, Tuple{GeometryBasics.Point2{Float64}, GeometryBasics.Point2{Float64}}, GeometryBasics.TupleView{Tuple{GeometryBasics.Point2{Float64}, GeometryBasics.Point2{Float64}}, 2, 1, Vector{GeometryBasics.Point2{Float64}}}, false}}}}}}})
@ Makie C:\Users\TGebbels\.julia\packages\Makie\VRavR\src\makielayout\blocks\colorbar.jl:93
[3] (::Makie.var"#1836#1838")(child::MakieCore.Poly{Tuple{Vector{GeometryBasics.Polygon{2, Float64, GeometryBasics.Point2{Float64}, GeometryBasics.LineString{2, Float64, GeometryBasics.Point2{Float64}, Base.ReinterpretArray{GeometryBasics.Line{2, Float64}, 1, Tuple{GeometryBasics.Point2{Float64}, GeometryBasics.Point2{Float64}}, GeometryBasics.TupleView{Tuple{GeometryBasics.Point2{Float64}, GeometryBasics.Point2{Float64}}, 2, 1, Vector{GeometryBasics.Point2{Float64}}}, false}}, Vector{GeometryBasics.LineString{2, Float64, GeometryBasics.Point2{Float64}, Base.ReinterpretArray{GeometryBasics.Line{2, Float64}, 1, Tuple{GeometryBasics.Point2{Float64}, GeometryBasics.Point2{Float64}}, GeometryBasics.TupleView{Tuple{GeometryBasics.Point2{Float64}, GeometryBasics.Point2{Float64}}, 2, 1, Vector{GeometryBasics.Point2{Float64}}}, false}}}}}}})
@ Makie .\none:0
[4] iterate
@ .\generator.jl:47 [inlined]
[5] collect(itr::Base.Generator{Vector{MakieCore.Plot}, Makie.var"#1836#1838"})
@ Base .\array.jl:834
[6] extract_colormap_recursive(plot::MakieCore.Plot{Meshes.viz, Tuple{GeometrySet{2, Float64, MultiPolygon{2, Float64, PolyArea{2, Float64, Ring{2, Float64, CircularArrays.CircularVector{Point2, Vector{Point2}}}}}}}})
@ Makie C:\Users\TGebbels\.julia\packages\Makie\VRavR\src\makielayout\blocks\colorbar.jl:84
[7] Makie.Colorbar(fig_or_scene::GridLayoutBase.GridPosition, plot::MakieCore.Plot{Meshes.viz, Tuple{GeometrySet{2, Float64, MultiPolygon{2, Float64, PolyArea{2, Float64, Ring{2, Float64, CircularArrays.CircularVector{Point2, Vector{Point2}}}}}}}}; kwargs::@Kwargs{})
@ Makie C:\Users\TGebbels\.julia\packages\Makie\VRavR\src\makielayout\blocks\colorbar.jl:100
[8] Makie.Colorbar(fig_or_scene::GridLayoutBase.GridPosition, plot::MakieCore.Plot{Meshes.viz, Tuple{GeometrySet{2, Float64, MultiPolygon{2, Float64, PolyArea{2, Float64, Ring{2, Float64, CircularArrays.CircularVector{Point2, Vector{Point2}}}}}}}})
@ Makie C:\Users\TGebbels\.julia\packages\Makie\VRavR\src\makielayout\blocks\colorbar.jl:98
[9] top-level scope
@ c:\Users\TGebbels\...\Documents\DCMS Database\GeoStatMWE.jl:37
in expression starting at c:\Users\TGebbels\...\Documents\DCMS Database\GeoStatMWE.jl:37
Executing in Pluto
produces a nice map at the first viz
but the same error when trying to add the colorbar.
Thank you for sharing the MWE @TimG . From the Makie.jl Colorbar docs, only a reduced set of built-in recipes support automatic creation of colorbar from the plot object:
If you pass a
plotobject
, aheatmap
orcontourf
, the Colorbar is set up automatically such that it tracks these objects’ relevant attributes likecolormap
,colorrange
,highclip
andlowclip
.
When you write fig, ax, plt = viz(...)
the third argument is this plot object.
At present, the only solution we can provide on our side is create the colorbar manually. You can do it based on the vector of colors you want to plot:
julia> color = log10.(longt.rat)
33-element Vector{Float64}:
1.5409978534680409
-0.5669082482422928
-0.7016896041108623
-0.8080442275518339
-0.07791693181813554
-0.6004518836862073
0.607647143339695
-0.6853613193412048
â‹®
-0.07527008204388734
0.24115355077977496
-0.724077881880776
0.04751575435515542
-0.495120305739368
-0.2521180600836897
0.8478643845407627
julia> cbar = Mke.Colorbar(fig[1,2], limits = extrema(color), colormap = "hawaii")
Makie.Colorbar()
julia> fig
We will see what we can do to improve this situation, probably submitting a PR to Makie.jl at some point to fix this elsewhere.
Opened an issue: Review colorbar creation with `viz` and `viewer` · Issue #413 · JuliaEarth/GeoStats.jl · GitHub
This works well. Thank you.
Now, at the risk of overloading this topic, how can I make the colors consistent across multiple maps of different cities. For example, here are Manchester and London compared:
That is something that we need to brainstorm. Currently, our viz
takes the colorscheme and the provided values to produce the final colors. This is the purpose of the function ascolors
:
Given any Julia object, you can add a method to this function to determine a different behavior. We already defined the behavior for vector of Number
as you can see, which simply gets the color from the colorscheme object with the :extrema
flag.
I understand that you need to create two separate plots with the same range of colors, without scaling the values to fit the entire range of the colorscheme. Perhaps this calls for new options cmin
and cmax
to control de extrema of the colorscheme.
You can try to overwrite the method above with a different behavior to see it if works. If it does, please feel free to submit a pull request with the proposed change.
If viz
supported the Makie
option colorrange=
, then I could specify a common colorrange
based on the range of the data nationally. It is already easy to do this for the colorbar
itself.
color = log10.(combo.rat) # combo (from the CSV) is a national dataset
lim=extrema(color)
# subset London data
longt = gt |> Filter(row -> !ismissing(row.newLocalAuthority) && row.newLocalAuthority in lon)
# use colorrange to specify the national extrema
fig, ax, v = viz(longt.geometry, color=log10.(longt.rat), colorscheme=:hawaii, colorrange=lim, facetcolor="black", showfacets=true)
# define the colorbar based on the national extrema
cbar = Mke.Colorbar(fig[1, 2], limits=lim, colormap="hawaii")
Mke.display(fig)
but this doesn’t seem to work.
That is a very good idea. We will investigate how to forward the colorrange
option to adjust the selected colors from the values. This option can have a default colorrange=:extrema
to reproduce the current behavior.
So it turns out to be easy to persuade viz
to use a consistent colour range between plots.
I am mapping a set of n
areas based on an n-row GeoTable. I give the data that viz
uses to map colour using the color=
kwarg. This takes a vector of data that is used to scale to the specified colorscheme
. The color vector can be longer than n values and, in this case, viz
will just use the first n values to define the colours of the n areas. Extra values are ignored as far as the map is concerned but they are used in the scaling of the data to the colorscheme
. I can simply add two extra values to the vector, so there are n+2 values, where the extra two values are the minimum and maximum data values I want to use for the colour range. In my example, I can use the extrema of the national dataset:
natave = sum(skipmissing(combo.Total_Awarded)) / sum(skipmissing(combo.subpop))
combo.rat .= combo.Total_Awarded ./ combo.subpop ./ natave
combo.col .= log10.(combo.rat)
cr = extrema(combo.col)
And then I can plot the maps like this:
function citymap(gt, df, cr)
fig = Mke.Figure()
ax = []
for (i, met) in enumerate(eachrow(df))
longt = gt |> Filter(row -> !ismissing(row.newLocalAuthority) && row.newLocalAuthority in met.boroughs)
crange = longt.col
append!(crange, cr)
push!(ax, Mke.Axis(fig[div(i - 1, 2)+1, mod(i - 1, 2)+1], title=met.metname, titlesize=10.0f0,
limits=(met.xaxismin, met.xaxismax, met.yaxismin, met.yaxismax),
xlabel="BNG Easting", xlabelsize=8.0f0, xtickformat="{:.0f}", xticklabelsize=6.0f0,
ylabel="BNG Northing", ylabelsize=8.0f0, ytickformat="{:.0f}", yticklabelsize=6.0f0))
viz!(ax[i], longt.geometry, color=crange, colorscheme=:hawaii, facetcolor="black", showfacets=true, segmentsize=0.3f0)
ax[i].aspect = Mke.DataAspect()
end
Mke.Colorbar(fig[1:2, 3], limits=extrema(gt.rat), colormap="hawaii", scale=log10, tickformat="{:.1f}",
ticklabelsize=8.0f0, label="Multiple of national average funding per capita", labelsize=10.0f0)
Mke.display(fig)
end
And this will produce four maps that all share the same colormap!
That is great @TimG. We will soon release a new minor version of the project with a more flexible method to set the color range. Thanks for sharing the update and workaround.
@TimG GeoStats.jl v0.54 is out with the new colorrange
option in viz
and a new cbar
command for colorbars. You should now be able to fix the color range in each subplot without the workaround above.
Thank you for this update.
I don’t seem able to make it work immediately. My error, surely, but I’m afraid I need a hint beyond what is in the docs. I took out my workaround and changed the viz! call using the new keywords:
function citymap(gt, df, cr)
fig = Mke.Figure()
ax = []
for (i, met) in enumerate(eachrow(df))
longt = gt |> Filter(row -> !ismissing(row.newLocalAuthority) && row.newLocalAuthority in met.boroughs)
# crange = longt.col
# append!(crange, cr)
push!(ax, Mke.Axis(fig[div(i - 1, 2)+1, mod(i - 1, 2)+1], title=met.metname, titlesize=10.0f0,
limits=(met.xaxismin, met.xaxismax, met.yaxismin, met.yaxismax),
xlabel="BNG Easting", xlabelsize=8.0f0, xtickformat="{:.0f}", xticklabelsize=6.0f0,
ylabel="BNG Northing", ylabelsize=8.0f0, ytickformat="{:.0f}", yticklabelsize=6.0f0))
viz!(ax[i], longt.geometry, color=longt.col, colormap=:hawaii, colorrange=cr, segmentcolor="black", showsegments=true, segmentsize=0.3f0)
ax[i].aspect = Mke.DataAspect()
end
Mke.Colorbar(fig[1:2, 3], limits=extrema(gt.rat), colormap="hawaii", scale=log10, tickformat="{:.1f}",
ticklabelsize=8.0f0, label="Multiple of national average funding per capita", labelsize=10.0f0)
Mke.display(fig)
end
but this generates
ERROR: LoadError: MethodError: no method matching getcolors(::Colorfy.Colorfier{Vector{Union{Missing, Float64}}, Vector{Float64}, ColorScheme{Vector{RGB{Float64}}, String, String}, Tuple{Float64, Float64}})
Closest candidates are:
getcolors(::Colorfy.Colorfier{<:AbstractVector{<:Distribution}})
@ ColorfyDistributionsExt C:\Users\TGebbels\.julia\packages\Colorfy\zvEia\ext\ColorfyDistributionsExt.jl:11
getcolors(::Colorfy.Colorfier{<:AbstractVector{<:Quantity}})
@ ColorfyUnitfulExt C:\Users\TGebbels\.julia\packages\Colorfy\zvEia\ext\ColorfyUnitfulExt.jl:11
getcolors(::Colorfy.Colorfier{<:AbstractVector{<:CategoricalValue}})
@ ColorfyCategoricalArraysExt C:\Users\TGebbels\.julia\packages\Colorfy\zvEia\ext\ColorfyCategoricalArraysExt.jl:12
...
Stacktrace:
[1] colors(colorfier::Colorfy.Colorfier{Vector{Union{Missing, Float64}}, Vector{Float64}, ColorScheme{Vector{RGB{Float64}}, String, String}, Tuple{Float64, Float64}})
@ Colorfy C:\Users\TGebbels\.julia\packages\Colorfy\zvEia\src\Colorfy.jl:146
[2] colorfy(values::Vector{Union{Missing, Float64}}; kwargs::@Kwargs{alphas::Vector{Float64}, colorscheme::Symbol, colorrange::Tuple{Float64, Float64}})
@ Colorfy C:\Users\TGebbels\.julia\packages\Colorfy\zvEia\src\Colorfy.jl:50
[3] colorfy
@ C:\Users\TGebbels\.julia\packages\Colorfy\zvEia\src\Colorfy.jl:50 [inlined]
[4] process
@ C:\Users\TGebbels\.julia\packages\Meshes\NR5lE\ext\colors.jl:10 [inlined]
[5] (::MeshesMakieExt.var"#208#216")(arg1#334::Symbol, arg2#335::Vector{Union{Missing, Float64}}, arg3#336::Tuple{Float64, Float64}, arg4#337::Nothing)
@ MeshesMakieExt .\none:0
[6] map(::MeshesMakieExt.var"#208#216", ::Observables.Observable{Any}, ::Observables.Observable{Any}, ::Vararg{Observables.Observable{Any}}; ignore_equal_values::Bool, priority::Int64)
@ Observables C:\Users\TGebbels\.julia\packages\Observables\YdEbO\src\Observables.jl:570
[7] map(::MeshesMakieExt.var"#208#216", ::Observables.Observable{Any}, ::Observables.Observable{Any}, ::Observables.Observable{Any}, ::Vararg{Observables.Observable{Any}})
@ Observables C:\Users\TGebbels\.julia\packages\Observables\YdEbO\src\Observables.jl:568
[8] plot!(plot::MakieCore.Plot{Meshes.viz, Tuple{GeometrySet{2, Float64, MultiPolygon{2, Float64, PolyArea{2, Float64, Ring{2, Float64, CircularArrays.CircularVector{Point2, Vector{Point2}}}}}}}})
@ MeshesMakieExt C:\Users\TGebbels\.julia\packages\Meshes\NR5lE\ext\geometryset.jl:13
[9] connect_plot!(parent::Makie.Scene, plot::MakieCore.Plot{Meshes.viz, Tuple{GeometrySet{2, Float64, MultiPolygon{2, Float64, PolyArea{2, Float64, Ring{2, Float64, CircularArrays.CircularVector{Point2, Vector{Point2}}}}}}}})
@ Makie C:\Users\TGebbels\.julia\packages\Makie\ND0gA\src\interfaces.jl:260
[10] plot!
@ C:\Users\TGebbels\.julia\packages\Makie\ND0gA\src\interfaces.jl:265 [inlined]
[11] plot!(ax::Makie.Axis, plot::MakieCore.Plot{Meshes.viz, Tuple{GeometrySet{2, Float64, MultiPolygon{2, Float64, PolyArea{2, Float64, Ring{2, Float64, CircularArrays.CircularVector{Point2, Vector{Point2}}}}}}}})
@ Makie C:\Users\TGebbels\.julia\packages\Makie\ND0gA\src\figureplotting.jl:316
[12] _create_plot!(::Function, ::Dict{Symbol, Any}, ::Makie.Axis, ::SubDomain{2, Float64, GeometrySet{2, Float64, MultiPolygon{2, Float64, PolyArea{2, Float64, Ring{2, Float64, CircularArrays.CircularVector{Point2, Vector{Point2}}}}}}, Vector{Int64}})
@ Makie C:\Users\TGebbels\.julia\packages\Makie\ND0gA\src\figureplotting.jl:284
[13] #viz!#2
@ C:\Users\TGebbels\.julia\packages\MakieCore\UAwps\src\recipes.jl:176 [inlined]
[14] citymap(gt::GeoTable{DataFrame}, df::DataFrame, cr::Tuple{Float64, Float64})
@ Main c:\Users\TGebbels\...\Documents\DCMS Database\GeoStat City Maps.jl:57
[15] macro expansion
@ .\timing.jl:279 [inlined]
[16] main()
@ Main c:\Users\TGebbels\...\Documents\DCMS Database\GeoStat City Maps.jl:122
[17] top-level scope
@ c:\Users\TGebbels\...\Documents\DCMS Database\GeoStat City Maps.jl:125
in expression starting at c:\Users\TGebbels\...\Documents\DCMS Database\GeoStat City Maps.jl:125
Also, I’m assuming that I can simply replace the Mke.Colorbar()
call with an identical cbar()
call?
Thanks,
Tim
Thank you for reporting the issue @TimG, this is probably a dispatch issue in the new Colorfy.jl package. We will release a patch soon with a fix.
Exactly. You can pass the options to cbar
and it will use the same mechanism to generate colors that is used in viz/viz!
.
Hi Tim, can you please share a MWE? We can’t reproduce the error.