Dec-23-2020, 06:22 PM
Here's some code:
TypeError: delaxes() takes 2 positional arguments but 3 were given
As an object, I've read OrderedDict counts as one argument passed to delaxes. How can I get around this constraint? Thanks!
import matplotlib.pyplot as plt import collections markets = ['ES', 'GC', 'CL', 'EC', 'US'] axL_index = collections.OrderedDict() axR_index = collections.OrderedDict() axL_index[1] = 0; axL_index[2] = 0; axL_index[3] = 1 axL_index[4] = 1; axL_index[5] = 2; axL_index[6] = 2 axR_index[1] = 0; axR_index[2] = 1; axR_index[3] = 0 axR_index[4] = 1; axR_index[5] = 0; axR_index[6] = 1 fig, ax = plt.subplots(3,2,sharex=True) if len(markets) % 2 != 0: fig.delaxes(axL_index[next(reversed(axL_index))],axR_index[next(reversed(axR_index))])The exception is:
TypeError: delaxes() takes 2 positional arguments but 3 were given
As an object, I've read OrderedDict counts as one argument passed to delaxes. How can I get around this constraint? Thanks!