Skip to content

Commit 3b9fc0e

Browse files
authored
Merge pull request #56 from JonasIsensee/master
update to current Makie version
2 parents 0e9bcf6 + a48450e commit 3b9fc0e

File tree

5 files changed

+19
-15
lines changed

5 files changed

+19
-15
lines changed

NEWS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
## [0.1.0] - 2021-08-23
1313

1414
### Added
15-
- Visualization of vertices, edges, and faces of Gridap `Triangulaiton` objects made of simplices.
15+
- Visualization of vertices, edges, and faces of Gridap `Triangulation` objects made of simplices.
1616
- Visualization of scalar-valued `CellField` and related objects on `Triangulaiton` objects made of simplices.
1717

Project.toml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "GridapMakie"
22
uuid = "41f30b06-6382-4b60-a5f7-79d86b35bf5d"
33
authors = ["Alberto F. Martín <alberto.martin@monash.edu>","Eric Neiva <eneiva@cimne.upc.edu>","Pau Riera <pau.riera.p@gmail.com>","Francesc Verdugo <fverdugo@cimne.upc.edu>", "Jan Weidner <jw3126@gmail.com>", "Other contributors"]
4-
version = "0.1.1"
4+
version = "0.1.2"
55

66
[deps]
77
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
@@ -13,13 +13,13 @@ Gridap = "56d4f2e9-7ea1-5844-9cf6-b9c51ca7ce8e"
1313
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
1414

1515
[compat]
16-
CairoMakie = "0.5, 0.6"
16+
CairoMakie = "0.5, 0.6, 0.8"
1717
FileIO = "1"
18-
FillArrays = "0.11, 0.12"
19-
GLMakie = "0.3, 0.4"
20-
GeometryBasics = "0.3"
18+
FillArrays = "0.11, 0.12, 0.13"
19+
GLMakie = "0.3, 0.4, 0.6"
20+
GeometryBasics = "0.3, 0.4"
2121
Gridap = "0.16, 0.17"
22-
Makie = "0.13, 0.15"
22+
Makie = "0.13, 0.15, 0.17"
2323
julia = "1.6"
2424

2525
[extras]

docs/Project.toml

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[deps]
2-
AbstractPlotting = "537997a7-5e4e-5d89-9595-2241ea00577e"
32
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
43
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
54
GridapMakie = "41f30b06-6382-4b60-a5f7-79d86b35bf5d"

src/conversions.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Two different plot functions depending on the need of having a continuous or discontinuous mesh.
1+
# Two different plot functions depending on the need of having a continuous or discontinuous mesh.
22
function to_plot_dg_mesh(grid::Grid)
33
UnstructuredGrid(grid) |> to_plot_dg_mesh
44
end
@@ -177,4 +177,4 @@ function to_grid(trian::Triangulation, uh::Any)
177177
end
178178

179179
to_scalar(x) = x
180-
to_scalar(x::VectorValue) = norm(x)
180+
to_scalar(x::VectorValue) = norm(x)

src/recipes.jl

+10-5
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ mesh_theme = Makie.Theme(
4141
function Makie.default_theme(scene,::Type{<:Makie.Mesh{<:Tuple{PlotGrid}}})
4242
merge!(
4343
mesh_theme,
44-
Makie.default_theme(scene, Makie.Mesh)
44+
Makie.default_theme(scene, Makie.Mesh)
4545
)
4646
end
4747

@@ -119,9 +119,9 @@ Makie.plottype(::Triangulation) = Makie.Mesh
119119
)
120120
end
121121

122-
# We explicitly set the colorrange property of p to (min, max) of the color provided. Here, when we use mesh(),
123-
# Makie fills the attribute plots of p (p.plots) with the given attributes. Hence, p.plots[1] inherits the colorrange
124-
# of p (this is just to draw colorbars). Another way would be using $ Colorbar(fig[1,2], plt.plots[1]), but quite less
122+
# We explicitly set the colorrange property of p to (min, max) of the color provided. Here, when we use mesh(),
123+
# Makie fills the attribute plots of p (p.plots) with the given attributes. Hence, p.plots[1] inherits the colorrange
124+
# of p (this is just to draw colorbars). Another way would be using $ Colorbar(fig[1,2], plt.plots[1]), but quite less
125125
# appealing from the point of view of the user.
126126
function Makie.plot!(p::MeshField{<:Tuple{Triangulation, Any}})
127127
trian, uh = p[1:2]
@@ -152,4 +152,9 @@ function Makie.plot!(p::MeshField{<:Tuple{CellField}})
152152
)
153153
end
154154

155-
Makie.plottype(::CellField) = MeshField
155+
Makie.plottype(::CellField) = MeshField
156+
157+
158+
function Makie.point_iterator(pg::PlotGrid)
159+
UnstructuredGrid(pg.grid) |> to_dg_points
160+
end

0 commit comments

Comments
 (0)