@BlackJack:
BlackJack hat geschrieben:...Man könnte ein wenig schummeln und Werte die grösser als ein Schwellenwert sind einfach durch NaN ersetzen...
matplotlib und deine "Schummelei" sind einfach toll. Ich habe jetzt dein Beispiel für mich mit Linien so vereinfacht:
Code: Alles auswählen
# pylab_tan.py
'''
pylab_example: how to handle
infinite y values, according
to BlackJack
'''
import pylab as pl
pl.title('y = tan(x)', color='blue', fontsize=16, fontweight='bold')
x = pl.arange(-pl.pi, pl.pi, 0.01)
y = pl.tan(x)
y[abs(y) > 10] = pl.nan
pl.plot(x, y)
pl.ylim(-10, 10)
pl.grid(True)
pl.show()
matplotlib wird bis auf weiteres mein liebster Funktionsplot Python2 und Python3 bleiben
Gibt's pylab auch für windows (Windows 8, 64bit)?