Questions tagged «labeling»

3
在geom_point中标记点
我正在使用的数据来自下面列出的互联网资源 nba <- read.csv("http://datasets.flowingdata.com/ppg2008.csv", sep=",") 我想做的是创建一个2D点图,比较该表中的两个指标,每个玩家代表图中的一个点。我有以下代码: nbaplot <- ggplot(nba, aes(x= MIN, y= PTS, colour="green", label=Name)) + geom_point() 这给了我以下内容: 我想要的是圆点旁边的玩家名称标签。我认为ggplot美学中的标签功能可以为我做到这一点,但事实并非如此。 我还尝试了text()function和textxy()from中的函数library(calibrate),但它们都似乎不适用于ggplot。 如何在这些点上添加名称标签?
178 r  plot  ggplot2  labeling  ggrepel 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.