When I try to plot the calc.tan function:
#align(center)[
#canvas({
import draw: *
plot.plot(
size: (8, 8),
axis-style: "school-book",
x-tick-step: 1,
x-min: -5.,
x-max: 5.,
y-tick-step: 1,
y-min: -5,
y-max: 5,
legend: "inner-north-east",
{
plot.add(
// tangent,
calc.tan,
domain: (-5, 5),
style: (stroke: blue),
label: $tan(x)$
)
})
})
]
It might be occurring because the plotting software is connecting points across the singularities?
Does anyone know how I can prevent this?