window程序设计学会
Pie charts are common in data science — next to the
饼形图在数据科学中很常见-
bar chart and the line plot, the pie chart is incredibly standard and simple. A circle is split into several slices, with each slice’s angle representing how large its value is. It is a standard and allows for quick comparison of values, but there’s so much that can go wrong.条形图和折线图,饼图非常标准和简单。 一个圆被分成几个切片,每个切片的角度代表其值的大小。 这是一个标准,可以快速比较值,但是有很多地方可能出错。Unlike most charts, like bar charts, box plots, line plots, etc., pie charts don’t have an x-axis and a y-axis that are orthogonal — the types of plots humans can more instinctively understand. The circular plot can be more difficult to communicate effectively — so in this article, I’ll present five tips you can use to avoid pie chart pitfalls and deliver the message.
与大多数图表(如条形图,箱形图,折线图等)不同,饼图不具有正交的x轴和y轴-人类可以更直观地了解这些图的类型。 圆形图可能更难以有效地传达-因此,在本文中,我将介绍五个技巧,您可以使用这些技巧来避免饼图陷阱并传递消息。
1 | 不要使用鲜艳的颜色,而要使用鲜艳的颜色。 (1 | Don’t use bright colors, use vibrant ones.)
Unlike bar charts, pie charts should have colors that are vibrant. The reasoning behind this is that bars in bar charts are separated.
与条形图不同,饼图应具有鲜艳的颜色。 其背后的原因是条形图中的条形是分开的。
Because they are separated, it’s easier to separate the discrete x-variable into its classes. With a pie chart that is colored too similarly, however, because the slices can be thought of as being continuous (they are right next to each other), it is less easy to pick apart where one slice stops and where another begins, especially for someone with reduced vision (about 1 in 10 men have some form of color blindness).
因为它们是分开的,所以将离散的x变量分成其类更容易。 但是,由于饼图的颜色过于相似,因为可以将切片视为连续的(彼此紧挨着),所以很难区分出一个切片停止和另一个切片开始的位置,尤其是对于视力低下的人(约十分之一的男人患有某种形式的色盲)。
In addition, whereas bar charts have a clear beginning and end on the x-axis, pie charts are circular. There really isn’t a beginning or an end place to start — so why is it warranted that the darkest shade starts with Java, then Ruby, and so on — and not starting with some other shade or direction?
此外,条形图在x轴上具有清晰的起点和终点,而饼图则是圆形的。 确实没有开始或结束的地方-那么为什么要保证最暗的阴影从Java开始,然后从Ruby等开始,而不是从其他阴影或方向开始?
Instead, use colors that more easily differentiable. While they should still be muted (not bright), it’s much more easy to differentiate between different sections. In addition, it doesn’t give the false impression of continuity between slices — each slice is its own, discrete bucket. The insinuation that the pie slices are linked in some way by using similar shades is false.
而是使用更容易区分的颜色。 尽管它们仍然应该静音(不亮),但区分不同部分要容易得多。 此外,它不会给片之间的连续性带来错误的印象-每个片都是其自己的离散存储桶。 通过使用相似的阴影以某种方式链接饼图的暗示是错误的。
Standard ‘Google’ or ‘Microsoft’ colors work well too.
标准的“ Google”或“ Microsoft”颜色也可以很好地工作。
In my previous article on bar charts, I also talked about using w3school’s color picker. For bar charts, I recommended picking one color and selecting various brightness levels (the ‘Lighter / Darker’ column below), but for pie charts, you should rotate colors in a circle among the base-color hexagon. Stick along the outside, and move a bit further along the perimeter for a new color.
在我以前关于条形图的文章中,我还谈到了使用w3school的颜色选择器。 对于条形图,我建议选择一种颜色并选择各种亮度级别(下面的“较浅/较深”列),但是对于饼形图,您应该在基本色六边形之间以圆圈旋转颜色。 沿外部粘贴,然后沿周边进一步移动以产生新的颜色。
Even though we are choosing vibrant colors to differentiate pieces, they should be organized so that the colors make sense and are not jarring. For each color, use your best judgement on the brightness color to use (it should be dimmed and not glaring).
即使我们选择鲜艳的色彩来区分作品,也应将它们进行组织,以使色彩有意义且不会刺耳。 对于每种颜色,请最好地判断要使用的亮度颜色(该颜色应变暗而不刺眼)。
This will make comparison between slices much easier and allow for a clean feel.
这将使切片之间的比较容易得多,并且感觉干净。
2 | 停止爆炸切片。 请。 (2 | Stop exploding slices. Please.)
Often, people will explode certain slices of a pie chart to draw more attention to it. By drawing a slice, especially a large slice, away from the pie, it makes comparison difficult. A pie chart is designed for percentages — not absolute values — which means the primary goal is to compare.
通常,人们会爆炸饼图的某些部分以引起更多关注。 通过从饼图上绘制一个切片,尤其是大切片,将使比较变得困难。 饼图是针对百分比而非绝对值而设计的,这意味着比较的主要目标。
By pulling out one slice, it makes it more difficult for the reader to compare the slices — the viewer must piece back the piece in their own minds. In addition, percentages are supposed to add up to 100%, so why would you pull out a slice? What makes the pie chart a useful and standard chart is that it has some aspect of continuity — the perimeter is a smooth curve, and packs all the data in. This is disrupted with exploded segments.
通过拉出一个片段,阅读者比较这些片段变得更加困难-观看者必须在自己的脑海中整理片段。 另外,百分比总计应该达到100%,那么为什么要掏出一块呢? 饼图成为有用且标准的图表的原因在于它具有某种连续性-外围是平滑的曲线,并且将所有数据打包在一起。这被爆炸的分段打乱了。
Exploding two slices is worse — how is anyone supposed to compare anything? The pie chart might as well be like this.
爆炸两片更糟-任何人都应该比较任何东西? 饼图也可能像这样。
When slices are pulled out of the tight, neat circle that binds them, it removes the aspect of ‘adding up to 100%’ that makes the pie chart effective. Otherwise, it becomes similar to a bar chart, where nothing really adds up to 100% but the pieces are semi-comparable.
当将切片从束缚它们的紧密,整齐的圆圈中拉出时,它消除了使饼图生效的“相加达到100%”的方面。 否则,它变得类似于条形图,在该条形图中,没有任何东西合计达到100%,但各部分之间是半可比的。
Instead, use color to brighten the color you wish to emphasize and dim the rest. This will draw attention to whatever piece you wish to emphasize. However, be careful with the dimmed colors — because all colors converge at white when they are dimmed, the boundaries may begin to interfere. In this case, using a small explosion (0.01 inches, in this case) to create pie-separating lines maintains the signature adds-to-100 look while drawing attention to a certain part of the pie chart.
而是使用颜色来加亮您想要强调的颜色并使其余颜色变暗。 这将引起您对任何您想强调的部分的注意。 但是,请注意变暗的颜色-因为变暗时所有颜色会收敛为白色,所以边界可能会开始干涉。 在这种情况下,使用较小的爆炸(在这种情况下为0.01英寸)创建饼图分隔线,可以在增加对饼图某一部分的注意力的同时,保持签名增加到100的外观。
3 | 没有特殊效果,期限。 (3 | No special effects, period.)
This one’s quick and easy. You don’t need to explore every option in your plotting library. Don’t add shadows, don’t rotate labels, don’t do anything that isn’t absolutely necessary to communicating your data clearly.
这很容易。 您无需探索绘图库中的每个选项。 不要添加阴影,不要旋转标签,不要做对清楚地传达数据绝对不需要的任何事情。
One particular aspect of shadows is that it gives the pie chart a three-dimensional look. Pie charts are inherently two-dimensional. It compares two variables, so it should only be two-dimensional. Even though 3-d charts are generally effective, if there were three variables, depth of each slice might be a more reasonable use of three-dimensional looks in pie charts.
阴影的一个特定方面是它使饼图具有三维外观。 饼图本质上是二维的。 它比较两个变量,因此只能是二维的。 尽管3-d图表通常是有效的,但如果存在三个变量,则每个切片的深度在饼图中可能更合理地使用了三维外观。
4 | 没有传说。 (4 | No legends.)
Adding a legend forces the viewer to alternate between the legend and the actual plot. It’s much easier for the viewer just to label right on the diagram which segment is what.
添加图例会迫使观看者在图例和实际图之间切换。 对于查看者而言,仅在图上正确标记哪个段是什么就容易得多。
5 | 最多5片。 (5 | 5 slices maximum.)
Too many slices distracts from the main point of the chart. The ultra-small slices are so small that they can’t even be reasonably compared, and the labels begin to overlap.
太多的切片分散了图表的重点。 超小切片是如此之小,以至于甚至无法进行合理比较,并且标签开始重叠。
5 slices is the maximum — either 5 distinct slices, or 4 slices and one for ‘Other’. This way, the number of slices is manageable and comparable. We can look at the most important slices without discarding the idea of adding up to 100%, which also gives us a more complete idea of the true distribution. Writing how many items are in ‘Other’ will help give a better idea of the sizes of items within that category.
最多5片-5个不同的片或4片,其中一个代表“其他”。 这样,片的数量是可管理的并且是可比较的。 我们可以查看最重要的片段,而不会放弃将100%相加的想法,这也使我们对真实分布有了更完整的想法。 写下“其他”中的项目数将有助于更好地了解该类别中项目的大小。
If you enjoyed, you may also like 5 Tips to Stop Doing Bar Charts Wrong.
如果喜欢,您可能还会喜欢5条停止制作条形图的提示 。
翻译自: https://uxdesign.cc/5-tips-to-stop-doing-pie-charts-wrong-67fbd2c1db08
window程序设计学会
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/274530.shtml
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!