You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
draw throws with "Arguments must be sorted" for a strangely hard-to-pin-down combination of plot elements. This happens when plotting into multiple layouts but it seems to depend on how many plotting elements we have as well as how many subplots.
Steps to reproduce
using DataFrames
using CairoMakie
using AlgebraOfGraphics
n_subplots =3
n_series =10# works fine with 2
n_x =10
_test_df =DataFrame(rand(n_series * n_x, n_subplots), :auto)
_test_df[:, :color] =reduce(vcat, [fill(i, n_x) for i in1:n_series])
_test_df[:, :x] =repeat(1:n_x, n_series)
plt =data(_test_df) *sum([
mapping(:x, Symbol("x$i"), color =:color=> string, layout=direct(('A':'Z')[i])) for i in1:n_subplots
]) *visual(Lines)
draw(plt)
I found a better way of doing this (mapping(:x, [:x1, :x2, :x3] ...)) so it's by no means urgent, but I still would not have expected the code above to throw for some values of n_series but not others.
Thanks for the reproducer, the problem was a bug in the sorting machinery. The reason it seemed to depend on the number of elements was just that it only appeared for strings that had to be naturally sorted, so you needed the "10" in there to trigger it. This will be fixed by #553
Bug description
Hi,
draw
throws with "Arguments must be sorted" for a strangely hard-to-pin-down combination of plot elements. This happens when plotting into multiple layouts but it seems to depend on how many plotting elements we have as well as how many subplots.Steps to reproduce
Error reporting
Version info
I get this on AoG 0.8.6, CairoMakie 0.12.9, Makie 0.21.9 with Julia 1.10.4 on Linux
The text was updated successfully, but these errors were encountered: