Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## [1.16.0] - 2025-11-18
- Add PythonPlot to the backends

## [1.15.3] - 2025-06-24
- Fixed bug with GLMakie based animated plots from the REPL
- Added examples for animated plots from the REPL
Expand Down
5 changes: 4 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "GridVisualize"
uuid = "5eed8a63-0fb0-45eb-886d-8d5a387d12b8"
authors = ["Juergen Fuhrmann <[email protected]>", "Patrick Jaap <[email protected]>"]
version = "1.15.4"
version = "1.16.0"

[deps]
ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
Expand All @@ -26,6 +26,7 @@ MeshCat = "283c5d60-a78f-5afe-a0af-af636b173e11"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
PlutoVista = "646e1f28-b900-46d7-9d87-d554eb38a413"
PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee"
PythonPlot = "274fc56d-3b97-40fa-a1cd-1b4a50311bf9"
Triangulate = "f7e6ffb2-c36d-4f8f-a77e-16e897189344"
VTKView = "955f2c64-5fd0-11e9-0ad0-3332e913311a"

Expand All @@ -35,6 +36,7 @@ GridVisualizeMeshCatExt = "MeshCat"
GridVisualizePlotsExt = "Plots"
GridVisualizePlutoVistaExt = "PlutoVista"
GridVisualizePyPlotExt = "PyPlot"
GridVisualizePythonPlotExt = "PythonPlot"
GridVisualizeVTKViewExt = "VTKView"

[compat]
Expand All @@ -58,6 +60,7 @@ Plots = "1"
PlutoVista = "0.8.24,1"
Printf = "1.6"
PyPlot = "2"
PythonPlot = "1"
StaticArrays = "1"
Triangulate = "2, 3"
VTKView = "0.1,0.2"
Expand Down
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ GridVisualize
Plotting companion module for [ExtendableGrids.jl](https://github.com/WIAS-PDELib/ExtendableGrids.jl)
Provides plotting of grids, scalar piecewise linear functions and vectors (2D only) for various plotting backends
on simplicial grids in one, two or three space dimensions. The main supported backends
are CairoMakie, GLMakie, PyPlot, and PlutoVista. Plots is only partially supported (1D and 2D rectangular grids).
are CairoMakie, GLMakie, PythonPlot, PyPlot, and PlutoVista. Plots is only partially supported (1D and 2D rectangular grids).

## Disclaimer
The code is rather complex and many codepaths are hard to test. Please be prepared to help
Expand Down Expand Up @@ -43,7 +43,7 @@ Plot appearance can be tweaked by a number of
[keyword arguments](https://WIAS-PDELib.github.io/GridVisualize.jl/dev/api/#GridVisualize.available_kwargs).

### Plotters
Plotters can be e.g. Plots, PyPlot, GLMakie, CairoMakie PlutoVista - we pass the module exported
Plotters can be e.g. Plots, PythonPlot, PyPlot, GLMakie, CairoMakie PlutoVista - we pass the module exported
by the package. Different plotters can be used at the same time.

### Multiple plots in one plotting window
Expand All @@ -69,7 +69,7 @@ end
### Movies
Currently, these can be recorded with GLMakie, CairoMakie and Plots backends both from
the REPL and Pluto notebooks. MP4 files and gifs can be created.
PyPlot possibly will follow.
PyPlot/PythonPlot possibly will follow.

This shows the animated graphic in the REPL (essentially the same as above)
and creates an embedded video in a Pluto notebook:
Expand Down Expand Up @@ -131,26 +131,26 @@ and all plotting functions will do nothing.
- 'p': planned (no schedule though)
- 'n': probably not, also in the future

| | PyPlot | Makie | PlutoVista | Plots | VTKView |
|----------------|--------|-------|------------|-------|---------|
| scalarplot, 1D | y | y | y,i | y | y |
| vectorplot, 1D | y | y | y | y | y |
| gridplot, 1D | y | y | y | y | |
| scalarplot, 2D | y | y | y | (y) | y,i |
| vectorplot, 2D | y | y | y | y | |
| streamplot, 2D | y | y | p | n | |
| gridplot, 2D | y | y,i | y | (y) | y,i |
| scalarplot, 3D | y | y,i | y,i | n | y,i |
| gridplot, 3D | y | y,i | y,i | n | y,i |
| vectorplot, 3D | p | p | p | n | |
| streamplot, 3D | | p | p | n | |
| movie | n | y | n | y | |
| triangulateio | y | y | n | n | n |
| | PyPlot/PythonPlot | Makie | PlutoVista | Plots | VTKView |
|----------------|--------------------|-------|------------|-------|---------|
| scalarplot, 1D | y | y | y,i | y | y |
| vectorplot, 1D | y | y | y | y | y |
| gridplot, 1D | y | y | y | y | |
| scalarplot, 2D | y | y | y | (y) | y,i |
| vectorplot, 2D | y | y | y | y | |
| streamplot, 2D | y | y | p | n | |
| gridplot, 2D | y | y,i | y | (y) | y,i |
| scalarplot, 3D | y | y,i | y,i | n | y,i |
| gridplot, 3D | y | y,i | y,i | n | y,i |
| vectorplot, 3D | p | p | p | n | |
| streamplot, 3D | | p | p | n | |
| movie | n | y | n | y | |
| triangulateio | y | y | n | n | n |

## Sample output


### [PyPlot](https://github.com/JuliaPy/PyPlot.jl):
### [PyPlot](https://github.com/JuliaPy/PyPlot.jl), [PythonPlot](https://github.com/stevengj/PyPlot.jl):
![](https://github.com/WIAS-PDELib/GridVisualize.jl/blob/main/docs/src/assets/multiscene_pyplot.png?raw=true)


Expand All @@ -175,7 +175,7 @@ gridplot!(vis,grid,clear=true,show=true)
## Notebooks

### Pluto
Plotting in Pluto notebooks for CairoMakie, PyPlot, Plots, GLMakie is working, WGLMakie probably works in combination with JSServe.
Plotting in Pluto notebooks for CairoMakie, PyPlot, PythonPlot, Plots, GLMakie is working, WGLMakie probably works in combination with JSServe.

Plotting in Pluto notebooks can use [PlutoVista.jl](https://github.com/j-fu/PlutoVista.jl)
based on [plotly.js](https://plotly.com/javascript/) (1D) and [vtk.js](https://kitware.github.io/vtk-js/index.html) (2/3D).
Expand Down
1 change: 1 addition & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ PlutoSliderServer = "2fc8631c-6f24-4c5b-bca7-cbb509c42db4"
PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8"
PlutoVista = "646e1f28-b900-46d7-9d87-d554eb38a413"
PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee"
PythonPlot = "274fc56d-3b97-40fa-a1cd-1b4a50311bf9"
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Triangulate = "f7e6ffb2-c36d-4f8f-a77e-16e897189344"
Expand Down
25 changes: 17 additions & 8 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,21 @@ GridVisualizeMeshCatExt = Base.get_extension(GridVisualize, :GridVisualizeMeshCa
GridVisualizeVTKViewExt = Base.get_extension(GridVisualize, :GridVisualizeVTKViewExt)


function mkdocs()
function mkdocs(; with_examples = true)
cleanexamples()
example_dir = joinpath(@__DIR__, "..", "examples")
notebook_dir = joinpath(@__DIR__, "..", "examples")
generated_examples = @docscripts(
example_dir, [
"Plotting Examples" => "plotting.jl",
], Plotter = CairoMakie
)
notebook_examples = @docplutonotebooks(notebook_dir, ["plutovista.jl"], iframe = true, iframe_height = "2000px")
notebook_examples = []
generated_examples = []
if with_examples
generated_examples = @docscripts(
example_dir, [
"Plotting Examples" => "plotting.jl",
], Plotter = CairoMakie
)
notebook_examples = @docplutonotebooks(notebook_dir, ["plutovista.jl"], iframe = true, iframe_height = "2000px")
end

makedocs(;
sitename = "GridVisualize.jl",
modules = [
Expand Down Expand Up @@ -54,6 +59,10 @@ function mkdocs()

end

mkdocs()
if isinteractive()
mkdocs(; with_examples = false)
else
mkdocs(; with_examples = true)
end

deploydocs(; repo = "github.com/WIAS-PDELib/GridVisualize.jl.git", devbranch = "main")
1 change: 1 addition & 0 deletions docs/src/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ save
default_plotter
default_plotter!
plottertype
PythonPlotType
PyPlotType
MakieType
PlotsType
Expand Down
5 changes: 3 additions & 2 deletions docs/src/privapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Pages = ["dispatch.jl","common.jl","slice_plots.jl"]

```@docs
ispyplot
ispythonplot
isplutovista
isplots
ismakie
Expand Down Expand Up @@ -40,10 +41,10 @@ GridVisualizeMakieExt.FlippableLayout.flayoutscene
GridVisualizePlutoVistaExt
```

## PyPlot
## PyPlot/PythonPlot
```@docs
GridVisualizePyPlotExt
GridVisualizePyPlotExt.tridata
GridVisualize.tridata
```
## Plots
```@docs
Expand Down
Loading
Loading