From 34bf55c03387cbfa0253eb065d6911c074102908 Mon Sep 17 00:00:00 2001 From: t-bltg <13423344+t-bltg@users.noreply.github.com> Date: Sat, 31 Jul 2021 19:09:26 +0200 Subject: [PATCH] Gaston: blank plot fixes --- src/backends/gaston.jl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/backends/gaston.jl b/src/backends/gaston.jl index 8f09003e..03913884 100644 --- a/src/backends/gaston.jl +++ b/src/backends/gaston.jl @@ -36,6 +36,7 @@ function _before_layout_calcs(plt::Plot{GastonBackend}) end for (sp, gsp) ∈ mapping + (sp === nothing || gsp === nothing) && continue for ann in sp[:annotations] x, y, val = locate_annotation(sp, ann...); ft = val.font gsp.axesconf *= ( @@ -113,7 +114,7 @@ end function gaston_init_subplots(plt, sps) sz = nr, nc = size(sps) - mapping = Dict{Subplot{GastonBackend}, Gaston.SubPlot}() + mapping = Dict{Union{Nothing,Subplot{GastonBackend}}, Gaston.SubPlot}() for c ∈ 1:nc, r ∈ 1:nr # NOTE: row major sp = sps[r, c] if sp isa Subplot || sp === nothing @@ -294,9 +295,7 @@ function gaston_parse_axes_args(plt::Plot{GastonBackend}, sp::Subplot{GastonBack end for letter ∈ (:x, :y, :z) - if letter == :z && dims == 2 - continue - end + (letter == :z && dims == 2) && continue axis = sp.attr[Symbol(letter, :axis)] # label names push!(axesconf, "set $(letter)label \"$(axis[:guide])\"")