我正在尝试将 3 页的 jupyter 笔记本导出为 pdf,但下载的文档仅在 1 页后就切断了。打印预览运行良好。我没有比这更多的细节,你有没有遇到过这样的错误?
我不知道如何解决这个问题,每个提示都会受到高度赞赏。
bash 文本是(对不起,长文本):
This is XeTeX, Version 3.14159265-2.6-0.99998 (TeX Live 2017) (preloaded format=xelatex)
restricted \write18 enabled.
entering extended mode
(./notebook.tex
LaTeX2e <2017-04-15>
Babel <3.10> and hyphenation patterns for 84 language(s) loaded.
(/usr/local/texlive/2017/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
Run Code Online (Sandbox Code Playgroud)
.... 包 inputenc 警告:基于 utf8 的引擎忽略 inputenc 包。
Package hyperref Message: Driver (autodetected): hxetex.
No file notebook.aux.
*geometry* driver: auto-detecting
*geometry* detected driver: xetex
*geometry* verbose mode - [ preamble ] …
Run Code Online (Sandbox Code Playgroud) 如何使用 cmap 的正确 np.array 使内部颜色对应于 matplotlib 中嵌套饼图中的外部颜色深浅?
我尝试使用不同的 cmap 数组,但我不明白这些数组是如何转换为 cmap 颜色的。
import numpy as np
import matplotlib.pyplot as plt
y =np.array([17, 16, 10, 8 ,6, 5, 5, 4, 3, 17 ,2 ,1, 1, 3, 2 ])
x = np.array([74 ,21 ,5])
fig, ax = plt.subplots()
size = 0.3
cmap = plt.get_cmap("tab20c")
outer_colors = cmap(np.arange(3)*4)
inner_colors = cmap(np.array([1, 2, 5, 6, 9, 10]))
ax.pie(x, radius=1, colors=outer_colors,
wedgeprops=dict(width=size, edgecolor='w'))
ax.pie(y, radius=1-size, colors=inner_colors,
wedgeprops=dict(width=size, edgecolor='w'))
ax.set(aspect="equal", title='Pie plot with `ax.pie`')
plt.show()
Run Code Online (Sandbox Code Playgroud)
我希望内部颜色是外部颜色的阴影(绿色、蓝色和橙色),但我不知道如何相应地更改它们。 …