Skip to content

Commit e84b703

Browse files
committed
[Py] Resolve matplotlib deprecation warning
1 parent cce37fe commit e84b703

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/Python/simple_optimization/rosenbrock.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ def callback(it: pa.PANOCProgressInfo):
108108
line_opts = dict(colors="black", linewidths=0.8, linestyles="-")
109109
fx = [patheffects.withTickedStroke(spacing=7, linewidth=0.8)]
110110
cgc = plt.contour(X, Y, Zgc, [0], **line_opts)
111-
plt.setp(cgc.collections, path_effects=fx)
111+
plt.setp(cgc, path_effects=fx)
112112
cgl = plt.contour(X, Y, Zgl, [0], **line_opts)
113-
plt.setp(cgl.collections, path_effects=fx)
113+
plt.setp(cgl, path_effects=fx)
114114
xl = plt.contour(X, Y, -X, [-problem.C.lowerbound[0]], **line_opts)
115-
plt.setp(xl.collections, path_effects=fx)
115+
plt.setp(xl, path_effects=fx)
116116

117117
plt.title("PANOC+ALM Rosenbrock example")
118118
plt.xlabel("$x_1$")

0 commit comments

Comments
 (0)