How to control legend position with PGFPlotsX (move legend outside of axis)

I was advised to not “hijack” a thread, whatever that means, so making one more post.

Using PGFPlotsX, there is a field entry, legend_pos, which allows for moving the legend inside of the axis.

How can I move the legend outside of the axis?

The thread in question where part of my issue is resolved: How to control legend position with PGFPlotsX

And some example code:

x = range(0; stop =2*pi, length = 100)
@pgf GroupPlot(
    {
        group_style =
        {
            group_size="2 by 1",
            xticklabels_at="edge bottom",
            yticklabels_at="edge left",
            legend_pos   = "south"
        },
        no_markers
    },
    {},
    PlotInc(Table(x, sin.(x))),
    PlotInc(Table(x, sin.(x .+ 0.5))),
    {},
    PlotInc(Table(x, cos.(x))),
    PlotInc(Table(x, cos.(x .+ 0.5)))),
    LegendEntry("Test")

Kind regards

Try legend_pos = "outer south".

Unfortunately did not work.

Think I finally understood to look into pgfplots doc:

/pgfplots/legend pos=south west|south east|north west|north east|outer north east

page 261

And these are the only entries which should work. Perhaps there is a way to learn manually how to set it instead…

Kind regards