Skip to content

Commit

Permalink
Add levels to tricont option in plotdata
Browse files Browse the repository at this point in the history
  • Loading branch information
henry2004y committed Apr 23, 2024
1 parent ae3fcb1 commit 58cb774
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/plot/pyplot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ function plotdata(bd::BATLData, func::AbstractString; dir="x", plotmode="contbar
elseif plotmode[ivar] == "trisurf"
c = ax.plot_trisurf(X, Y, W'; kwargs...)
elseif plotmode[ivar] == "tricont"
c = ax.tricontourf(X, Y, W'; kwargs...)
c = ax.tricontourf(X, Y, W'; levels, kwargs...)
fig.colorbar(c; ax)
elseif plotmode[ivar] == "tristream"
throw(ArgumentError("tristream not yet implemented!"))
Expand Down Expand Up @@ -502,13 +502,12 @@ function PyPlot.contourf(bd::BATLData, var::AbstractString, ax=nothing; levels::
end

"""
tricontourf(data, var, ax=nothing; plotrange=[-Inf,Inf,-Inf,Inf], plotinterval=0.1,
kwargs...)
tricontourf(data, var, ax=nothing; plotrange=[-Inf,Inf,-Inf,Inf], kwargs...)
Wrapper over `tricontourf` in matplotlib.
"""
function PyPlot.tricontourf(bd::BATLData, var::AbstractString, ax=nothing;
plotrange=[-Inf,Inf,-Inf,Inf], plotinterval=0.1, kwargs...)
plotrange=[-Inf,Inf,-Inf,Inf], kwargs...)

x, w = bd.x, bd.w
varIndex_ = findindex(bd, var)
Expand Down

0 comments on commit 58cb774

Please sign in to comment.