Skip to content

Commit

Permalink
tests/eas/generic: Fix matplotlib import
Browse files Browse the repository at this point in the history
I wasn't aware that
> import matplotlib.pyplot as plt
is different from
> from matplotlib import pyplot as plt

The former will not use the backend set in tests/__init__.py while
the latter will.

This commit also removes the fill_between() call that is used to draw
the expected_placement figure, as it seems the desired behaviour is
not supported with the Agg backend ("Unknown property step").
  • Loading branch information
Valentin Schneider committed Dec 13, 2017
1 parent 6a2f080 commit c89a491
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/eas/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from trace import Trace
from unittest import SkipTest

import matplotlib.pyplot as plt
from matplotlib import pyplot as plt
import os

WORKLOAD_PERIOD_MS = 16
Expand Down Expand Up @@ -306,7 +306,6 @@ def plot_expected_util(self, experiment, util_df):
color = 'red'

tdf.plot(ax=ax[cpu], drawstyle='steps-post', title="CPU{}".format(cpu), color=color)
ax[cpu].fill_between(tdf.index, tdf, 0, step='post', color=color)
ax[cpu].set_ylabel('Utilization')

# Grey-out areas where utilization == 0
Expand Down

0 comments on commit c89a491

Please sign in to comment.