{"action":"created","issue":{"url":"https://api.github.com/repos/stevengj/PyPlot.jl/issues/114","labels_url":"https://api.github.com/repos/stevengj/PyPlot.jl/issues/114/labels{/name}","comments_url":"https://api.github.com/repos/stevengj/PyPlot.jl/issues/114/comments","events_url":"https://api.github.com/repos/stevengj/PyPlot.jl/issues/114/events","html_url":"https://github.com/stevengj/PyPlot.jl/issues/114","id":56658090,"number":114,"title":"any way to custom font in PyPlot?","user":{"login":"retsyo","id":7960913,"avatar_url":"https://avatars.githubusercontent.com/u/7960913?v=3","gravatar_id":"","url":"https://api.github.com/users/retsyo","html_url":"https://github.com/retsyo","followers_url":"https://api.github.com/users/retsyo/followers","following_url":"https://api.github.com/users/retsyo/following{/other_user}","gists_url":"https://api.github.com/users/retsyo/gists{/gist_id}","starred_url":"https://api.github.com/users/retsyo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/retsyo/subscriptions","organizations_url":"https://api.github.com/users/retsyo/orgs","repos_url":"https://api.github.com/users/retsyo/repos","events_url":"https://api.github.com/users/retsyo/events{/privacy}","received_events_url":"https://api.github.com/users/retsyo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-05T11:25:40Z","updated_at":"2015-02-05T15:27:30Z","closed_at":null,"body":"In order to display Chinese on the chart, I followed the instruction on http://blog.csdn.net/rumswell/article/details/6544377. But obviously, I failed. Any hints? Thanks\r\n1)the first solution use dict in py, but how to translate it to Julia?\r\nmpl.rcParams['font.sans-serif'] = ['SimHei'] \r\nplt.title(u'some Chinese here')  \r\n\r\n2)the second one use font_manager, which I cannot find after \"using PyPlot\"\r\nmyfont = font_manager.FontProperties(fname='C:/Windows/Fonts/msyh.ttf')  \r\ntitle(u'some Chinese here', fontproperties=myfont) "},"comment":{"url":"https://api.github.com/repos/stevengj/PyPlot.jl/issues/comments/73064596","html_url":"https://github.com/stevengj/PyPlot.jl/issues/114#issuecomment-73064596","issue_url":"https://api.github.com/repos/stevengj/PyPlot.jl/issues/114","id":73064596,"user":{"login":"stevengj","id":2913679,"avatar_url":"https://avatars.githubusercontent.com/u/2913679?v=3","gravatar_id":"","url":"https://api.github.com/users/stevengj","html_url":"https://github.com/stevengj","followers_url":"https://api.github.com/users/stevengj/followers","following_url":"https://api.github.com/users/stevengj/following{/other_user}","gists_url":"https://api.github.com/users/stevengj/gists{/gist_id}","starred_url":"https://api.github.com/users/stevengj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevengj/subscriptions","organizations_url":"https://api.github.com/users/stevengj/orgs","repos_url":"https://api.github.com/users/stevengj/repos","events_url":"https://api.github.com/users/stevengj/events{/privacy}","received_events_url":"https://api.github.com/users/stevengj/received_events","type":"User","site_admin":false},"created_at":"2015-02-05T15:27:30Z","updated_at":"2015-02-05T15:27:30Z","body":"```julia\r\nPyCall.PyDict(matplotlib[\"rcParams\"])[\"font.sans-serif\"] = [\"SimHei\"]\r\ntitle(\"some Chinese here\")\r\n```\r\nOr, if you need to set the `rcParams` before initializing PyPlot:\r\n```\r\nusing PyCall\r\nPyDict(pyimport(\"matplotlib\")[\"rcParams\"])[\"font.sans-serif\"] = [\"Courier\"]\r\nusing PyPlot\r\n....plotting...\r\n```\r\nOr, for the second option:\r\n```\r\nmatplotlib[\"font_manager\"][:FontProperties](fname=\"C:/Windows/Fonts/msyh.ttf\")\r\ntitle(\"some Chinese here\", fontproperties=myfont)\r\n```"}}