VizTheme Package Documentation

🎨 Theme & Palette Gallery

🛠️ Available Tweaks

Beyond global styles, viztheme provides these helper functions to elevate your plot aesthetics in the tweaks module.

1. Add Rounded Box

add_rounded_box(facecolor='#F8F9FA', edgecolor='#CCCCCC', ax=None)

Removes standard spines and adds a rounded background box.

2. Add Watermark

add_watermark(text='Confidential', alpha=0.1, ax=None, fontsize=40, color='gray', rotation=45)

Adds a diagonal watermark to the plot.

3. Despine

despine(ax=None, top=True, right=True, left=False, bottom=False)

Remove standard spines from plot.

4. Format Editorial

format_editorial(title, subtitle, ax=None)

Applies a left-aligned editorial title and subtitle.

5. Label Bars

label_bars(ax=None, fmt='%g', padding=3, color='black', fontsize=10)

Adds labels above/next to bar charts.

6. Move Legend Outside

move_legend_outside(ax=None, loc='center left', bbox_to_anchor=(1.05, 0.5))

Moves the legend outside the axes.

7. Remove Grid

remove_grid(ax=None)

Removes the grid of the plot.