I'm trying to create a plot legend where the rows contains multiple items, and those items have the same width, so that they appears to be in column. It should work with String Pad Right but for some reason the PlotLegends is deleting those paddings. Any idea on a workaround?
This works:
Column[
Style[#[[1]] ~~ " \[Sigma] = " ~~ #[[2]] ~~
" pkpk = " ~~ #[[3]], 15] & /@ Transpose@{
StringPadRight[{"RxUsrClk", "Clean RxUsrClk"}],
ToString[NumberForm[StandardDeviation[#], {10, 2}]] ~~
" ps" & /@ {RandomReal[2, 50], RandomReal[3, 50]},
ToString[NumberForm[Max[#] - Min[#], {10, 2}]] ~~
" ps" & /@ {RandomReal[2, 50], RandomReal[3, 50]}
}
]
And produces:
But inside the plot legends:
ListPlot[{RandomReal[2, 50], RandomReal[3, 50]},
PlotLegends -> {
Style[#[[1]] ~~ " \[Sigma] = " ~~ #[[2]] ~~
" pkpk = " ~~ #[[3]], 15] & /@ Transpose@{
StringPadRight[{"RxUsrClk", "Clean RxUsrClk"}],
ToString[NumberForm[StandardDeviation[#], {10, 2}]] ~~
" ps" & /@ {RandomReal[2, 50], RandomReal[3, 50]},
ToString[NumberForm[Max[#] - Min[#], {10, 2}]] ~~
" ps" & /@ {RandomReal[2, 50], RandomReal[3, 50]}
}
}]
It loses the right paddings: