K3dRegion#
- class discretisedfield.plotting.K3dRegion(region)#
Methods
k3d
plot.__dir__
Default dir() implementation.
__eq__
Return self==value.
__repr__
Return repr(self).
- __call__(*, plot=None, color=5010096, multiplier=None, **kwargs)#
k3d
plot.If
plot
is not passed,k3d.Plot
object is created automatically. The colour of the region can be specified usingcolor
argument.For details about
multiplier
, please refer todiscretisedfield.Region.mpl
.This method is based on
k3d.voxels
, so any keyword arguments accepted by it can be passed (e.g.wireframe
).- Parameters:
plot (k3d.Plot, optional) – Plot to which the plot is added. Defaults to
None
- plot is created internally.color (int, optional) – Colour of the region. Defaults to the default color palette.
multiplier (numbers.Real, optional) – Axes multiplier. Defaults to
None
.
Examples
Visualising the region using
k3d
.
>>> import discretisedfield as df ... >>> p1 = (-50e-9, -50e-9, 0) >>> p2 = (50e-9, 50e-9, 10e-9) >>> region = df.Region(p1=p1, p2=p2) >>> region.k3d() Plot(...)