[异常]Failed to process string with tex because latex could not be found
2020-04-04 12:14
11017 查看
环境:anaconda
使用jupyter notebook尝试plt.text()报出异常:RuntimeError: Failed to process string with tex because latex could not be found
尝试解决方法:
pip install latex
安装成功
运行仍旧报出该异常。
到anaconda的官方网站搜索,找到答案
https://anaconda.org/conda-forge/jupyter_latex_envs
按照步骤:
conda install -c conda-forge jupyter_latex_envs
conda install -c conda-forge/label/cf201901 jupyter_latex_envs
conda install -c conda-forge/label/cf202003 jupyter_latex_envs
成功后,问题得到解决。
import matplotlib.pyplot as plt fig = plt.figure() plt.axis([0, 10, 0, 10]) t = ("ACEACEACE\n " "ACEACE\n " "ACE") plt.text(6, 1, t, ha='left', rotation=15, wrap=True) plt.text(1, 5, t, ha='left', rotation=15, wrap=True) plt.text(5, 5, t, ha='right', rotation=-15, wrap=True) plt.text(5, 10, t, fontsize=18, style='oblique', ha='center', va='top', wrap=True) plt.text(10, 4, t, family='serif', style='italic', ha='right', wrap=True) plt.text(-1, 0, t, ha='left', rotation=-15, wrap=True)
终于可以加文字了,随便写个位置探索一下用法。
- 点赞
- 收藏
- 分享
- 文章举报
相关文章推荐
- The security settings could not be applied to the database because the connection has failed w
- Failed to execute request because the App-Domain could not be created
- asp.net2.0发布到本机IIs报错:Failed to execute request because the App-Domain could not be created. Error: 0
- IIS不能用,报错:Failed to execute request because the App-Domain could not be created. Error: 0×80070005 Access is denied
- Publishing failed with multiple errors Could not delete *,May be locked by another process.
- WARNING rally.common.broker [-] Failed to consume a task from the queue: The resource could not be found. (HTTP 404)
- GetModuleFileName False failed with error 126 (The specified module could not be found)
- Failed to execute request because the App-Domain could not be created. Error: 0x80131902
- Failed to execute request because the App-Domain could not be created. Error: 0x80131902 (方法2)
- Server Application Unavailable 【Failed to execute request because the App-Domain could not be created.】的解决办法
- Failed to execute request because the App-Domain could not be created. Error: 0×80131902的解决方法
- Publishing failed with multiple errors Could not delete *,May be locked by another process.
- Failed to execute request because the App-Domain could not be created. Error: 0x80070002 系统找不到指定的文件。
- Failed to execute request because the App-Domain could not be created
- fix errors 1088: “Failed to execute request because the App-Domain could not be created. Error: 0x80070005 Access is denied” and 1334: “Exception: System.IO.FileLoadException”
- Failed to execute request because the App-Domain could not be created
- asp.net2.0發佈到本機IIS報錯:Failed to execute request because the App-Domain could not be created. Error: 0×80070005 儲存被拒絕.
- 解决Azure “Failed to start Storage Emulator: the SQL Server instance `.\' could not be found.”
- 服务器端安装ASP.NET运行环境错误Failed to execute request because the App-Domain could not be created. Error: 0x80131902
- Failed to execute request because the App-Domain could not be created.