Last time I asked a question about putting the text after the line legend here and it works fine for that example.
LineLegend[{Red, Blue}, {"cubic", "quadratic"},
LegendLayout -> "Column", "MarkerLayout" -> After]
Now I also want to apply this to this PointLegend by adding Method->"MarkerLayout" -> After
mentioned by kglr here but it doesn't work. How can I fix this?
ClearAll[legend1]
Options[legend1] = {Joined -> Automatic};
legend1[colors_, polymarkers_, legend__, , OptionsPattern[]] :=
PointLegend[colors, legend, Joined -> OptionValue[Joined],
LegendMarkers -> (ResourceFunction["PolygonMarker"][#, Offset[4],
EdgeForm[]] & /@ polymarkers), LegendMarkerSize -> {30, 30},
LegendLayout -> (Column[
Grid[{##}, Alignment -> {Center, Center}] & /@ #,
Spacings -> -1] &), Method->"MarkerLayout" -> After]
colors = ColorData[97, #] & /@ Range[6];
polymarkers = {"DownTriangle", "SevenPointedStar", "FourPointedStar",
"Diamond"};
mylegend =
MaTeX[TeXForm[#], Magnification -> 0.5] & /@ {{"5X", "6Y", "8Z",
"9M", "2K", "2N", "2T", "3N", "5O"}, {"1X", "3Y", "5Z", "2L",
"9K", "3Z", "7X", "3P", "2T"}, {"3K", "6M"}, {"3H", "6K"}, {"X4",
"Y5", "C6", "1K"}, {"X6", "Y6", "C6", "Z6"}};
legend1[colors, polymarkers, mylegend, , Joined -> True]