toshiakiasakura / contextplt

Context manager style of matpotlib.
MIT License
0 stars 0 forks source link

Feature request: Enable subplot mosic argument for Multiple class. #21

Closed toshiakiasakura closed 2 years ago

toshiakiasakura commented 2 years ago

What's new in Matplotlib 3.5.0 (Nov 15, 2021)

toshiakiasakura commented 2 years ago

Usage

import contextplt as cplt
x1 = np.arange(1000, 2000, 10)
y1 = np.random.randint(low=5000, high=10000, size=x_1.shape)
mosaic = [
    ['A', [['B', 'B'],
           ['D', 'E']]],
    ['F', 'G'],
]
with cplt.Multiple(mosaic = mosaic, sharex=False) as mul:
    with mul.Single(index="A") as p1:
        p1.ax.plot(x1,y1)
    with mul.Single(index="F", sharex=p1.ax, sharey=p1.ax) as p2:
        p2.ax.plot(x1*0.5,y1*0.5)