'Matplotlib: Adding axhline to subplot within Figure object
I need to find a way how to reference axes within matplotlib.figure.Figure
object in order to add axhline(s) to one of the plots. I am using a plot_joint from the package MNE to create an EEG butterfly plot with a couple of topoplots. The lines will serve to showcase windows of statistical significance in the butterfly plot. Thanks!
Solution 1:[1]
Either of these 2 should work, depends on your setup of figure and axes:
fig.axes[0].axhline(...)
OR
ax.axhline(...)
credit to @ImportanceOfBeingErnest for the inspiration
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | PeJota |