Skip to content

Instantly share code, notes, and snippets.

@abikoushi
Last active August 29, 2015 14:10
Show Gist options
  • Save abikoushi/956fa3e6452de50528cc to your computer and use it in GitHub Desktop.
Save abikoushi/956fa3e6452de50528cc to your computer and use it in GitHub Desktop.
日本語のフォントを使って Mac で plot したいときに使う。
nihongo <- function (family = "HiraKakuPro-W3"){
old =par(family = family)
return(old)
}
@abikoushi
Copy link
Author

Example

#例1
#デフォルトはヒラギノ
old =nihongo()
hist(rnorm(100),main="ヒストグラム")
par(old)

#例2
#Osaka フォント
nihongo("Osaka")
hist(rnorm(100),main="ヒストグラム")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment