我正在使用Gadfly.jl来绘制我的函数。我尝试通过传递Geom.hline
参数来添加一条水平线。但是,我得到一个错误:
无法处理配方参数:(typeof(f),Int64,Float64, Gadfly.Geom.HLineGeometry)
我想念什么?
这是我的代码
using Gadfly
f(x)=x/(1-x)
plot(f,0,0.8, yintercept=1.5, Geom.hline(style=:dot))
答案 0 :(得分:1)
yintercept
美学似乎只接受一组值:
plot(f,0,0.8, yintercept=[1.5], Geom.hline(style=:dot))