2024-09-28 21:55:31 发布
网友
我发现这个漂亮的ggplot inspired color scheme for matplotlib并想将其用于特定的项目。在
根据matplotlib文档,自定义配色方案不应覆盖site-packages中的默认值,而应放在$HOME/.matplotlib中。但是在a venv中,$HOME的等价物是什么呢?特别是:如何确保在安装/升级新的matplotlib时不会覆盖此配色方案
site-packages
$HOME/.matplotlib
venv
$HOME
matplotlib
在接受了Voithos的回答后,我找到了MPLtools,它有助于:
A key feature of mpltools is the ability to set “styles”—essentially, stylesheets that are similar to matplotlibrc files. This example demonstrates the “ggplot” style, which adjusts the style to emulate ggplot
为后人发帖:-)
http://tonysyu.github.com/mpltools/auto_examples/style/plot_ggplot.html
有什么原因不想把它保存在实际的$HOME目录下?在
Virtualenv是一个用于创建隔离的Python环境的工具。因此,它并不试图提供一个完整的用户环境。所以基本上,virtualenv的$HOME就是用户的正常$HOME。在
至于Matplotlib,documentation提到了如何搜索matplotlibrc文件:
matplotlibrc
~/.matplotlib/matplotlibrc
在接受了Voithos的回答后,我找到了MPLtools,它有助于:
为后人发帖:-)
http://tonysyu.github.com/mpltools/auto_examples/style/plot_ggplot.html
有什么原因不想把它保存在实际的
$HOME
目录下?在Virtualenv是一个用于创建隔离的Python环境的工具。因此,它并不试图提供一个完整的用户环境。所以基本上,virtualenv的
$HOME
就是用户的正常$HOME
。在至于Matplotlib,documentation提到了如何搜索
matplotlibrc
文件:matplotlibrc
。这可能是您的venv特定配置的候选位置。在~/.matplotlib/matplotlibrc
)。在相关问题 更多 >
编程相关推荐