用单词而不是Latex中的点绘制图形

问题描述

我试图在Latex中绘制一个图表,以显示不同机器学习方法的灵活性和可解释性之间的交易。我在这个问题上附加了精确图形的图像。我正在努力获取有关如何使用乳胶创建此图的信息。任何帮助将不胜感激。

enter image description here

解决方法

我的草图:

df <- data.frame(email = c("[email protected]","[email protected]","[email protected]","[email protected]"))
df$firstpart <- sapply(strsplit(df$email,"@"),function (x) {
  x[1]
})
df$secondpart <- strsplit(sapply(strsplit(df$email,function (x) {
  x[2]
}),"[.][[:alpha:]]+$")
df$thirdpart <- sapply(seq_len(nrow(df)),function (x) {
  gsub(paste0(df$part1[x],"@",df$part2[x],"."),"",df$email[x])
})
df
#                  email firstpart secondpart          thirdpart
# 1   [email protected]  example1      gmail   example1mail.com
# 2 [email protected]  example2    outlook example2utlook.org
# 3 [email protected]  example3    comcast example3omcast.net
# 4 [email protected]  example4    us.army example4s.army.mil

及其输出:

screenshot of output picture