If df
is your data set, you can try ggplot2
package
library(ggplot2)
ggplot(data = df, aes(x = X, y = Y, label = Name)) +
geom_point() +
scale_colour_manual(values = c("blue", "green", "yellow", "red")) +
geom_text(aes(color = Goal), hjust=1.1, vjust=1.1, size = 5) +
labs(title = "Google", x = "Correlation Coefficient", y = "Top-Box %")
A bit different version where the points are the same color as names
library(ggplot2)
ggplot(data = df, aes(x = X, y = Y, color = Goal)) +
geom_point() + scale_colour_manual(values = c("blue", "green", "yellow", "red")) +
geom_text(aes(label = Name), hjust=1.1, vjust=1.1, size = 5) +
labs(title = "Google", x = "Correlation Coefficient", y = "Top-Box %")
Third version where the labels are black
library(ggplot2)
ggplot(data = df, aes(x = X, y = Y, color = Goal)) +
geom_point() +
scale_colour_manual(values = c("blue", "green", "yellow", "red")) +
geom_text(aes(label = Name), color = "black", hjust=1.1, vjust=1.1, size = 5) +
labs(title = "Google", x = "Correlation Coefficient", y = "Top-Box %")