【发布时间】:2022-11-19 03:48:19
【问题描述】:
当我用 RI 绘图时,我发现如果我最大化绘图窗口,文本会在我的绘图上重新调整。 Y问题是: 我可以用 text() 做什么来使字体大小相对于绘图窗口大小固定?
quartz(7,7) #Use window(7,7) for other windows and Linux
plot( 0, xlim = c(0,10), ylim = c(0,10), ylab = '', xlab = '')
text(5,5, 'This is an example for Stackexchange. \n
How can i chose a font size that is relative to the window\'s size?')
quartz(12,12) #Use window(12,12) for other windows and Linux
plot( 0, xlim = c(0,10), ylim = c(0,10), ylab = '', xlab = '')
text(5,5, 'This is an example for Stackexchange. \n
How can i chose a font size that is relative to the window\'s size?')
图片显示了我的意思
我试过使用 cex 参数但它改变了字体大小的绝对值(不是相对的)
【问题讨论】: