

Here is an explanation of the tuple returned by the function: **fig_kw: Any additional keyword arguments to be passed to pyplot.figure call.gridspec_kw: Dict of grid specifications passed to GridSpec constructor to place grids on each subplot.subplot_kw: Dict of keywords to be passed to the add_subplot call to add keywords to each subplot.


Matplotlib version is 1.2.0rc2.Given below is the detail of each parameter to the method:

The reason I used the axes() function to set the shared y-axis is that twinx doesn't accept the sharey keyword. #but now attempt to share the secondary y-axis #set twinxed axes as the current axes again, #create plot on secondary y-axis of lower subplot #create lower subplot and share y-axis with primary y-axis of upper subplot #create plot on secondary y-axis of upper subplot If you have multiple subplots containing a secondary y-axis (created using twinx), how can you share these secondary y-axis between the subplots? I want them to scale equally in an automatic way (so not setting the y-limits afterwards by hand).įor the primary y-axis, this is possible by using the keyword sharey in the call of subplot.īelow example shows my attempt, but it fails to share the secondary y-axis of both subplots.
