
Ich habe das Brokenaxes-Paket hier gefunden und es ausprobiert:
Code: Select all
from brokenaxes import brokenaxes
import numpy as np
bax = brokenaxes(xlims=((0, 10), (195, 200)), hspace=.05)
x1 = np.linspace(0, 10, 100)
x2 = np.linspace(195, 200, 100)
bax.plot(x1, np.sin(x1), label='Part 1')
bax.plot(x2, np.cos(x2), label='Part 2')
bax.legend()
plt.show()

Es hat jedoch nur die Achse gebrochen, ohne die Ebene. Gibt es eine elegante Methode, so etwas zu erreichen? Vielleicht hat diese Art von Figur ihren Namen, den finde ich nicht.
Mobile version