Graphics

under construction …

Plotting capabilities

hypertiling.graphics.svg.array_to_rgb(x, cmap)

Takes an array like in the range of [0,1] and return a 2d array containing the rgb values in the range [0, 255] in respect to cmap

Arguments:

x1d array like

contains data in the range [0,1] to be mapped to rgb values

cmapmatplotlib.colors.LinearSegmentedColormap

the colormap that is used to calculate the rgb values

hypertiling.graphics.svg.draw_svg(content: str)

Use IPython display API for displaying SVG

hypertiling.graphics.svg.make_svg(tiling, facecolors='white', edgecolor='black', lw=0.3, cmap='RdYlGn', digits=5, unitcircle=False, link='')

Creates an scalable vector graphic (SVG) plot of the tiling

Arguments:

tilingHyperbolicTiling object

An object containing the tiling.

facecolorstr or array-like of length len(tiling)

The background color of each polygon as a sequence of numbers

edgecolorstring

The color the polygon edges

lwfloat

The linewidth the polygon edges

cmapstr

matplotlib colormap key string

digitsint

number of digits SVG coordinates are rounded to

unitcircle: bool

whether or not the unit circle is added to the plot

hypertiling.graphics.svg.norm_0_1(x, cmin=None, cmax=None)

Normalize an array like x linearly between 0 and 1

Arguments:

x1d array like

contains data to be normalized between 0 and 1

cminfloat, default = None

the value that is mapped to 0 if None, the minimal value of x is taken

cmaxfloat, default = None

the value that is mapped to 1 if None, the maximal value of x is taken

class hypertiling.graphics.svg.svgString

Helper class, makes working with strings more convenient

hypertiling.graphics.svg.to_px(z, factor=100, offset=1)

Transforms complex number to px coordinates

Arguments:

znp.complex

coordinate in the complex plane

factorint

some large scaling factor to conform to px scale

offsetint

offset plot region

hypertiling.graphics.svg.write_svg(fname: str, content: svgString)

Write svgString to file


SVG module

hypertiling.graphics.svg.array_to_rgb(x, cmap)

Takes an array like in the range of [0,1] and return a 2d array containing the rgb values in the range [0, 255] in respect to cmap

Arguments:

x1d array like

contains data in the range [0,1] to be mapped to rgb values

cmapmatplotlib.colors.LinearSegmentedColormap

the colormap that is used to calculate the rgb values

hypertiling.graphics.svg.draw_svg(content: str)

Use IPython display API for displaying SVG

hypertiling.graphics.svg.make_svg(tiling, facecolors='white', edgecolor='black', lw=0.3, cmap='RdYlGn', digits=5, unitcircle=False, link='')

Creates an scalable vector graphic (SVG) plot of the tiling

Arguments:

tilingHyperbolicTiling object

An object containing the tiling.

facecolorstr or array-like of length len(tiling)

The background color of each polygon as a sequence of numbers

edgecolorstring

The color the polygon edges

lwfloat

The linewidth the polygon edges

cmapstr

matplotlib colormap key string

digitsint

number of digits SVG coordinates are rounded to

unitcircle: bool

whether or not the unit circle is added to the plot

hypertiling.graphics.svg.norm_0_1(x, cmin=None, cmax=None)

Normalize an array like x linearly between 0 and 1

Arguments:

x1d array like

contains data to be normalized between 0 and 1

cminfloat, default = None

the value that is mapped to 0 if None, the minimal value of x is taken

cmaxfloat, default = None

the value that is mapped to 1 if None, the maximal value of x is taken

class hypertiling.graphics.svg.svgString

Helper class, makes working with strings more convenient

hypertiling.graphics.svg.to_px(z, factor=100, offset=1)

Transforms complex number to px coordinates

Arguments:

znp.complex

coordinate in the complex plane

factorint

some large scaling factor to conform to px scale

offsetint

offset plot region

hypertiling.graphics.svg.write_svg(fname: str, content: svgString)

Write svgString to file


Animations

hypertiling.graphics.svg.array_to_rgb(x, cmap)

Takes an array like in the range of [0,1] and return a 2d array containing the rgb values in the range [0, 255] in respect to cmap

Arguments:

x1d array like

contains data in the range [0,1] to be mapped to rgb values

cmapmatplotlib.colors.LinearSegmentedColormap

the colormap that is used to calculate the rgb values

hypertiling.graphics.svg.draw_svg(content: str)

Use IPython display API for displaying SVG

hypertiling.graphics.svg.make_svg(tiling, facecolors='white', edgecolor='black', lw=0.3, cmap='RdYlGn', digits=5, unitcircle=False, link='')

Creates an scalable vector graphic (SVG) plot of the tiling

Arguments:

tilingHyperbolicTiling object

An object containing the tiling.

facecolorstr or array-like of length len(tiling)

The background color of each polygon as a sequence of numbers

edgecolorstring

The color the polygon edges

lwfloat

The linewidth the polygon edges

cmapstr

matplotlib colormap key string

digitsint

number of digits SVG coordinates are rounded to

unitcircle: bool

whether or not the unit circle is added to the plot

hypertiling.graphics.svg.norm_0_1(x, cmin=None, cmax=None)

Normalize an array like x linearly between 0 and 1

Arguments:

x1d array like

contains data to be normalized between 0 and 1

cminfloat, default = None

the value that is mapped to 0 if None, the minimal value of x is taken

cmaxfloat, default = None

the value that is mapped to 1 if None, the maximal value of x is taken

class hypertiling.graphics.svg.svgString

Helper class, makes working with strings more convenient

hypertiling.graphics.svg.to_px(z, factor=100, offset=1)

Transforms complex number to px coordinates

Arguments:

znp.complex

coordinate in the complex plane

factorint

some large scaling factor to conform to px scale

offsetint

offset plot region

hypertiling.graphics.svg.write_svg(fname: str, content: svgString)

Write svgString to file