python - 将 svg 图像添加到 matplotlib 中的子图
问题描述
所以这里是生成深色背景子图的简单代码:-
import matplotlib.pyplot as plt
fig, ax = plt.subplots(figsize=(6,6), facecolor='black')
ax.set_facecolor('black')
我希望将这个格式的图像.svg
添加到子图中。在使用 PIL时Image.open()
,plt.imread
我得到了UnidentifiedImageError
. 我应该怎么做才能读取.svg
文件并将其添加到子图中。
解决方案
推荐阅读
- bash - Golang exec.Command() bash 命令不起作用
- javascript - 是否可以在 AdonisJs 中显示数据库查询日志?
- javascript - 如何使用 Javascript 检查 Firebase 中是否存在电子邮件?
- html - IE 中两个 div 之间的 1px 小间隙
- asp.net - 没有 mvc 的 asp.net core 2.0 razor web 应用程序中的本地化
- http - 无法在带有python后端的graphql中使用flutter登录
- android - Admob-是否可以在市场上放置另一个应用程序的链接并在下载时赚钱?
- amazon-web-services - Azure 中的签名 URL
- javascript - 使用 $(document).ready(function() 更改标签的文本
- javascript - 为什么服务器上的“窗口”编码问题上的“atob”而不是本地的(laravel 代客)?