Closed adknudson closed 2 months ago
Fixed! There's a new column transform sort_by
:
geom_line = geom_template("geom_line", ["x", "y"], :Lines;
column_transformations = Dict{Symbol, Pair{Vector{Symbol}, AesTransform}}(
:y => [:y, :x]=>sort_by,
:x => [:x, :x]=>sort_by
)
)
ggplot(df, @aes(x = x, y = y)) + geom_path()
ggplot(df, @aes(x = x, y = y)) + geom_line()
Describe the bug Right now there is no functional difference between
geom_line
andgeom_path
To Reproduce In R:
In Julia
Expected behavior
geom_line
should "connect [the observations] in order of the variable on the x axis"Solution Instead of plotting (x, y) as given,
geom_line
should first compute the sort permutation ofx
and plot(x[sp], y[sp])
.The same comments apply to
geom_step
which also sorts observations according to the x-axis