Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以在 Plots.jl 的对数刻度上绘制带有几个零的数据?例如 plot(0:10, yscale=:log10) 给出一个错误,但我希望它忽略一个零值。
不,它不是,而且很可能永远不会。
一个简单的解决方法是替换plot(y)为,plot(y[y.>0])或plot(x,y)
plot(y)
plot(y[y.>0])
plot(x,y)
inds = (x .> 0) .& (y .> 0) plot(x[inds],y[inds])