class discretisedfield.plotting.K3dRegion(region)#



k3d plot.


Default dir() implementation.


Return self==value.


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 using color argument.

For details about multiplier, please refer to discretisedfield.Region.mpl.

This method is based on k3d.voxels, so any keyword arguments accepted by it can be passed (e.g. wireframe).

  • 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.


  1. 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()