ValueError: not enough values to unpack (expected 4, got 2)
Its because you have not looked how the values are packed in plt.subplot function.

&gt;&gt;&gt; plt.subplots(2,2,figsize=(10,4))
(&lt;matplotlib.figure.Figure at 0xa3918d0&gt;, array([[&lt;matplotlib.axes._subplots.AxesSubplot object at 0x000000000A389470&gt;,
     &lt;matplotlib.axes._subplots.AxesSubplot object at 0x000000000A41AD30&gt;],
    [&lt;matplotlib.axes._subplots.AxesSubplot object at 0x000000000A6F7EB8&gt;,
     &lt;matplotlib.axes._subplots.AxesSubplot object at 0x000000000BC232E8&gt;]], dtype=object))


Instead of unpacking all values at once, unpack in steps. You will get a better idea then.

For your solution, to unpack -

&gt;&gt;&gt; fig, [[axis1, axis2],[axis3, axis4]] = plt.subplots(2,2,figsize=(10,4))