我需要为我的 ggplot 文本注释设置特定的宽度。例如,我希望第一个注释从
我还想要文本对齐得很好。
x = 0
到 x = 40
,第二个注释从 x = 50
到 x = 90
。换句话说,我需要让这些注释适合 0 到 40 和 50 到 90 之间的空间。我还想要文本对齐得很好。
library(ggplot2)
librray(tibble)
df <- tibble(x = 1:100, y = 1:100)
ggplot(df, aes(x = x, y = y))+ geom_blank() +
annotate(geom = 'text', x = 0, y = 50, hjust = 0, vjust = 0,
label = 'Shortly after his arrival at Real Madrid in July 2018, ESPN journalist Dermot Corrigan described Vinícius
as a "zippy left winger or second striker". El Mundo described him "A player who is forever tormented,
teetering on the edge, on that invisible line between genius and ridicule. Judgment always hangs over
him, a winger unable to make his legs and feet move in unison, but he never gives up and that is a great
quality. A versatile player, although he is usually deployed on the left flank, he is capable of playing
anywhere along the front line, and has also been used on the right or in the centre. ',
size = 3,
color ='black')+
annotate(geom = 'text', x = 50, y = 50, hjust = 0, vjust = 0,
label = 'Shortly after his arrival at Real Madrid in July 2018, ESPN journalist Dermot Corrigan described Vinícius
as a "zippy left winger or second striker". El Mundo described him "A player who is forever tormented,
teetering on the edge, on that invisible line between genius and ridicule. Judgment always hangs over
him, a winger unable to make his legs and feet move in unison, but he never gives up and that is a great
quality. A versatile player, although he is usually deployed on the left flank, he is capable of playing
anywhere along the front line, and has also been used on the right or in the centre. ',
size = 3,
color ='black')
使用ggplot2能实现这个吗?还有其他的包可以帮助我完成吗?