Make plot_dataframe.py flake8 compliant

This commit is contained in:
Gerald Lonlas 2018-01-22 21:12:48 -08:00
parent 00f1c57279
commit fcb29c6da5

View File

@ -1,15 +1,16 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import sys import sys
import matplotlib # Install PYQT5 manually if you want to test this helper function
matplotlib.use("Qt5Agg")
import matplotlib.pyplot as plt
import talib.abstract as ta import talib.abstract as ta
import freqtrade.vendor.qtpylib.indicators as qtpylib import freqtrade.vendor.qtpylib.indicators as qtpylib
from pandas import DataFrame from pandas import DataFrame
from freqtrade import exchange, analyze from freqtrade import exchange, analyze
from freqtrade.misc import common_args_parser from freqtrade.misc import common_args_parser
from freqtrade.strategy.strategy import Strategy from freqtrade.strategy.strategy import Strategy
import matplotlib.pyplot as plt
import matplotlib # Install PYQT5 manually if you want to test this helper function
matplotlib.use("Qt5Agg")
def plot_parse_args(args): def plot_parse_args(args):
@ -75,6 +76,7 @@ def plot_analyzed_dataframe(args) -> None:
plt.setp([a.get_xticklabels() for a in fig.axes[:-1]], visible=False) plt.setp([a.get_xticklabels() for a in fig.axes[:-1]], visible=False)
plt.show() plt.show()
def populate_indicator(dataframe: DataFrame) -> DataFrame: def populate_indicator(dataframe: DataFrame) -> DataFrame:
dataframe.loc[dataframe['buy'] == 1, 'buy_price'] = dataframe['close'] dataframe.loc[dataframe['buy'] == 1, 'buy_price'] = dataframe['close']