In Plots.jl, the PGFPlotsX backend won’t let me add another series with proper control over the z-order. Here is the MWE:
using Plots
pgfplotsx()
input = range(0, 4π, 100)
output = cos.(input)
plt = scatter(input, output, label = "data")
plot!(plt, input, output, label = "theory")
This puts the theory
series behind the data
series, when it should be the other way around:
GR works fine:
gr()
plt = scatter(input, output, label = "data")
plot!(plt, input, output, label = "theory")
Using the z_order
attribute makes no difference:
pgfplotsx()
plt = scatter(input, output, label = "data", z_order = 1)
plot!(plt, input, output, label = "theory", z_order = 2)
Does anyone have any suggestions? I am not familiar with the PGF interface at all so I can’t find a way of using PGFPlotsX directly, but would appreciate a pointer.
Many thanks!