Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Description
While working on#1458, it occurred to me that it might not be a bad idea to process the keyword arguments given toplt.subplots
and pass them along in the appropriate direction. As I alluded to in#1458, currently, to replace lines like:
fig = plt.figure(figsize=(10,20))
ax = plt.subplot(111, axisbg='w')
you have to do an awkward thing to subplot's keyword arguments, since,subplot*s*
passes its keyword arguments to plt.figure.
fig, ax = plt.subplots(figsize=(10,20), subplot_kw=dict(axisbg='w'))
but, at least as I was going through our examples, all of the subplot keyword arguments were pretty unambiguously named, and could not be interpreted as figure keyword arguments. So there's no reason why we shouldn't make the next line work the same as the two examples above:
fig, ax = plt.subplots(figsize=(10,20), axisbg='w')
in our docs, plt.axes takes these kwargs:
axisbg color the axes background colorframeon [True|False] display the frame?sharex otherax current axes shares xaxis attribute with otheraxsharey otherax current axes shares yaxis attribute with otheraxpolar [True|False] use a polar axes?
and plt.subplot says it deals withaxisbg
,polar
, andprojection