GPL issue: can't sort legend in correct order

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

GPL issue: can't sort legend in correct order

Ruben Geert van den Berg
Dear all,

When creating stacked bar charts with GPL, I usually want to have my chart transposed. When doing so, however, I can't sort the legend in the same order as the colors in the chart (see screenshot below). I can sort the legend reversely with a chart template but this also reverses the colors in the bars itself so that doesn't help.

Does anybody know of any solution for this?

Thanks in advance,

Ruben

The syntax for replicating the chart is here: http://www.spss-tutorials.com/spss-syntax-examples/spss-sorting-problem-stacked-bar-chart.html.

Reply | Threaded
Open this post in threaded view
|

Re: GPL issue: can't sort legend in correct order

Andy W
It is not possible. What the problem is is that with "interval.stack" it has to be the category on the first axis and what gets stacked on the second. So to create the horizontal stacked bar chart you need to transpose the chart, instead of just building it the opposite way to begin with.

It would be nice if "element.stack" had an option to switch these. I've complained about it before for dot plots as well.

The legend gets even more messed up if you do fancier things with likert graphs, see https://andrewpwheeler.wordpress.com/2013/10/21/stacked-pyramid-bar-charts-for-likert-data/ for an example. To solve that though would take a more general engine to manipulate the legend.

I've never been able to get legends in chart templates to behave properly, so if I'm not happy with a chart I will export it to PDF and then edit it in Inkscape. I don't have to do that very often though fortunately.



Andy W
apwheele@gmail.com
http://andrewpwheeler.wordpress.com/
Reply | Threaded
Open this post in threaded view
|

Re: GPL issue: can't sort legend in correct order

Ruben Geert van den Berg
Thanks Andrew!

I'm not happy to hear it really can't be done, but at least I won't waste any more hours in attempting to do something impossible...

Ruben

Reply | Threaded
Open this post in threaded view
|

Re: GPL issue: can't sort legend in correct order

Jeff Boggs
Does anyone know if this "design feature" has been replaced with a command
allowing us to reverse the order of legend items since these original posts?



--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD