Skip to content
Snippets Groups Projects

Draft: Multivariate plotting

Closed David Schäfer requested to merge multiplotting into develop
4 files
+ 155
170
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 4
15
@@ -18,7 +18,7 @@ from typing_extensions import Literal
from saqc.constants import FILTER_NONE, UNFLAGGED
from saqc.core.register import processing, register
from saqc.lib.plotting import makeFig
from saqc.lib.tools import periodicMask
from saqc.lib.tools import periodicMask, toSequence
if TYPE_CHECKING:
from saqc.core.core import SaQC
@@ -224,13 +224,12 @@ class ToolsMixin:
self._flags[mask, field] = UNFLAGGED
return self
@register(mask=[], demask=[], squeeze=[])
@register(mask=[], demask=[], squeeze=[], multivariate=True)
def plot(
self: "SaQC",
field: str,
path: Optional[str] = None,
max_gap: Optional[str] = None,
history: Optional[Literal["valid", "complete"] | list] = "valid",
xscope: Optional[slice] = None,
phaseplot: Optional[str] = None,
store_kwargs: Optional[dict] = None,
@@ -264,15 +263,6 @@ class ToolsMixin:
before plotting. If an offset string is passed, only points that have a distance
below `max_gap` get connected via the plotting line.
history : {"valid", "complete", None, list of strings}, default "valid"
Discriminate the plotted flags with respect to the tests they originate from.
* "valid" - Only plot those flags, that do not get altered or "unflagged" by subsequent tests. Only list tests
in the legend, that actually contributed flags to the overall resault.
* "complete" - plot all the flags set and list all the tests ran on a variable. Suitable for debugging/tracking.
* None - just plot the resulting flags for one variable, without any historical meta information.
* list of strings - plot only flags set by those tests listed.
xscope : slice or Offset, default None
Parameter, that determines a chunk of the data to be plotted
processed. `xscope` can be anything, that is a valid argument to the ``pandas.Series.__getitem__`` method.
@@ -317,13 +307,12 @@ class ToolsMixin:
fig = makeFig(
data=data,
field=field,
fields=toSequence(field),
flags=flags,
level=level,
max_gap=max_gap,
history=history,
xscope=xscope,
phaseplot=phaseplot,
phaseplots=phaseplot,
ax_kwargs=ax_kwargs,
)
Loading