在由ggplot2生成的图表中显示utf-8字符 [英] showing utf-8 character in chart generated by ggplot2

查看:128
本文介绍了在由ggplot2生成的图表中显示utf-8字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用符号(u + 2265):



。我怎样才能做到这一点?
$ b $ h3> UPDATE 01

我需要使用添加> = 95 在y轴标签中显示年龄大于95岁的人群,我试过表达式(> = 95),但失败似乎期待> = 之前的内容。我可以做什么?

解决方案

  qplot(1,1,ylab = expression(phantom (。)> = 95))

通过使用 phantom 在表达式中,你没有得到任何打印。我在那里放了一段时间,因为 phantom 仍留下空间,所以我想要一些小东西。


I want to use the symbol (u+2265):

in the y-axis label of my chart. How can I do that? Thanks.

UPDATE 01

I need to use add a >=95 in the y-axis label, showing the group of people aged more than 95, I tried expression(>=95) but fail as it seems to expect something before >=. What can I do?

解决方案

qplot(1, 1, ylab=expression(phantom(.) >= 95))

By using phantom in the expression, you don't get anything printed. I put a period in there because phantom still leaves space, so I wanted something small.

这篇关于在由ggplot2生成的图表中显示utf-8字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆