Skip to content

Commit 5592d25

Browse files
shapovalovfacebook-github-bot
authored andcommitted
Fix: changed deprecated matplotlib parameter
Summary: The parameter was renamed in MPL 3.5.0 in 2021, and the deprecated version is no longer supported. https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.5.0.html#the-first-parameter-of-axes-grid-and-axis-grid-has-been-renamed-to-visible Reviewed By: bottler Differential Revision: D46724242 fbshipit-source-id: 04e2ab6d63369d939ea4f0ce7d64693e0b95ee91
1 parent 09a99f2 commit 5592d25

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

pytorch3d/implicitron/tools/stats.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -434,12 +434,9 @@ def plot_stats(
434434
plt.gca().yaxis.label.set_color(c[0:3] * 0.75)
435435
plt.legend(tmodes)
436436
gcolor = np.array(mcolors.to_rgba("lightgray"))
437-
plt.grid(
438-
b=True, which="major", color=gcolor, linestyle="-", linewidth=0.4
439-
)
440-
plt.grid(
441-
b=True, which="minor", color=gcolor, linestyle="--", linewidth=0.2
442-
)
437+
grid_params = {"visible": True, "color": gcolor}
438+
plt.grid(**grid_params, which="major", linestyle="-", linewidth=0.4)
439+
plt.grid(**grid_params, which="minor", linestyle="--", linewidth=0.2)
443440
plt.minorticks_on()
444441

445442
plt.tight_layout()

0 commit comments

Comments
 (0)