Open Dorota-D opened 2 weeks ago
Hi @Dorota-D,
Thank you for reporting the issue. Looks like AutoML overwrites the matplotlib
backend.
For quick fix please execute:
import matplotlib
matplotlib.use('WebAgg')
you can check list of available backends here https://matplotlib.org/stable/users/explain/figure/backends.html#interactive-backends
Please let me know if it works for you.
Hi Piotr,
Thanks for your quick reply. No, unfortunately not, the problem remains and "WebAgg" also completely disables the plot even before AutoML loads :(
Another thing - I've added another cell at the end:
fig, ax = plt.subplots()
fruits = ['apple', 'blueberry', 'cherry', 'orange']
counts = [40, 100, 30, 55]
bar_labels = ['red', 'blue', '_red', 'orange']
bar_colors = ['tab:red', 'tab:blue', 'tab:red', 'tab:orange']
ax.bar(fruits, counts, label=bar_labels, color=bar_colors)
ax.set_ylabel('fruit supply')
ax.set_title('Fruit supply by kind and color')
ax.legend(title='Fruit color')
plt.show()
I got the following error message: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown
One more try:
matplotlib.use('module://matplotlib_inline.backend_inline')
Works! Thank you!
Great! May I ask what is your use case for AutoML? I will reopen the issue, because it should be fixed in the package.
Research :) Our group developed simple models in Weka, but we'd like to integrate ML with our other scripts. scikit is ok, but we feel we need something robust and quick. So, now we're testing AutoML.
Environment:
I wanted to plot the optimized ML model fits in my jupyter notebook file, but the plots did not show up - only the text line, e.g., <Axes: xlabel='total_bill', ylabel='tip'>. Using %matplotlib inline did not help. I can still save the plots as JPG, but that is not the point. I found that the problem appears when I activate AutoML. This conflict appears even in the most basic example:
Here, the plot shows up. After adding a cell with AutoML, the plot "disappears".
How can I resolve this?