Issue with vlines + logscale in Makie?

Hello,

I just want to put an xscale in log10, with a vertical line, here a minimal working example.

using GLMakie
fig =  let
    x = exp10.( range(-8, -2, length=20) )
    y = x
    fig = Figure(fontsize = 25, resolution = (900, 450))
    ax1 = Axis(fig[1, 1], 
        # xscale = log10 ## this is what i want to do
    )

    scatter!(ax1, x, y)
    vlines!(ax1, [10^-3])
    
    fig
end

Here the error message:

Found invalid x-limits (-3.0f0, 0.00999999f0) for scale log10 which is defined on the interval 0.0 … Inf (open)

I had the impression that in some older Makie version this code was working. I want to avoid taking log10(x) as work around, because I want the exponentials with Unicode style, that comes by default.

Does anybody can point out if this is a bug? Or more likely, if there is a new syntax for vlines and xscale that I missed?

Thanks

I reported this issue a little while ago here. You may want to comment that you also face this issue :slight_smile:

1 Like