Skip to content

Commit

Permalink
Fix Forecast plot method (awslabs#3006)
Browse files Browse the repository at this point in the history
Latest matplotlib update had broken it since we were using internal API
  • Loading branch information
lostella authored Sep 15, 2023
1 parent bb7c7c1 commit c8d499e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion requirements/requirements-docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ click
orjson
black
holidays~=0.9
matplotlib
matplotlib~=3.6
2 changes: 1 addition & 1 deletion requirements/requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ ujson
orjson
requests
holidays~=0.9
matplotlib
matplotlib~=3.6
2 changes: 1 addition & 1 deletion src/gluonts/model/forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def plot(
# If no color is provided, we use matplotlib's internal color cycle.
# Note: This is an internal API and might change in the future.
color = maybe.unwrap_or_else(
color, lambda: next(ax._get_lines.prop_cycler)["color"]
color, lambda: ax._get_lines.get_next_color()
)

# Plot median forecast
Expand Down

0 comments on commit c8d499e

Please sign in to comment.