0

I'm using Gadfly to plot layers, how can I change the order?

I already tried follow the docs but it doesn't work.

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))
pmargreff
  • 82
  • 3
  • 14

1 Answers1

1

Solved with

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))
pmargreff
  • 82
  • 3
  • 14