Skip to content

Commit

Permalink
Add zoom parameter (first used for plutovista/vtk)
Browse files Browse the repository at this point in the history
  • Loading branch information
j-fu committed Nov 10, 2021
1 parent 3a914dc commit 8eab444
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 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]>"]
version = "0.4.1"
version = "0.4.2"

[deps]
ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
Expand Down
2 changes: 1 addition & 1 deletion examples/plutovista.jl
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ scalarplot!(p3d,g3,f3;levels=[flevel],xplanes=[xplane],yplanes=[yplane],zplanes=
X4=-1:0.1:1; g4=simplexgrid(X4,X4,X4)

# ╔═╡ 57ed5eea-bc1c-45eb-b4d3-dc63088db21a
scalarplot(g4,map( (x,y,z)-> 0.01*exp(-10*(x^2+y^2+z^2)),g4),levels=5)
scalarplot(g4,map( (x,y,z)-> 0.01*exp(-10*(x^2+y^2+z^2)),g4),levels=10)

# ╔═╡ 4b9113d2-10bd-4f7a-a2b8-22092656c6b3
md"""
Expand Down
1 change: 1 addition & 0 deletions src/dispatch.jl
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ default_plot_kwargs()=OrderedDict{Symbol,Pair{Any,String}}(
:xplanes => Pair([prevfloat(Inf)],"3D x plane positions or number thereof"),
:yplanes => Pair([prevfloat(Inf)],"3D y plane positions or number thereof"),
:zplanes => Pair([prevfloat(Inf)],"3D z plane positions or number thereof"),
:zoom => Pair(1.0,"Zoom level"),
:azim => Pair(-60,"3D azimuth angle (in degrees)"),
:elev => Pair(30,"3D elevation angle (in degrees)"),
:perspectiveness => Pair(0.25,"3D perspective A number between 0 and 1, where 0 is orthographic, and 1 full perspective"),
Expand Down
6 changes: 4 additions & 2 deletions src/plutovista.jl
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ function scalarplot!(ctx, TP::Type{PlutoVistaType}, ::Type{Val{2}}, grid,func)
levels=ctx[:levels],
colorbarticks=ctx[:colorbarticks],
limits=ctx[:limits],
backend=ctx[:backend]
backend=ctx[:backend],
zoom=ctx[:zoom]
)
reveal(ctx,TP)
end
Expand Down Expand Up @@ -268,7 +269,8 @@ function scalarplot!(ctx, TP::Type{PlutoVistaType}, ::Type{Val{3}}, grid,func)
facemarkers=grid[BFaceRegions],
facecolormap=bcmap,
outlinealpha=ctx[:outlinealpha],
levelalpha=ctx[:levelalpha]
levelalpha=ctx[:levelalpha],
zoom=ctx[:zoom]
)
reveal(ctx,TP)
end

2 comments on commit 8eab444

@j-fu
Copy link
Member Author

@j-fu j-fu commented on 8eab444 Nov 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/48573

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.4.2 -m "<description of version>" 8eab444f17260b256fad0588bf77b9d7ba481935
git push origin v0.4.2

Please sign in to comment.