s3dlib.surface.ParametricLine¶
- class s3dlib.surface.ParametricLine(rez, operation=None, name=None, **kwargs)[source]¶
Bases:
ColorLine3DCollection
Create single line from a parametric function with domain [0,1]
- Parameters:
rez (integer, optional, default: 0) – Number of recursive bisection of line segments. Rez values range from 0 to 7. If rez is less than zero, negative value will be the number of segments.
operation (function object) – Function that takes one argument, a Numpy float array. The function domain is [0.0, 1,0] and returns a 3 X N array of xyz coordinates.
name (str, optional, default: function object name) – if not a lambda function, otherwise string ‘’.
**kwargs – All other parameters are passed on to ‘s3dlib.surface.ColorLine3DCollection’.
- map_xySlice_from_datagrid(datagrid, scale=None, **kargs)[source]¶
Using a datagrid, lines of z=f(x) or z=f(y) in domain [-1, 1]
- Parameters:
datagrid (2D float array) –
scale (multiplier for the Z direction.) –
xplane (contour at a constant value of x=xplane) –
yplane (contour at a constant value of y=xplane) –
xset (number of evenly spaced contours, y-axis normal plane) –
yset (number of evenly spaced contours, x-axis normal plane) –
- Returns:
self (ParametricLine object)
- map_xySlice_from_op(operation, **kargs)[source]¶
Using a functional operation, lines of z=f(x) or z=f(y) in domain -1 to 1.
- Parameters:
operation (function object) – Function that takes one argument, a Numpy float 3 X N array of xyz coordinates in the domain. The return value is a 3 X N array of xyz coordinates.
xplane (contour at a constant value of x=xplane) –
yplane (contour at a constant value of y=xplane) –
xset (number of evenly spaced contours, y-axis normal plane) –
yset (number of evenly spaced contours, x-axis normal plane) –
xlim (X domain of operation ( default: [-1,1] )) –
ylim (Y domain of operation ( default: [-1,1] )) –
- Returns:
self (ParametricLine object)
- scale_dataframe(X, Y, Z)[source]¶
Scaling the line geometry based on a datagrid.
- Parameters:
X (N x M arrays) – Minimum and maximum values of the arrays are used to scale and translate the surface from an intial domain of [ (-1,1), (-1,1), (0,1) ]
Y (N x M arrays) – Minimum and maximum values of the arrays are used to scale and translate the surface from an intial domain of [ (-1,1), (-1,1), (0,1) ]
Z (N x M arrays) – Minimum and maximum values of the arrays are used to scale and translate the surface from an intial domain of [ (-1,1), (-1,1), (0,1) ]
- Returns:
self (ParametricLine object)
- set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, array=<UNSET>, capstyle=<UNSET>, clim=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, cmap=<UNSET>, color=<UNSET>, colors=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, gid=<UNSET>, hatch=<UNSET>, in_layout=<UNSET>, joinstyle=<UNSET>, label=<UNSET>, line_alpha=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, norm=<UNSET>, offset_transform=<UNSET>, offsets=<UNSET>, path_effects=<UNSET>, paths=<UNSET>, picker=<UNSET>, pickradius=<UNSET>, rasterized=<UNSET>, segments=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, sort_zpos=<UNSET>, transform=<UNSET>, url=<UNSET>, urls=<UNSET>, verts=<UNSET>, visible=<UNSET>, zorder=<UNSET>)¶
Set multiple properties at once.
Supported properties are
- Properties:
agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array alpha: array-like or scalar or None animated: bool antialiased or aa or antialiaseds: bool or list of bools array: array-like or None capstyle: .CapStyle or {‘butt’, ‘projecting’, ‘round’} clim: (vmin: float, vmax: float) clip_box: .Bbox clip_on: bool clip_path: Patch or (Path, Transform) or None cmap: .Colormap or str or None color: color or list of colors colors: color or list of colors edgecolor or ec or edgecolors: color or list of colors or ‘face’ facecolor or facecolors or fc: color or list of colors figure: .Figure gid: str hatch: {‘/’, ‘\’, ‘|’, ‘-’, ‘+’, ‘x’, ‘o’, ‘O’, ‘.’, ‘*’} in_layout: bool joinstyle: .JoinStyle or {‘miter’, ‘round’, ‘bevel’} label: object line_alpha: scalar linestyle or dashes or linestyles or ls: str or tuple or list thereof linewidth or linewidths or lw: float or list of floats norm: .Normalize or None offset_transform: .Transform offsets: (N, 2) or (2,) array-like path_effects: .AbstractPathEffect paths: unknown picker: None or bool or float or callable pickradius: float rasterized: bool segments: unknown sketch_params: (scale: float, length: float, randomness: float) snap: bool or None sort_zpos: unknown transform: .Transform url: str urls: list of str or None verts: unknown visible: bool zorder: float