My “expected” way of animating the title of a plot does not work.
MWE:
using GLMakie
fig = Figure()
ax = fig[1,1] = Axis(fig)
s = Observable(0) # counter of current step
titlestr = lift(x -> "step = "*string(x), s)
ax.title = titlestr
produces
ERROR: MethodError: Cannot `convert` an object of type Observable{String} to an object of type String
Closest candidates are:
convert(::Type{T}, ::T) where T<:AbstractString at strings/basic.jl:229
convert(::Type{T}, ::AbstractString) where T<:AbstractString at strings/basic.jl:230
convert(::Type{S}, ::CategoricalArrays.CategoricalValue) where S<:Union{AbstractChar, AbstractString, Number} at C:\Users\datse\.julia\packages\CategoricalArrays\ZjBSI\src\value.jl:73
...
What is the correct approach?