python - matplotlib 中带有欧元符号的刻度
问题描述
我正在尝试绘制具有轴欧元单位之一的图。我正在格式化的功能是:
def money(x, pos):
return '$%1.0fB' % (x*1e-9)
它适用于 $。现在我需要将 $ 与无法直接识别的 € 符号互换。
我尝试的是:
def money(x, pos):
return r'$\euro$%1.0fB' % (x*1e-9)
但终端说:
Unknown symbol: \euro
解决方案
推荐阅读
- html - bootsrap 导航中是否有任何固定左侧?
- c# - “找不到资源“themes.xxx.xaml””运行时错误 - 另一个程序集中的 WPF 自定义组件
- java - 从 Rest API 返回自定义 Spring 安全消息
- highcharts - 极轨动画需要很长的路要走
- android - 搜索时间 avd 图像
- excel - Adding Rows based on Date Change
- jquery - 为什么我的 ajax 请求中出现错误 400?
- oracle - 将 Oracle Apex 5.0 IR 过滤器值传递给项目
- performance-testing - 在测试启用了 MS AD 登录的应用程序时使用 WebPageTest 工具时遇到问题
- python - 在 Python 中导入类的问题