本文介绍了在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)) andtexture.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中的彩色和图案饼图中需要指定什么类别顺序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-17 14:51