matplotlib.pyplot.ylim#
- matplotlib.pyplot.ylim(*args, **kwargs)[Quelle]#
Ruft die Y-Achsen-Limits der aktuellen Achsen ab oder setzt sie.
Aufrufsignaturen
bottom, top = ylim() # return the current ylim ylim((bottom, top)) # set the ylim to bottom, top ylim(bottom, top) # set the ylim to bottom, top
Wenn Sie keine Argumente angeben, können Sie stattdessen auch bottom oder top als Schlüsselwortargumente übergeben, z. B.
ylim(top=3) # adjust the top leaving bottom unchanged ylim(bottom=1) # adjust the bottom leaving top unchanged
Das Festlegen von Grenzen schaltet die automatische Skalierung für die Y-Achse aus.
- Gibt zurück:
- bottom, top
Ein Tupel der neuen Y-Achsen-Limits.
Anmerkungen
Das Aufrufen dieser Funktion ohne Argumente (z. B.
ylim()) ist das Pyplot-Äquivalent zum Aufrufen vonget_ylimfür die aktuellen Achsen. Das Aufrufen dieser Funktion mit Argumenten ist das Pyplot-Äquivalent zum Aufrufen vonset_ylimfür die aktuellen Achsen. Alle Argumente werden weitergegeben.