2
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

Organization

plotで軸タイトルを縦書きにする

当方windows環境です。
plotを用いる際に軸タイトルを縦書きにしたいと聞かれたのでとりあえず改行コードを間にはさむ回答をしたのですが、ggplot2やlatticeを用いる以外にもっとエレガントな回答ないでしょうか。

axis_text.R
convertTXT <- function(x){
res <- paste(collapse="\n", unlist(strsplit(split="", x)))
return(res)
}

plot(x=2000:2010, y=25:35, type="p", xlab="平均気温", ylab="")
mtext(convertTXT("全世界の海賊の数"), side=2, las=1, line=3)
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Sign upLogin
2
Help us understand the problem. What are the problem?