Skip to content

Commit

Permalink
conditionally remove color arg (#3303)
Browse files Browse the repository at this point in the history
* conditionally remove color arg

* Update src/figureplotting.jl

Co-authored-by: Felix Cremer <fcremer@bgc-jena.mpg.de>

---------

Co-authored-by: Felix Cremer <fcremer@bgc-jena.mpg.de>
  • Loading branch information
SimonDanisch and felixcremer authored Oct 17, 2023
1 parent 2d47976 commit b0f0fd1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/figureplotting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
Expand Down

0 comments on commit b0f0fd1

Please sign in to comment.