Skip to content

Commit 0acc914

Browse files
committed
temp commit: custom _precompile_ function.
doesn't work, as PyCall objects not inited at precompilation time. You get `ArgumentError: ref of NULL PyObject`. Solution is SnoopPreCompile, prolly (not now)
1 parent 485c002 commit 0acc914

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/Sciplotlib.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ include("util.jl")
3232
include("style.jl")
3333
export sciplotlib_style, set_mpl_style!
3434

35+
include("precompile.jl")
36+
_precompile_()
37+
3538
include("init.jl")
3639
export rcParams, rcParams_original
3740

src/precompile.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
function _precompile_()
3+
@info "Running Sciplotlib._precompile_"
4+
plot(1:10, hylabel = "Piep")
5+
# This gets displayed when precompiling in IJulia. But that's fine.
6+
end

0 commit comments

Comments
 (0)