diff --git a/src/figureplotting.jl b/src/figureplotting.jl index 968758dacfd..7fe127f6374 100644 --- a/src/figureplotting.jl +++ b/src/figureplotting.jl @@ -39,7 +39,10 @@ function get_axis(fig, P, axis_kw::Dict, plot_attr, plot_args) # Remove arguments may not work with plotting into the scene delete!(plot_attr, :show_axis) delete!(plot_attr, :limits) - delete!(plot_attr, :color) # Color may contain Cycled(1), which needs the axis to get resolved to a color + if get(plot_attr, :color, nothing) isa Cycled + # Color may contain Cycled(1), which needs the axis to get resolved to a color + delete!(plot_attr, :color) + end plot!(proxyscene, P, Attributes(plot_attr), plot_args...) if is2d(proxyscene) ax = Axis(fig; axis_kw...)