prometheus-api-client-python icon indicating copy to clipboard operation
prometheus-api-client-python copied to clipboard

add controls to subplot()

Open mahtin opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe.
No - not a problem. It's an honest-to-gosh simple request to make life easier.

When you call plot() you create a new window. Two calls, two windows created. If you could pass subplot() arguments to the underlying subplot() call, then you could control the layout with minimal extra code.

Describe the solution you'd like
Add **kwargs to plot() call such that subplot() can be controlled. I believe the following simple edit would work:

def plot(self, **kwargs):
    ...
    fig, axis = plt.subplots(**kwargs)
    ...

Describe alternatives you've considered
While it's very easy to loop and call subplot() myself, I feel that the cool way plot() was implemented should be retained; but with these added controls.

mahtin avatar Oct 30 '22 05:10 mahtin