pmorissette / ffn

ffn - a financial function library for Python
pmorissette.github.io/ffn
MIT License
1.9k stars 284 forks source link

ffn plot on pycharm #183

Closed pedroabi closed 1 year ago

pedroabi commented 1 year ago

I have been using matplotlib to plot some charts on pycharm IDE

import matplotlib.pyplot as plt
plt.plot([1, 2, 3, 4, 5])
plt.show()

It has been working.

I have imported ffn and now my chart, the pycharm is not plotting my chart anymore. I suppose that the import is overwritting configuration import ffn

Any suggestion?

pedroabi commented 1 year ago

Just got it!

if "DISPLAY" not in os.environ:
    if matplotlib.__version__ > "2.":
        matplotlib.use("agg", force=False)
    else:
        matplotlib.use("agg", warn=False)

os.environ["DISPLAY"] = "TRUE"