plot.contour.contourf_plot

plot.contour.contourf_plot(
    data,
    x_col,
    y_col,
    z_col,
    facet_col=None,
    aspect=1,
    as_table=True,
    figsize=(4, 4),
    levels=10,
    cmap='viridis',
    show_contour_lines=True,
    contour_line_color='black',
    contour_line_width=0.5,
    colorbar_orientation='vertical',
    wspace=0.4,
    hspace=0.4,
    highlight_point=None,
    highlight_color='red',
    highlight_marker='x',
    highlight_size=100,
)

Creates contour plots (single or faceted) using matplotlib.

Parameters

Name Type Description Default
data pd.DataFrame Data for plotting. required
x_col str Column name for x-axis. required
y_col str Column name for y-axis. required
z_col str Column name for z-axis (values). required
facet_col str Column name for faceting. None
aspect float Aspect ratio. 1
as_table bool If True, arranges facets in a table. True
figsize tuple Figure size per plot key (if not faceted) or base. (4, 4)
levels int Number of contour levels. 10
cmap str Colormap. 'viridis'
show_contour_lines bool Whether to show contour lines. True
contour_line_color str Color of contour lines. 'black'
contour_line_width float Width of contour lines. 0.5
colorbar_orientation str ‘vertical’ or ‘horizontal’. 'vertical'
wspace float Width reserved for space between subplots. 0.4
hspace float Height reserved for space between subplots. 0.4
highlight_point dict - like Point to highlight. Must contain x_col, y_col keys. If faceted, must contain facet_col key. None
highlight_color str Color of the highlight point. 'red'
highlight_marker str Marker style for the highlight point. 'x'
highlight_size int Size of the highlight point. 100