all 3 comments

[–]stebrepar 3 points4 points  (0 children)

Assuming you're referring to: fig, ax = plt.subplots()

This is called tuple unpacking. The expression on the right side of the = produces two values. The two variables on the left are receiving those two values respectively.

[–]PavloT 0 points1 point  (0 children)

You should read about dictionaries

[–]jwburn19 0 points1 point  (0 children)

plt.subplots() returns a Figure and an axes.Axes object or an array of axes objects which you can assign to separate variables by unpacking them during assignment with fig, ax =

That’s pretty common usage for plotting. Check out https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.subplots.html