Closed jjgecon closed 8 months ago
Seems to be the same issue as #191
Try running this code and see if it works?
function Makie.xlims!(ax::GeoAxis, xlims)
if length(xlims) != 2
error("Invalid xlims length of $(length(xlims)), must be 2.")
elseif xlims[1] == xlims[2] && xlims[1] !== nothing
error("Can't set x limits to the same value $(xlims[1]).")
elseif all(x -> x isa Real, xlims) && xlims[1] > xlims[2]
xlims = reverse(xlims)
ax.xreversed[] = true
else
ax.xreversed[] = false
end
mlims = Makie.convert_limit_attribute(ax.limits[])
ax.limits.val = (xlims, mlims[2])
Makie.reset_limits!(ax; yauto=false)
return nothing
end
It's basically what you suggested @jjgecon :) - if this works will create a new patch release with these two fixes!
I'm trying to set up a map with
xlims!
where
gives the error
MethodError: no method matching convert_limit_attribute(::Rect2{Float64})
I think there is an error in the source code
makie-axis.jl
because unlikeylims!
(which work) haveax.finallimits[]
in line 446 insteadax.limits[]
.