xhorizon.diagram_tools.block_fill module
This module contains subroutines for filling parts of the diagram with a background color.
- xhorizon.diagram_tools.block_fill.fill_between_curves_uv(blk, crvlist, tr=False, reverse=True, sty={}, eps=1e-24)
Fill in a patch using a list of curves to provide the boundary of polygon. The curves are read from their uv coords. Every other input curve is reversed by default.
block = block in which to fill curves crvlist = list of two curves with uv coords tr = set to true if tr coords are primary reverse = reverse point order of every other curve
Curves are clipped to given rectangular size using snap_crvlist_to_bounds.
- xhorizon.diagram_tools.block_fill.fill_block(blk, sty={})
Fill in an entire block.
- xhorizon.diagram_tools.block_fill.fill_between_r(blk, rvals=array([0., 0.]), sty={}, inf=100.0, npoints=1000)
- xhorizon.diagram_tools.block_fill.reverse_curve(crv)
Reverse the order of points in a curve.
- xhorizon.diagram_tools.block_fill.snap_to_bounds(y, ymin=- inf, ymax=inf)
Limit an array y to the range ymin <= y <= ymax by replacing values outside the range with the cap values.
- xhorizon.diagram_tools.block_fill.snap_crvlist_to_bounds(crvlist, umin=- inf, umax=inf, vmin=- inf, vmax=inf, eps=1e-15)
Apply snap_to_bounds to uv coordinates of a curve. Displaces curve into a rectangle of specified size. Move inward by eps to avoid edge cases.
- xhorizon.diagram_tools.block_fill.test1()
Test matplotlib polygon patch functionality.
- xhorizon.diagram_tools.block_fill.test2()
Test of snap_to_bounds.