Plot Context
This module provides the PlotContext class, which manages the state and context for plotting operations in Soundscapy.
Data and state management for plotting layers.
This module provides the PlotContext class that manages data and state for ISOPlot visualizations, enabling a more flexible architecture for plot generation with support for layered visualizations and subplot management.
CLASS | DESCRIPTION |
---|---|
PlotContext |
Manages data and state for a plot or subplot. |
PlotContext
PlotContext(data=None, x='ISOPleasant', y='ISOEventful', hue=None, ax=None, title=None)
Manages data and state for a plot or subplot.
This class centralizes the management of data, coordinates, and other state needed for rendering plot layers, allowing for consistent data access patterns and simplified layer implementation.
ATTRIBUTE | DESCRIPTION |
---|---|
data |
The data associated with this context
TYPE:
|
x |
The column name for x-axis data
TYPE:
|
y |
The column name for y-axis data
TYPE:
|
hue |
The column name for color encoding, if any
TYPE:
|
ax |
The matplotlib Axes object this context is associated with
TYPE:
|
title |
The title for this context's plot
TYPE:
|
layers |
The visualization layers to be rendered on this context
TYPE:
|
Initialize a PlotContext.
PARAMETER | DESCRIPTION |
---|---|
data
|
Data to be visualized
TYPE:
|
x
|
Column name for x-axis data
TYPE:
|
y
|
Column name for y-axis data
TYPE:
|
hue
|
Column name for color encoding
TYPE:
|
ax
|
Matplotlib axis to render on
TYPE:
|
title
|
Title for this plot context
TYPE:
|
METHOD | DESCRIPTION |
---|---|
create_child |
Create a child context that inherits properties from this context. |
Source code in soundscapy/plotting/plot_context.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
|
create_child
create_child(data=None, title=None, ax=None)
Create a child context that inherits properties from this context.
PARAMETER | DESCRIPTION |
---|---|
data
|
Data for the child context. If None, inherits from parent.
TYPE:
|
title
|
Title for the child context
TYPE:
|
ax
|
Matplotlib axis for the child context
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
PlotContext
|
A new child context with inherited properties |
Source code in soundscapy/plotting/plot_context.py
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
|
show_submodules: true