我创建了一个气泡图,并想给气泡的大小一个标签。但是,我看不到如何在标签中添加一个单位,而不是说“228”让标签读为“228 qq”
代码是:
SalesChannells <- read.csv("SalesChannelsData.csv")
View(SalesChannells)
SalesChannelsScatter <- ggplot(SalesChannells, aes(x = SalesChannel, y = NumberOfFarmers, size = TotalVolumeOfCoffee, color = TotalVolumeOfCoffee), alpha=.5) +
geom_point()
SalesChannelsScatter +
scale_size_area(max_size = 30) +
theme(legend.position = "bottom", legend.direction = "horizontal") +
labs(size = "Volume of coffee sold") +
labs(title="More coffee is sold to intermediaries than to organisations") +
expand_limits(y=c(0,100)) +
labs(x="Sales Channel", y="Number of farmers")+
geom_text(aes(label=TotalVolumeOfCoffee), size=8, color="white",hjust = 1.7)
情节如下所示:
如果可以在标签后面添加一张漂亮的卡片,那么额外的奖励积分是一个矩形,一端是三角形,在气泡的中心完成。到目前为止,我只能添加标准矩形,不知道如何添加一个点或正确定位它。