在SPSS中的彩色和图案饼图中需要指定什么类别顺序? [英] What does it need to specify the category order in a colored and patterned pie chart in SPSS?
问题描述
I created a colored and patterned pie chart as described in this stack exchange Question. Now I also want to specify an order of the categories to apear in the pie chart.
通常,此功能可与sort.values
功能一起使用:
Usually this works with the sort.values
funtion:
SCALE: cat(aesthetic(aesthetic.color), sort.values("value", "value",...))
但是同时具有color(var))
和
texture.pattern(var)
在相同的ELEMENT
-Statement中起作用.
However this function doesn't seem to have an effect when having both color(var))
and
texture.pattern(var)
functions inside the same ELEMENT
-Statement.
推荐答案
您还需要指定texture.pattern的类别顺序.因此,添加以下行:
You also need to specify the category order for the texture.pattern. So add the line:
SCALE: cat(aesthetic(aesthetic.texture.pattern), sort.values("value", "value", ...))
同时定义颜色美感和纹理美感.类别美感应产生特定的有序饼图.
Defining the category order for both, the color aesthetic and the texture.pattern aesthetic should result in the specific ordered pie chart.
不幸的是,该顺序不适用于图例,当尝试读取饼形图时,该图例实在令人um目结舌.我还没有弄清楚如何或是否可以解决这个问题.
Unfortunatly the order isn't applyied to the legend, which is quiet a bummer when trying to read the pie chart. I haven't figured out how or if this can be fixed.
这篇关于在SPSS中的彩色和图案饼图中需要指定什么类别顺序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!