Skip to content

Commit 59e59a8

Browse files
committed
Switch the default matplotlib backend to widget
This has better backwards compatibility. Also renamed the extension to `IJuliaPythonCallExt` to be clearer when precompiling.
1 parent 08203b0 commit 59e59a8

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ ZMQ = "c2297ded-f4af-51ae-bb23-16f91089e4e1"
2323
PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d"
2424

2525
[extensions]
26-
PythonCallExt = "PythonCall"
26+
IJuliaPythonCallExt = "PythonCall"
2727

2828
[compat]
2929
Base64 = "1"

docs/src/_changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Changelog](https://keepachangelog.com).
1818
lets us remove one more dependency and remove all of the invalidations caused
1919
by JSON.jl. Load time is also slightly improved, from ~0.08s to ~0.05s on
2020
Julia 1.12.
21+
- Switched the default matplotlib backend for [`IJulia.init_matplotlib()`](@ref)
22+
to `widget`, which should be more backwards compatible ([#1205]).
2123

2224
## [v1.31.1] - 2025-10-20
2325

ext/PythonCallExt.jl renamed to ext/IJuliaPythonCallExt.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# interfaces it specifies we can get full support for ipywidgets and all other
66
# libraries that use ipywidgets (like matplotlib/ipympl).
77

8-
module PythonCallExt
8+
module IJuliaPythonCallExt
99

1010
import IJulia
1111
using PythonCall
@@ -225,7 +225,7 @@ function IJulia.init_ipywidgets()
225225
nothing
226226
end
227227

228-
function IJulia.init_matplotlib(backend::String="ipympl")
228+
function IJulia.init_matplotlib(backend::String="widget")
229229
IJulia.init_ipywidgets()
230230

231231
# Make sure it's in interactive mode and it's using the backend

src/IJulia.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ Julia's `display()` instead.
551551
function init_ipython end
552552

553553
"""
554-
init_matplotlib()
554+
init_matplotlib(backend="widget")
555555
556556
Initialize the integration with matplotlib.
557557
"""

test/kernel.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ end
446446
end
447447

448448
@testset "Utilities" begin
449-
ext = Base.get_extension(IJulia, :PythonCallExt)
449+
ext = Base.get_extension(IJulia, :IJuliaPythonCallExt)
450450

451451
x = Dict(1 => Dict{Int, Any}(2 => [1, 2]), "foo" => "bar")
452452
ext.arrays_to_pylist!(x)

0 commit comments

Comments
 (0)