Plots. Names in Russian.

57 views
Skip to first unread message

Dzmitry Kolkin

unread,
Feb 6, 2017, 4:10:57 PM2/6/17
to ggplot2
Hello all! I'm a new one to this world of the ggplot users but have already found this package as the most useful one for my needs. Given the fact that I'm visualizing data that contains some names in Russian I encountered kind of a problem of saving plots in PDF files. The problem is that I'm using pdf() function that gives me ...... instead of names in Russian. I understand that the problem is in fonts installed, but still haven't solved the issue.
If anyone has a good and easy way to solve this conundrum I'd greatly appreciate if you share.

Roman Luštrik

unread,
Feb 6, 2017, 4:18:33 PM2/6/17
to Dzmitry Kolkin, ggplot2
Can you try if `cairo_pdf()` does anything for you?

Cheers,
Roman

On Mon, Feb 6, 2017 at 9:41 PM, Dzmitry Kolkin <dko...@gmail.com> wrote:
Hello all! I'm a new one to this world of the ggplot users but have already found this package as the most useful one for my needs. Given the fact that I'm visualizing data that contains some names in Russian I encountered kind of a problem of saving plots in PDF files. The problem is that I'm using pdf() function that gives me ...... instead of names in Russian. I understand that the problem is in fonts installed, but still haven't solved the issue.
If anyone has a good and easy way to solve this conundrum I'd greatly appreciate if you share.

--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility

To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+unsubscribe@googlegroups.com
More options: http://groups.google.com/group/ggplot2

---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
In God we trust, all others bring data.
Message has been deleted

Dzmitry Kolkin

unread,
Feb 6, 2017, 10:46:02 PM2/6/17
to ggplot2
Thank you Roman! I tried and it worked. Although it solved the issue I had, I still want to figure out how to add Cyr fonts directly, for instance, from web recourse rather then use a library on my laptop. Any thoughts on this point?

Sergey B.

unread,
Feb 6, 2017, 10:57:55 PM2/6/17
to Dzmitry Kolkin, ggplot2
Try installing Computer Modern fonts.

--

Dzmitry Kolkin

unread,
Feb 6, 2017, 11:34:57 PM2/6/17
to ggplot2
Installed. When use family = "CM Roman Cyrillic" the output says that "no font could be found for family "CM Roman Cyrillic". Example of script below.

theme(axis.text.x = element_text(angle = 90, vjust = .5, size = 5, colour = "black"),
...
legend.text = element_text(size = 5, family = "CM Roman Cyrillic"),
...


Sergey B.

unread,
Feb 7, 2017, 1:26:52 AM2/7/17
to Dzmitry Kolkin, ggplot2
Try finding the right distribution of CM fonts. In my case the issue was resolved after doing that.

Dzmitry Kolkin

unread,
Feb 8, 2017, 2:02:27 PM2/8/17
to ggplot2, dko...@gmail.com
Sergei, thank you for this reply. I'm afraid I don't understand what you meant by right distribution. I tried a number of Cyr fonts from Computer Modern pack but none of them worked for me. The same error all the time. 


On Tuesday, February 7, 2017 at 9:26:52 AM UTC+3, Sergey Bushmanov wrote:
Try finding the right distribution of CM fonts. In my case the issue was resolved after doing that.
On Tue, Feb 7, 2017 at 7:34 AM, Dzmitry Kolkin <dko...@gmail.com> wrote:
Installed. When use family = "CM Roman Cyrillic" the output says that "no font could be found for family "CM Roman Cyrillic". Example of script below.

theme(axis.text.x = element_text(angle = 90, vjust = .5, size = 5, colour = "black"),
        ...
 legend.text = element_text(size = 5, family = "CM Roman Cyrillic"),
        ...


--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility

To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com

More options: http://groups.google.com/group/ggplot2

---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages