牛d中的水平线

时间:2020-06-16 15:24:09

标签: plot julia gadfly

我正在使用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))

1 个答案:

答案 0 :(得分:1)

yintercept美学似乎只接受一组值:

plot(f,0,0.8, yintercept=[1.5], Geom.hline(style=:dot))