Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: module 'matplotlib.pyplot' has no attribute 'clear' #4

Closed
lamres opened this issue Oct 8, 2019 · 1 comment
Closed

Comments

@lamres
Copy link
Collaborator

lamres commented Oct 8, 2019

trying to run i get
Traceback (most recent call last): File "historicalrenko.py", line 71, in <module> renko_obj_atr.plot_renko() File "/home/james/Jamie/iqoption-bot/pyrenko.py", line 146, in plot_renko self.ax.clear() AttributeError: module 'matplotlib.pyplot' has no attribute 'clear'
any help

Originally posted by @jamienjoroge in #2 (comment)

@antunsz
Copy link

antunsz commented Jan 8, 2020

trying to run i get
Traceback (most recent call last): File "historicalrenko.py", line 71, in <module> renko_obj_atr.plot_renko() File "/home/james/Jamie/iqoption-bot/pyrenko.py", line 146, in plot_renko self.ax.clear() AttributeError: module 'matplotlib.pyplot' has no attribute 'clear'
any help

Originally posted by @jamienjoroge in #2 (comment)

Hello, uncomment the line 145 in pyrenko.py and change the line 146 to "self.ax = ax".

cause the self.ax is initialized as pyplot, but need to be an axes instance.

Another solution is change the line 12 "self.ax = plt" to "_, self.ax = plt.subplots(1, figsize=(20, 10))"

@lamres lamres closed this as completed Jan 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants