I have the graph y = tan(x) and I want to remove the vertical lines (see below).
Here is my code:
import numpy as np
import matplotlib.p
If you're willing to have the overhead of a more powerful mathematical program, SageMath can help with this:
plot(tan(x),(x,-2*pi,2*pi),detect_poles=True,ymin=-2,ymax=2,ticks=[pi/2,None],tick_formatter=pi)
(The little opening at the origin is something I've not seen before, hopefully fixed again soon.)