From 25650684551da0b9d9ff72e37d301365f7a3d577 Mon Sep 17 00:00:00 2001 From: Martin Levy Date: Tue, 1 Nov 2022 00:42:23 -0700 Subject: [PATCH] add controls to subplot --- prometheus_api_client/metric.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prometheus_api_client/metric.py b/prometheus_api_client/metric.py index 095ac91..6031833 100644 --- a/prometheus_api_client/metric.py +++ b/prometheus_api_client/metric.py @@ -187,10 +187,10 @@ def __add__(self, other): error_string = "Different metric labels" raise TypeError("Cannot Add different metric types. " + error_string) - def plot(self): + def plot(self, *args, **kwargs): """Plot a very simple line graph for the metric time-series.""" if _MPL_FOUND: - fig, axis = plt.subplots() + fig, axis = plt.subplots(*args, **kwargs) axis.plot_date(self.metric_values.ds, self.metric_values.y, linestyle=":") fig.autofmt_xdate() # if matplotlib was not imported