visualife.core Package¶
Functions¶
clamp (val[, minimum, maximum]) |
Clamps color value to the given range, by default to [0, 255] |
color_name_to_hex (name) |
Convert COLOR NAME to HEX format |
hex_to_rgb (hex_str) |
Convert HEX string to RGB format |
hsv_to_hex (hsv) |
Convert HSV tuple to HEX format |
hsv_to_rgb (hsv) |
Convert HSV tuple to RGB tuple |
is_hex (color) |
Checks if the color is in HEX format |
make_brighter (color[, factor]) |
Creates color brighter with factor |
make_darker (color[, factor]) |
Creates color darker with factor |
mix_colors (color1, color2, fraction) |
Creates a color that is a mixture of two colors. |
rgb_norm_to_hex (rgb) |
Convert normalised RGB tuple to HEX format |
rgb_to_hex (rgb) |
Convert RGB tuple to HEX format |
shade (color, factor) |
Creates color changed with factor |
Classes¶
Axis (min_screen, max_screen, min_data, max_data) |
Represents an arbitrary axis of a plot. |
AxisX (screen_y, min_screen, max_screen, …) |
Represents X axis of a plot. |
AxisY (screen_x, min_screen, max_screen, …) |
Represents Y axis of a plot. |
BarDataSet (converter, *args, **kwargs) |
Creates a BarDataSet object with X, Y and Z data (if given) |
BubblesDataSet (converter, *args, **kwargs) |
Creates a BarDataSet object with X, Y and Z data (if given) |
CachedColorMap (cmap, v_from, v_to, v_step) |
A class that uses pre-computed color indexes |
CanvasViewport (canvas, width, height) |
Creates a Canvas drawing |
DataConverter (plot, x_code, y_code) |
Converts plot data values to screen coordinates values |
DataSet (converter, *args, **kwargs) |
Stores data for serie and its min and max values |
DraggablePlot (viewport, min_screen_x, …[, …]) |
Represents a draggable plot object |
HtmlViewport (div_element, svg_width, svg_height) |
Draws graphics on a WWW page, in a given <svg> element of a HTML page. |
LineDataSet (converter, *args, **kwargs) |
Stores data for lineplot |
Plot (viewport, min_screen_x, max_screen_x, …) |
Creates a plot object with axes |
PlotLegend () |
Stores series data to draw a plot legend |
ScatterDataSet (converter, *args, **kwargs) |
Stores data for scatterplot |
SvgViewport (file_name, svg_width, svg_height) |
Defines a viewport that saves a drawing into an SVG file |
visualife.core.styles Module¶
Functions¶
clamp (val[, minimum, maximum]) |
Clamps color value to the given range, by default to [0, 255] |
color_name_to_hex (name) |
Convert COLOR NAME to HEX format |
colormap_by_name (scale_name, min_val, max_val) |
Sets the real values for colors for given color map Returns ColorMap object |
create_style (**kwargs) |
Creates a string encoding a style of a SVG element |
get_font_size (x) |
Return a size from a real value argument |
hex_to_rgb (hex_str) |
Convert HEX string to RGB format |
hsv_to_hex (hsv) |
Convert HSV tuple to HEX format |
hsv_to_rgb (hsv) |
Convert HSV tuple to RGB tuple |
is_hex (color) |
Checks if the color is in HEX format |
make_brighter (color[, factor]) |
Creates color brighter with factor |
make_darker (color[, factor]) |
Creates color darker with factor |
mix_colors (color1, color2, fraction) |
Creates a color that is a mixture of two colors. |
rgb_norm_to_hex (rgb) |
Convert normalised RGB tuple to HEX format |
rgb_to_hex (rgb) |
Convert RGB tuple to HEX format |
shade (color, factor) |
Creates color changed with factor |
Classes¶
CachedColorMap (cmap, v_from, v_to, v_step) |
A class that uses pre-computed color indexes |
ColorMap (stops, **kwargs) |
A class that converts a real value into a color |
visualife.core.shapes Module¶
Functions¶
arc (drawing, id_str, x0, y0, r, deg_from, …) |
Draws a circular arc sector |
arrow (drawing, id_str, width, height, tip_width) |
Draws an arrow |
circle_segment (drawing, id_str, x0, y0, …) |
Draws a circular sector |
dots (viewport, id_str, x, y, w, h, r, c, …) |
Draws a dotted pattern. |
grid (viewport, id_str, x, y, w, h, **kwargs) |
Draws a line grid. |
visualife.core.three_d Package¶
Classes¶
DendrogramNode (id, value, distance, *nodes) |
Dendrogram node adds a distance value and a group_id properties to a TreeNode class |
Face (id, verts, **kwargs) |
Represents a face for Svg3DPanel |
Line (id, vb, ve, **kwargs) |
Represents a line for Svg3DPanel |
MoleculePanel (svg_canvas[, width, height]) |
Represents a panel to display chemical molecules |
Sphere (id, vertex, r, **kwargs) |
Represents a sphere for Svg3DPanel |
SpheresGroup (id, vertices, radii, **kwargs) |
Represents a group of spheres for Svg3DPanel |
Svg3DPanel (svg_canvas, width, height) |
Represents a panel for displaying 3D objects |