I think it is confusing that the limits are normally set by xlim and in subplots by set_xlim.
Would it not be nice to use the same name ax.xlim(0,1) for subplots ?
import numpy as np
import matplotlib.pyplot as plt
plt.figure(1)
plt.xlim(0, 1)
plt.plot([1, 2])
fix, ax = plt.subplots()
ax.set_xlim(0, 1) ## why not ax.xlim(0,1) ?
ax.plot([1, 2])
I think it is confusing that the limits are normally set by
xlimand in subplots byset_xlim.Would it not be nice to use the same name
ax.xlim(0,1)for subplots ?