Skip to content

Commit d770d15

Browse files
committed
removed default argument override in plot dispatches
1 parent 117526d commit d770d15

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

src/dispatch.jl

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -515,10 +515,9 @@ If instead of the grid, coordinate vectors are given, a temporary grid is create
515515
Keyword arguments: see [`available_kwargs`](@ref)
516516
"""
517517
function scalarplot!(ctx::SubVisualizer, grid::ExtendableGrid, func; kwargs...)
518-
_update_context!(ctx, Dict(:clear => true, :show => false, :reveal => false))
519518
_update_context!(ctx, kwargs)
520519

521-
# call a specialized function if the user want to plot only a dim-1 slice of the data
520+
# call a specialized function if the user wants to plot only a dim-1 slice of the data
522521
if haskey(ctx, :slice) && ctx[:slice] !== nothing
523522
return slice_plot!(ctx, Val{dim_space(grid)}, grid, func)
524523
else
@@ -531,7 +530,7 @@ $(TYPEDSIGNATURES)
531530
532531
Plot node vectors on subgrids of parent grid as P1 FEM function on the triangulation into subplot in the visualizer.
533532
If `[i,j]` is omitted, `[1,1]` is assumed.
534-
eyword arguments: see [`available_kwargs`](@ref)
533+
Keyword arguments: see [`available_kwargs`](@ref)
535534
"""
536535
function scalarplot!(
537536
ctx::SubVisualizer,
@@ -540,7 +539,6 @@ function scalarplot!(
540539
funcs::AbstractVector;
541540
kwargs...,
542541
) where {Tv, Ti}
543-
_update_context!(ctx, Dict(:clear => true, :show => false, :reveal => false))
544542
_update_context!(ctx, kwargs)
545543
if length(grids) != length(funcs)
546544
error("number of subgrids: $(length(grids)) and number of functions: $(length(funcs)) not equal")
@@ -708,7 +706,6 @@ $(TYPEDSIGNATURES)
708706
Plot piecewise linear vector field as quiver plot.
709707
"""
710708
function vectorplot!(ctx::SubVisualizer, grid::ExtendableGrid, func; kwargs...)
711-
_update_context!(ctx, Dict(:clear => true, :show => false, :reveal => false))
712709
_update_context!(ctx, kwargs)
713710
if ctx[:spacing] != nothing
714711
@warn "`spacing` has been removed from keyword arguments, use `rasterpoints` to control spacing"
@@ -801,7 +798,6 @@ Plot piecewise linear vector field as stream plot.
801798
(2D pyplot only)
802799
"""
803800
function streamplot!(ctx::SubVisualizer, grid::ExtendableGrid, func; kwargs...)
804-
_update_context!(ctx, Dict(:clear => true, :show => false, :reveal => false))
805801
_update_context!(ctx, kwargs)
806802
if ctx[:spacing] != nothing
807803
@warn "`spacing` has been removed from keyword arguments, use `rasterpoints` to control spacing"
@@ -886,7 +882,6 @@ end
886882
###################################################################################
887883
"$(TYPEDSIGNATURES)"
888884
function customplot!(ctx::SubVisualizer, func; kwargs...)
889-
_update_context!(ctx, Dict(:clear => true, :show => false, :reveal => false))
890885
_update_context!(ctx, kwargs)
891886
if ctx[:spacing] != nothing
892887
@warn "`spacing` has been removed from keyword arguments, use `rasterpoints` to control spacing"

src/slice_plots.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ function slice_plot!(ctx, ::Type{Val{3}}, grid, values)
255255
end
256256

257257
# kwargs are merged into ctx
258-
return scalarplot!(ctx, grid_2d, new_values; show = ctx[:show])
258+
return scalarplot!(ctx, grid_2d, new_values)
259259
end
260260

261261

@@ -332,5 +332,5 @@ function slice_plot!(ctx, ::Type{Val{2}}, grid, values)
332332
new_values = new_values[p]
333333

334334
# kwargs are merged into ctx
335-
return scalarplot!(ctx, grid_1d, new_values; show = ctx[:show])
335+
return scalarplot!(ctx, grid_1d, new_values)
336336
end

0 commit comments

Comments
 (0)