【发布时间】:2021-07-18 09:43:39
【问题描述】:
我正在绘制函数tan,但由于点密度在 Inf 值附近太低,因此渲染不干净。
using Plots
plot(x -> tan(x), 1, 10)
如何增加点密度?我在文档中没有看到它。
【问题讨论】:
我正在绘制函数tan,但由于点密度在 Inf 值附近太低,因此渲染不干净。
using Plots
plot(x -> tan(x), 1, 10)
如何增加点密度?我在文档中没有看到它。
【问题讨论】:
我找到了语法:
plot(x -> tan(x), 1:0.0001:10, ylims=(-20, 20))
这样,x 轴从 1 变为 10,步长为 0.0001
【讨论】:
x -> tan(x) 是多余的,你可以直接说tan