2
我想出如何繪製的線圖具有不對稱「帶」繞其與包「牛虻」,「圖解」不對稱帶和下面的代碼線圖使用朱莉婭 - 套餐
x=collect(-10:10);
y=[i^2 for i in -10:10];
ymin = y-5;
ymax = y+10;
using Gadfly
plot(x=x, y=y, ymin=ymin, ymax=ymax, Geom.smooth, Geom.ribbon)
(這this question被描述。)
現在我想用「自留地」包的plot
功能做同樣的。有選項ribbon
和fillrange
(見http://plots.readthedocs.io/en/latest/examples/pyplot/#layouts-margins-label-rotation-title-location),但我無法弄清楚如何使用它們。是否有可能使用「Plots」軟件包創建這樣的情節,如果是的話,如何?
我用'Pkg.checkout'試過了。使用GR,我得到:「MethodError:convert沒有方法匹配convert(:: Type {Float64},:: Array {Float64,1})」,「gadfly()」產生一個棄用警告。同樣用'plotly()'它不起作用(「fillrange ignored」)。如果它只適用於PyPlot,那麼「Plots」包現在不是我的正確選擇。但無論如何,非常感謝您的回覆。 – esel
這目前與pyplot和gr後端一起使用,不需要Pkg.checkout。 –