-
-
Notifications
You must be signed in to change notification settings - Fork 358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Assertion error total_plotarea_vertical > 0mm
. Plots remains unusable afterwards
#4816
Comments
I have also encountered this bug. It is very frustrating! Kudos for figuring out how to reproduce it! |
I am also experiencing this bug. |
I'd say the easiest solution would be to error when there is any non-finite value passed to |
But it would be more consistent with the usual |
Btw, i do not use |
julia> using Plots
julia> plot(1:3, -(1:3), yscale=:log10, xlabel="test")
┌ Warning: No strict ticks found
└ @ PlotUtils ~/.julia/packages/PlotUtils/mHQ0Q/src/ticks.jl:191
┌ Warning: No strict ticks found
└ @ PlotUtils ~/.julia/packages/PlotUtils/mHQ0Q/src/ticks.jl:191
┌ Warning: Invalid negative or zero value -1 found at series index 1 for log10 based yscale
└ @ Plots ~/.julia/packages/Plots/rz1WP/src/utils.jl:106
julia> plot(1:3, -(1:3), yscale=:log10, xlabel="test")
┌ Warning: No strict ticks found
└ @ PlotUtils ~/.julia/packages/PlotUtils/mHQ0Q/src/ticks.jl:191
Error showing value of type Plots.Plot{Plots.GRBackend}:
ERROR: AssertionError: total_plotarea_vertical > 0mm
Stacktrace:
[1] update_child_bboxes!(layout::Plots.GridLayout, minimum_perimeter::Vector{Measures.AbsoluteLength})
@ Plots ~/.julia/packages/Plots/rz1WP/src/layouts.jl:343
[2] update_child_bboxes!(layout::Plots.GridLayout)
@ Plots ~/.julia/packages/Plots/rz1WP/src/layouts.jl:315
[3] prepare_output(plt::Plots.Plot{Plots.GRBackend})
@ Plots ~/.julia/packages/Plots/rz1WP/src/plot.jl:251
[4] display(#unused#::Plots.PlotsDisplay, plt::Plots.Plot{Plots.GRBackend})
@ Plots ~/.julia/packages/Plots/rz1WP/src/output.jl:168
[5] display(x::Any)
@ Base.Multimedia ./multimedia.jl:340 |
Got this error as well, after using twinx(). |
Plotting negative values in log scale causes this bug.
Julia version is v1.10.0 |
I'm getting the same error doing this example with pre-existing plot. I have to restart the environment to not get this error. |
@j-adel I retested this in; Julia Version 1.10.5 with Plots v1.40.8 |
Details
Sometimes plot display fails with one of the assertions at
https://github.com/JuliaPlots/Plots.jl/blob/4ad4a04a176ba55e69a1263acee8bd0f3034f09a/src/layouts.jl#L342C1-L343C42
and afterwards it's impossible to display plots in the same session.
This bug is weirdly history-dependent, but I've managed to found this reproducer (note that the plot needs to be displayed twice to trigger the bug)
It looks like this puts GR in a state where all subsequent calls to
GR.inqtext
returnNaN
s, which messes up all layouts.Backends
This bug occurs on ( insert
x
below )Versions
Plots.jl version: v1.38.17 and master
Backend version (
]st -m <backend(s)>
): 0.72.9Output of
versioninfo()
:julia> versioninfo()
Julia Version 1.9.0
Commit 8e63055292 (2023-05-07 11:25 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 16 × Intel(R) Core(TM) i7-9800X CPU @ 3.80GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, skylake-avx512)
Threads: 1 on 16 virtual cores
The text was updated successfully, but these errors were encountered: