Plots
MMJMesh.Plots._collectlines
— Method_collectlines(points) -> (x1, x2 [, x3])
Collect point arrays
points = [[[p111, p112], [p121, p122], ...], [[p211, p212], [p221, p222], ...], ...]
into arrays
x1 = [p111, p121, ..., NaN, p211, p221, ..., NaN, ...]
x2 = [p112, p122, ..., NaN, p212, p222, ..., NaN, ...]
which can be passed to Makie
's lines
function.
MMJMesh.Plots._getnintervals
— Method_getnintervals(r, inintervals) -> (n1, n2)
Returns the number of intervals for each coordinate direction such that the Rectangle
parameter r
is divided into approximate squares. The longer side of r
is divided into nintervals
intervals.
MMJMesh.Plots._mergemeshes
— Method_mergemeshes(meshes) -> mesh
Merges the meshes
[(coords, triangles), (coords, triangles), ...]
into a single mesh
(coords, triangles)
MMJMesh.Plots.sample1d
— Methodsample1d(f, a, b; rp=false, maxrecursion=15, maxangle=2.5, npoints=5, yscale=1, ir=false) -> [params, ] points
Simple adaptive sampling of mapping f
on the interval from a
to b
. The interval is initially sampled at npoints
and then refined recursively until either the angles are smaller than maxangle
(in degrees) or the recursion depth reaches maxrecursion
. The function returns the sampled points in a matrix. If rp=true
, the function returns parameters and corresponding points.
Parameters for real valued functions only: Angles are evaluated using the scaling factor yscale
. Use ir=true
to insert roots.
@see adapted_grid.jl in PlotUtils.jl @see T. Bayer: Efficient plotting the functions with discontinuities