After trying to plot negative values using `yaxis = :log10`, all plots breaks down

Basically, I (by misstake) tried to plot something where the values go negative and I asked for a log scaled y axis. Ofcourse this failed. However, it also meant that all other plots failed.

It would be good if this could be fixed generally (although it seems it already have? [BUG] Bad values with yscale=:log10 break follow-up plots in GR · Issue #3321 · JuliaPlots/Plots.jl · GitHub). However, in the meantime, how do I just get plotting to work again? I have quite a lot of stuff loaded, and will have to sit through ages of precompilation again if I restart Julia to reset it (yes, I have no idea why things keep precompiling again, I asked around and this just seems to be a thing that Julia does).

Somewhat minimal example:

using Plots
plot(-10:10, -10:10) # Fine.
plot(-10:10, -10:10; yaxis = :log10)# Blank plot.
plot(-10:10, -10:10) # Mostly blank plot.

For the logarithmic plots you can do:

x = y = -10:10
ix = y .> 0
plot(x[ix], y[ix]; yaxis=:log10)
1 Like

So the problem is not plotting lograithmic stuff. The problem is that I accidentally plotted one, and now I cannot make any plot whatsoever. I.e. just plot(-10:10, -10:10) which is totally fine just gives a blank plane.

I think this bug has not been fixed: [BUG] Assertion error `total_plotarea_vertical > 0mm`. Plots remains unusable afterwards · Issue #4816 · JuliaPlots/Plots.jl · GitHub

1 Like

Thanks! Good to know that it is reported at least