[英]Center the bars in Funnel chart
我正在嘗試在R中制作漏斗圖。例如,我從此頁面中獲取了代碼https://analyzecore.com/2015/06/23/sales-funnel-visualization-with-r/但是,奇怪的是,為什么我的杠鈴偏向左側?
Funnel data:
Category Number
1 total_members 1000
2 paid_members 936
3 cancellations 452
4 refunds 34
library(ggplot2)
ggplot() +
theme_minimal() +
coord_flip() +
scale_fill_manual(values=cols)+
geom_bar(data=funnel_data, aes(x=Category, y=Number, fill=Category), stat="identity", width=1)
結果是
如果您僅運行本文中的代碼段,則該代碼段例如:
ggplot() +
theme_minimal() +
coord_flip() +
scale_fill_manual(values=cols) +
geom_bar(data=df.all, aes(x=step, y=number, fill=content), stat="identity", width=1)
我不知道這種情況是什么問題。 希望得到您的協助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.