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.pswp.cn/news/274530.shtml 繁體地址,請注明出處:http://hk.pswp.cn/news/274530.shtml 英文地址,請注明出處:http://en.pswp.cn/news/274530.shtml
如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!