What is the difference between add_artist or add_patch

Viewed 580

I am trying to find the difference between add_artist method and add_patch but I can't figure out.

import matplotlib
import matplotlib.pyplot as plt
from matplotlib.patches import Circle
matplotlib.use('TkAgg')

fig, ax = plt.subplots()
ax.add_patch(Circle((0.5, 0.5), 0.3))

plt.show()

And

import matplotlib
import matplotlib.pyplot as plt
from matplotlib.patches import Circle
matplotlib.use('TkAgg')

fig, ax = plt.subplots()
ax.add_artist(Circle((0.5, 0.5), 0.3))

plt.show()

Give the exact same behaviour... Maybe these two methods are doing the same but I am not sure ? Which one do I need to use if I want to draw something ?

Kind regards,

0 Answers
Related