Commit 5592d25f authored by Roman Shapovalov's avatar Roman Shapovalov Committed by Facebook GitHub Bot
Browse files

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
parent 09a99f2e
...@@ -434,12 +434,9 @@ class Stats(object): ...@@ -434,12 +434,9 @@ class Stats(object):
plt.gca().yaxis.label.set_color(c[0:3] * 0.75) plt.gca().yaxis.label.set_color(c[0:3] * 0.75)
plt.legend(tmodes) plt.legend(tmodes)
gcolor = np.array(mcolors.to_rgba("lightgray")) gcolor = np.array(mcolors.to_rgba("lightgray"))
plt.grid( grid_params = {"visible": True, "color": gcolor}
b=True, which="major", color=gcolor, linestyle="-", linewidth=0.4 plt.grid(**grid_params, which="major", linestyle="-", linewidth=0.4)
) plt.grid(**grid_params, which="minor", linestyle="--", linewidth=0.2)
plt.grid(
b=True, which="minor", color=gcolor, linestyle="--", linewidth=0.2
)
plt.minorticks_on() plt.minorticks_on()
plt.tight_layout() plt.tight_layout()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment