Skip to content

Commit

Permalink
Fix: changed deprecated matplotlib parameter
Browse files Browse the repository at this point in the history
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
  • Loading branch information
shapovalov authored and facebook-github-bot committed Jun 14, 2023
1 parent 09a99f2 commit 5592d25
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions pytorch3d/implicitron/tools/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,12 +434,9 @@ def plot_stats(
plt.gca().yaxis.label.set_color(c[0:3] * 0.75)
plt.legend(tmodes)
gcolor = np.array(mcolors.to_rgba("lightgray"))
plt.grid(
b=True, which="major", color=gcolor, linestyle="-", linewidth=0.4
)
plt.grid(
b=True, which="minor", color=gcolor, linestyle="--", linewidth=0.2
)
grid_params = {"visible": True, "color": gcolor}
plt.grid(**grid_params, which="major", linestyle="-", linewidth=0.4)
plt.grid(**grid_params, which="minor", linestyle="--", linewidth=0.2)
plt.minorticks_on()

plt.tight_layout()
Expand Down

0 comments on commit 5592d25

Please sign in to comment.