我有一个带有matplotlib配置选项的自定义matplotlibrc
文件,遵循here过程。当我第一次启动Jupyter QtConsole时(如果需要的话,通过终端),文件正在被读取,请使用我设置的选项,例如虚线网格线:
%matplotlib inline
plt.plot([1, 2, 3])
Out[2]: [<matplotlib.lines.Line2D at 0x9d2fe80>]
matplotlibrc
文件如下:
mpl.matplotlib_fname()
Out[4]: 'C:\\Users\\my_username\\.matplotlib\\matplotlibrc'
但如果我输入seaborn:
import seaborn as sns
绘图然后切换到seaborn样式:
plt.plot([1, 2, 3])
Out[6]: [<matplotlib.lines.Line2D at 0xceb9cc0>]
是否可以在导入seaborn的同时保留原始打印样式?我想使用它的功能,比如seaborn.heatmap
,但不想使用它的样式。你知道吗
而不是:
用途:
你得到了API,没有样式。开发者为那些想要Seaborn的特性而不需要定制外观的人提供了这个选项。你知道吗
相关问题 更多 >
编程相关推荐