Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

matplotlib legend for subplot code example

Example 1: matplotlib one legend for all subplots

handles, labels = ax.get_legend_handles_labels()
fig.legend(handles, labels, loc='upper center')

Example 2: subplot matplotlib legend

ax1.legend("HHZ 1",loc="upper right")
ax2.legend("HHN",loc="upper right")
ax3.legend("HHE",loc="upper right")

Tags:

Misc Example

Related

square button code example knex postgres in column code example background image css center cover code example open file dialog pyqt6 code example how to get network request using asynctask code example ruby biggest value in array code example anaconda install opencv-contrib-python code example knex methods post code example datetime knex seed code example phpunit run script before test code example python mail quick-mailer code example cross out text command google docs code example

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy