Skip to content

Commit

Permalink
Subgridplots (#16)
Browse files Browse the repository at this point in the history
Handle plots of discontinuous functions in Makie,Pyplot, PlutoVista
  • Loading branch information
j-fu authored Feb 5, 2023
1 parent 0f74f08 commit 01c2a15
Show file tree
Hide file tree
Showing 13 changed files with 1,792 additions and 814 deletions.
4 changes: 2 additions & 2 deletions 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]>"]
version = "0.6.4"
version = "1.0.0"

[deps]
ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
Expand All @@ -26,7 +26,7 @@ DocStringExtensions = "0.8,0.9"
ElasticArrays = "1"
ExtendableGrids = "0.9"
GeometryBasics = "0.4.1"
GridVisualizeTools = "0.2.1"
GridVisualizeTools = "0.3"
HypertextLiteral = "0.9"
Observables = "0.5"
OrderedCollections = "1"
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ and all plotting functions will do nothing.
- 'y': available
- 'i': some level of interactive control
- '(y)': availability only on rectangular grids
- 'p': planned
- 'p': planned (no schedule though)
- 'n': probably not, also in the future

| | PyPlot | Makie | PlutoVista | Plots | VTKView |
Expand All @@ -135,8 +135,7 @@ and all plotting functions will do nothing.
| gridplot, 3D | y | y,i | y,i | n | y,i |
| vectorplot, 3D | p | p | p | n | |
| streamplot, 3D | | p | p | n | |
| movie | p | y | n | y | |

| movie | n | y | n | y | |


## Sample output
Expand Down
49 changes: 33 additions & 16 deletions docs/makeplots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,43 @@ function makeplots(picdir; Plotter=GLMakie, extension="png")
println("multiscene")



p=plotting_func1d(Plotter=Plotter)
fname=joinpath(picdir,"plotting_func1d."*extension)
save(fname,p,Plotter=Plotter)
@test isfile(fname)
println("func1d")

p=plotting_func2d(Plotter=Plotter)
fname=joinpath(picdir,"plotting_func2d."*extension)
save(fname,p,Plotter=Plotter)
@test isfile(fname)
println("func2d")

p=plotting_func3d(Plotter=Plotter)
fname=joinpath(picdir,"plotting_func3d."*extension)
save(fname,p,Plotter=Plotter)
@test isfile(fname)
println("func3d")


p=plotting_func2d(Plotter=Plotter)
fname=joinpath(picdir,"plotting_func2d."*extension)
fname=joinpath(picdir,"plotting_jfunc1d."*"gif")
p=plotting_jfunc1d(Plotter=Plotter,filename=fname)
@test isfile(fname)
println("jfunc1d")

p=plotting_jfunc2d(Plotter=Plotter)
fname=joinpath(picdir,"plotting_jfunc2d."*extension)
save(fname,p,Plotter=Plotter)
@test isfile(fname)
println("func2d")
println("jfunc2d")

p=plotting_func1d(Plotter=Plotter)
fname=joinpath(picdir,"plotting_func1d."*extension)
p=plotting_jfunc3d(Plotter=Plotter)
fname=joinpath(picdir,"plotting_jfunc3d."*extension)
save(fname,p,Plotter=Plotter)
@test isfile(fname)
println("func1d")
println("jfunc3d")


p=plotting_vec2d(Plotter=Plotter)
fname=joinpath(picdir,"plotting_vec2d."*extension)
Expand All @@ -39,29 +58,27 @@ function makeplots(picdir; Plotter=GLMakie, extension="png")
@test isfile(fname) || GridVisualize.plottername!="PyPlot"
println("stream2d")

p=plotting_grid3d(Plotter=Plotter)
fname=joinpath(picdir,"plotting_grid3d."*extension)
p=plotting_grid1d(Plotter=Plotter)
fname=joinpath(picdir,"plotting_grid1d."*extension)
save(fname,p,Plotter=Plotter)
@test isfile(fname)
println("grid3d")
println("grid1d")

p=plotting_grid2d(Plotter=Plotter)
fname=joinpath(picdir,"plotting_grid2d."*extension)
save(fname,p,Plotter=Plotter)
@test isfile(fname)
println("grid2d")


p=plotting_grid1d(Plotter=Plotter)
fname=joinpath(picdir,"plotting_grid1d."*extension)
p=plotting_grid3d(Plotter=Plotter)
fname=joinpath(picdir,"plotting_grid3d."*extension)
save(fname,p,Plotter=Plotter)
@test isfile(fname)
println("grid1d")

println("grid3d")

fname=joinpath(picdir,"plotting_video."*"gif")
fname=joinpath(picdir,"plotting_movie."*"gif")
p=plotting_movie(;filename=fname,Plotter=Plotter)
@test isfile(fname)
println("plotting_video")
println("plotting_movie")
true
end
Loading

0 comments on commit 01c2a15

Please sign in to comment.