Description
Hey,
This is a short idea I had when creating complex graphs with multiple subplots.
Sometimes you want to apply the same actions to multiple subplots and a way that feels very natural would be something like this:
fig, axs = plt.subplots(2, 2)
axs[:, 0].set_ylabel('test')
This does of course not work, but could be easily be achieved by returning a custom object that wraps a list of axes instances and overwrites the __getitem__
method.
Of course it would need to reimplement all axes methods, but it might be possible to do that by just forwarding all call in a modified __getattribute__
or by automatically creating wrapped classmethods in a metaclass.
With such a custom object it might even be possible to support something like this:
axs[:, 0].set_ylabel(['test1', 'test2'])
If there is interest in such functionality, I would try to build a working prototype.
Other than that, thanks to everybody for all the awesome work you put into matplotlib!
Regards,
Arne