Skip to content

Commit ad02130

Browse files
committed
pyplot: check for existence of cnt.collections before access
(probably some newer matplotlib is different, visual impression seemingly not affected)
1 parent f3aad2a commit ad02130

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/pyplot.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -600,10 +600,12 @@ function scalarplot!(ctx, TP::Type{PyPlotType}, ::Type{Val{2}}, grids, parentgri
600600
cmap = PyPlot.ColorMap(plaincolormap(ctx)),
601601
)
602602

603-
for c in cnt.collections
604-
c.set_edgecolor("face")
603+
if hasproperty(cnt,:collections)
604+
for c in cnt.collections
605+
c.set_edgecolor("face")
606+
end
605607
end
606-
608+
607609
ax.tricontour(tdat..., func; colors = "k", levels = levels)
608610

609611
if ctx[:colorbar] == :horizontal

0 commit comments

Comments
 (0)