0

我正在使用 Gadfly 绘制图层,如何更改顺序?

我已经尝试按照文档进行操作,但它不起作用。

using DataFrames
df = readtable("data/01_heights_weights_genders.csv")
    xmin, xmax = extrema(df[:Height])
    ymin, ymax = extrema(df[:Weight])
    plot(layer(df, x="Height", y="Weight", Geom.point, color="Gender", order = 1),
    layer(x=[xmin, xmax],y=[ymin, ymax], Geom.point,Geom.line, Theme(default_color=colorant"purple"), order = 10))
4

1 回答 1

1

解决了

plot(df,layer(x="Height", y="Weight", Geom.smooth(method=:lm,smoothing=0.2), Theme(default_color=colorant"red")),
layer(x="Height", y="Weight", Geom.point))
于 2016-11-14T23:54:19.967 回答