API¶
Documentation of the charticle APIs.
Venn diagrams in charticle.venn
¶
Venn diagrams with labeled regions.
-
class
charticle.venn.
FontSizes
(title=20, sets=14, intersections=12)[source]¶ Utility class for font size tracking.
-
class
charticle.venn.
Venn2
(a_name=None, b_name=None, a=None, b=None, ab=None, title=None, sizes=NOTHING, fontsizes=NOTHING, palette=NOTHING)[source]¶ Object for a 2-circle Venn. Set attributes at init or by assignment.
Parameters: - a_name (str) –
- b_name (str) – Label text for outside the A & B circles.
- a (str) –
- b (str) – Label text for the 1-member crescents.
- ab (str) – Label text for the lenticular intersection of A & B.
- title (str) – Text for the title of the plot.
- palette (Venn2.Palette) – a color palette for the A & B sets.
- fontsizes (FontSizes) – the font sizes for various labels.
-
class
Palette
(a='red', b='green', alpha=0.4)[source]¶ Container of color palette for both sets.
Parameters: - a,b (legal html colornames or hex codes) – color names for the two sets.
- alpha (float in [0,1]) – color combination alpha for intersection.
TODO: add some default “constant” palettes.
-
class
charticle.venn.
Venn3
(a_name=None, b_name=None, c_name=None, a=None, b=None, c=None, ab=None, bc=None, ac=None, abc=None, title=None, sizes=NOTHING, fontsizes=NOTHING, palette=NOTHING)[source]¶ Object for a 3-label venn. Set attributes at init or by assignment.
Parameters: - a_name (str) –
- b_name (str) –
- c_name (str) – Label text for the outer circles.
- a (str) –
- b (str) –
- c (str) – Label text for the 1-member patches.
- ab (str) –
- ac (str) –
- bc (str) – Label text for the 2-set-intersection patches.
- abc (str) – Label text for the full 3-set intersection.
- title (str) – Text for the title of the plot.
- palette (Venn3.Palette) – a color palette for the sets.
- sizes (Venn3.Sizes) – the region sizes (relative to 1.0).
- fontsizes (FontSizes) – the font sizes for various labels.
-
class
Palette
(a='red', b='green', c='blue', alpha=0.4)[source]¶ Container of color palette for all 3 items.
Parameters: - a,b,c (legal html colornames or hex codes) – color names for the three sets.
- alpha (float in [0,1]) – color combination alpha for intersections.
TODO: add some default “constant” palettes.
Hierarchy pyramids in charticle.hierarchy
¶
-
class
charticle.hierarchy.
Hierarchy
(scale=1.0, polygon=NOTHING, layers=NOTHING, layer_polygon_defaults=NOTHING, layer_text_defaults=NOTHING, color_cycle=cycler('color', ['red', 'orange', 'yellow', 'green', 'blue', 'purple']))[source]¶ Draws a ‘Maslow-style’ hierarchy.
-
class
Layer
(label, lower, upper, polygon=NOTHING, text=NOTHING)[source]¶ Container for layer information.
-
class