Skip to content

Commit

Permalink
improving the plot function of pvts-beta approach
Browse files Browse the repository at this point in the history
  • Loading branch information
ytarazona committed Dec 25, 2021
1 parent ff9bb70 commit 4ecdca7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions forestools/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import numpy as np
import pandas as pd

def plot(x, title = None, xlabel = None, ylabel = None, **kwargs):
def plot(x, title = None, xlabel = None, ylabel = None, ax = None, **kwargs):

'''
This function is to show a non-seasonal detection aproach.
Expand All @@ -22,6 +22,8 @@ def plot(x, title = None, xlabel = None, ylabel = None, **kwargs):
ylabel: Y axis title.
ax: current axes
**kwargs: These will be passed to the matplotlib plot, please see full lists at:
https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.plot.html
Expand Down Expand Up @@ -74,8 +76,9 @@ def plot(x, title = None, xlabel = None, ylabel = None, **kwargs):
if isinstance(x['Ts'], (pd.core.series.Series)):
xlabel = 'Time'
xlabel = xlabel

fig, ax = plt.subplots()

ax = plt.gca()

ax.plot(leng, ts, color = 'silver', marker = '.', ms = 14, linewidth= 1,
markerfacecolor = 'black', **kwargs)
ax.set_title(title)
Expand Down

0 comments on commit 4ecdca7

Please sign in to comment.