JuliaPy / JuliaPy/PyPlot.jl

use styles in a module

未关闭
#462 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Julia
星标
488
派生
90
PR 合并指标
30 天内没有已合并 PR

描述

I'm imposing a style inside a module, but it doesn't take effect when I call `PyPlot.jl` functions from this module. see [here](https://github.com/SimonEnsemble/Controlz.jl/blob/master/src/Controlz.jl#L5-L9).

```julia
module Controlz

using PyPlot

# hipster plot theme
PyPlot.matplotlib.style.use(joinpath(
replace(pathof(Controlz), "src/Controlz.jl" => "src"), "hipster.mplstyle"))
# ...

function my_plot()
plot([1], [2])
end
```
then the style is not used in `my_plot()`. is there a way to enforce my `.mplstyle` file to be used in these plots? thanks.

贡献指南

这个仓库没有索引到贡献指南

调研方向

从 src/Controlz.jl 第 5–9 行的示例开始,并在 my_plot() 调用 plot 时复现 PyPlot.matplotlib.style.use 的行为。了解 PyPlot 如何跨 Julia 模块处理 matplotlib 样式,然后验证该模块的 .mplstyle 是否应用于由 my_plot() 创建的绘图。

由索引模型根据 Issue 内容生成。

评估

技术栈
julia, matplotlib, python
领域
data-visualization
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。