What is the difference between plotting a graph with/without axes with/without the same name inside a subplot? They all output the same graph.
- Plotting a graph with axes with the same name inside a subplot:
from matplotlib import pyplot as plt
plt.figure(figsize=(10,5))
ax = plt.subplot(1, 2, 1)
ax.plot(temperature, months)
ax = plt.subplot(1, 2, 2)
ax.plot(temperature, flights_to_hawaii, 'o')
- Plotting a graph with axes with the different names inside a subplot:
from matplotlib import pyplot as plt
plt.figure(figsize=(10,5))
ax1 = plt.subplot(1, 2, 1)
ax1.plot(temperature, months)
ax2 = plt.subplot(1, 2, 2)
ax2.plot(temperature, flights_to_hawaii, 'o')
- Plotting a graph without axes inside a subplot:
from matplotlib import pyplot as plt
plt.figure(figsize=(10,5))
plt.subplot(1, 2, 1)
plt.plot(temperature, months)
plt.subplot(1, 2, 2)
plt.plot(temperature, flights_to_hawaii, 'o')
