Horje
matplotlib legend out of plot Code Example
matplotlib legend
import numpy as np
import matplotlib.pyplot as plt

x = np.linspace(0, 20, 1000)
y1 = np.sin(x)
y2 = np.cos(x)

plt.plot(x, y1, "-b", label="sine")
plt.plot(x, y2, "-r", label="cosine")
plt.legend(loc="upper left")
plt.ylim(-1.5, 2.0)
plt.show()
matplotlib legend out of plot
ax.legend(loc='upper center', bbox_to_anchor=(0.5, 1.05),
          ncol=3, fancybox=True, shadow=True)




Python

Related
les librairies python a maitriser pour faire du machine learning Code Example les librairies python a maitriser pour faire du machine learning Code Example
How to detect key presses Code Example How to detect key presses Code Example
reload all extensions discord.py Code Example reload all extensions discord.py Code Example
how to launch an application using python Code Example how to launch an application using python Code Example
Convert the sklearn.dataset cancer to a DataFrame. Code Example Convert the sklearn.dataset cancer to a DataFrame. Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7