Skip to content

Commit 23d9dd4

Browse files
authored
Merge pull request #106 from WIAS-PDELib/fix/show-plots.jl
Plots.jl + PyPlot.jl: use `display` to show a plot
2 parents 46bc271 + 970f38c commit 23d9dd4

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## [1.16.1] - 2025-12-01
4+
- `Plots.jl` and `PyPlot.jl`: fixed missing plots in VSCode by using `display` in `reveal`
5+
36
## [1.16.0] - 2025-11-18
47
- Add PythonPlot to the backends
58

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "GridVisualize"
22
uuid = "5eed8a63-0fb0-45eb-886d-8d5a387d12b8"
33
authors = ["Juergen Fuhrmann <juergen.fuhrmann@wias-berlin.de>", "Patrick Jaap <patrick.jaap@wias-berlin.de>"]
4-
version = "1.16.0"
4+
version = "1.16.1"
55

66
[deps]
77
ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4"

ext/GridVisualizePlotsExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function reveal(p::GridVisualizer, ::Type{PlotsType})
4646
if haskey(p.context, :videostream)
4747
return Plots.frame(p.context[:videostream], plt)
4848
else
49-
Plots.gui(plt)
49+
display(plt)
5050
return plt
5151
end
5252
end

src/pycommon.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ function reveal(p::GridVisualizer, ::Type{T}) where {T <: AbstractPythonPlotterT
3636
p.Plotter.draw()
3737
sleep(1.0e-3)
3838
end
39-
return p.Plotter.gcf()
39+
current_figure = p.Plotter.gcf()
40+
display(current_figure)
41+
42+
return current_figure
4043
end
4144

4245
function reveal(ctx::SubVisualizer, TP::Type{T}) where {T <: AbstractPythonPlotterType}

0 commit comments

Comments
 (0)