slitflow.fun.palette module
- class NumberLoop(items)[source]
Bases:
LoopInteger of float loop generator for matplotlib figure.
- Parameters:
- Yields:
int or float – The next number in the range of numbers
- class ColorLoop(items)[source]
Bases:
LoopRGB color generator for matplotlib figure.
- Parameters:
Name for edge or face color list. If list of int, this always returns a list which is it divided by 255.
If list of list of int, this returns a list which is a element of it divided by 255 in order.
If list of str, this returns a list which is a element of a palette registered in this class divided by 255 in order.
TODO: Future plan (If list of (palette, list of int), where type(palette) belong to above three, this creates a new palette by patch-working palettes in the list, and returns a list according to the palette. e.g, [([0,0,0], [1,2]), ([[1,1,1], [2,2,2]], 4)] let create a new palette [[1,1,1], [0,0,0], [0,0,0], [2,2,2]].)
- Yields:
list of float – The next RGB values. RGB values should be [R(0-1), G(0-1), B(0-1)]
- palette = {'scatter_face': ((211, 13, 13), (1, 1, 203), (41, 161, 154), (145, 81, 201), (167, 140, 73)), 'small_pastel_edge': ((50, 170, 160), (220, 170, 0), (122, 12, 112)), 'small_pastel_face': ((115, 195, 185), (252, 216, 0), (199, 111, 171)), 'umap_face': ((200, 200, 200), (150, 0, 150), (0, 150, 0)), 'umap_inv_face': ((200, 200, 200), (0, 150, 0), (150, 0, 150))}
- class LineStyleLoop(items)[source]
Bases:
LoopLine style string generator for matplotlib figure.
- style_dict = {'densely dashdotdotted': (0, (3, 1, 1, 1, 1, 1)), 'densely dashdotted': (0, (3, 1, 1, 1)), 'densely dashed': (0, (5, 1)), 'densely dotted': (0, (1, 1))}
- palette = {'default': ['solid', (0, (5, 1)), (0, (1, 1)), (0, (3, 1, 1, 1)), (0, (3, 1, 1, 1, 1, 1))], 'with_model3': ['solid', (0, (5, 1)), (0, (1, 1)), 'None', 'None', 'None']}