prtools.spider#
- spider(shape, width, angle=0, shift=(0, 0), antialias=True, indexing='ij')[source]#
Draw a spider
- Parameters:
shape (array_like) – Size of output in pixels (nrows, ncols)
width (float) – Width of rectangle in pixels
angle (float, optional) – Mesh rotation in degrees. When
indexing = 'xy'the rotation is measured from the +x axis toward the +y axis. Whenindexing = 'ij'the rotation is measured from the +i axis toward the +j axis. Note that rotations occur about the shifted center ifshiftis nonzero. Default is 0.shift (tuple of floats, optional) – How far to shift center. Default is (0, 0).
antialias (bool, optional) – If True (default), the spider edges are antialiased.
indexing ({'ij', 'xy'}, optional) – Matrix (‘ij’, default) or cartesian (‘xy’) indexing of
shift.
- Return type:
ndarray
Examples
>>> spider = prtools.spider(shape=(256,256), width=3, angle=30) >>> plt.imshow(spider, cmap='gray')