Changing order in the legend

With Gaston:

using Gaston
plot(range(1,10,step=1),
     lc = :red,
     lw = 8,
     legend = :third,
     Axes(key = "center top invert"))
plot!(range(10,1,step=-1),
      lc = :blue,
      lw = 3,
      legend = :second)
plot!(range(3,8,length=10),
      lc = :black,
      lw = 3,
      legend = :first)

image

First I configured the key (legend box in gnuplot parlance) with the invert option, and then I plotted the curves in reverse order.