File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change
1
+ # On `PyNull()` and `copy!`:
2
+ # https://github.com/JuliaPy/PyCall.jl/issues/699#issuecomment-504616552
3
+
1
4
"""
2
5
Matplotlib's style settings [1]. Note that directly editing `mpl.rcParams` has no effect
3
6
[2]. Editing this object however does work.
4
7
5
8
- [1] https://matplotlib.org/stable/tutorials/introductory/customizing.html#the-default-matplotlibrc-file
6
9
- [2] https://github.com/JuliaPy/PyPlot.jl#modifying-matplotlibrcparams
7
10
"""
8
- rcParams = nothing
11
+ const rcParams = PyNull ()
9
12
10
13
"""
11
14
A copy of the initial `mpl.rcParams`. Note that we do not use `mpl.rcParamsDefault` or
12
15
`mpl.rcParamsOrig`, as these are different to what's actually used by default (e.g. in a
13
16
Jupyter notebook).
14
17
"""
15
- rcParams_original = nothing
18
+ const rcParams_original = PyNull ()
16
19
17
20
function __init__ ()
18
- global rcParams_original = copy ( mpl. rcParams)
19
- global rcParams = PyPlot. PyDict (mpl." rcParams" ) # String quotes prevent conversion from
20
- # Python to Julia dict.
21
+ copy! (rcParams_original, mpl. rcParams)
22
+ copy! ( rcParams, PyPlot. PyDict (mpl." rcParams" )) # String quotes prevent conversion from
23
+ # # Python to Julia dict.
21
24
set_mpl_style! (sciplotlib_style)
22
25
end
You can’t perform that action at this time.
0 commit comments