Is there any convenient way to get vertical CJK text onto an R plot? Both as labels for points/polygons, and just as part of a block of arbitrary text placed on the plot.
The one potential method I've found so far is to use the ragg package to pass something like the vrt2 OpenType feature to a font so that it uses one of those glyph sets meant for writing vertical text in a horizontal environment, and then rotating it to be correct. Is there an easier way to do it than that?
Simply putting newlines between the characters might be enough. For example,
produces this:
Doing a block of text is more tedious: I think each line will need to be drawn separately. For example,
produces this:
Edited to add: If the character spacing is unacceptable, you can use the
par("lheight")parameter to adjust it. For example,which gives
It's fairly easy to automate the insertion of newlines, but I'll leave that to you. What would be hard would be to have variable spacing, e.g to insert small spaces or parentheses.