engforge.attr_plotting.Plot

class Plot(name, default, validator, repr, cmp, hash, init, inherited, metadata=None, type=None, converter=None, kw_only=False, eq=None, eq_key=None, order=None, order_key=None, on_setattr=None, alias=None)[source]

Bases: PlotBase

Plot is a conveinence method

Methods

class_validate

validates onetime A method to validate the kwargs passed to the define method

collect_attr_inst

collects all the attribute instances for a system

collect_cls

collects all the attributes for a system

configure_for_system

add the config class, and perform checks with `class_validate) :returns: [optional] a dictionary of options to be used in the make_attribute method

configure_instance

validates the instance given attr's init routine

create_instance

Create an instance of the instance_class

define

Defines a plot that will be rendered in seaborn, with validation happening as much as possible in the define method

define_validate

A method to validate the kwargs passed to the define method

evolve

Copy self and apply changes.

from_counting_attr

handle_instance

no interacion with system, reporing only

make_attribute

makes an attrs.Attribute for the class

make_factory

plot_extra

plot_vars

gathers seaborn plot vars that will scope from system.dataframe

process_combos

subclasses

return all subclasses of components, including their subclasses :type out: :param out: out is to pass when the middle of a recursive operation, do not use it!

unpack_atrs

validate_plot_args

Checks system.system_references that cls.plot_vars exists

Attributes

name

default

validator

repr

eq

eq_key

order

order_key

hash

init

metadata

type

converter

kw_only

inherited

on_setattr

alias

attr_prefix

cls_vars

default_options

none_ok

std_fields

template_class

title

type_var_options

types

kind

x

y

hue

col

row

plot_func

plot_args

config_cls

active

combos

classmethod class_validate(instance, **kwargs)

validates onetime A method to validate the kwargs passed to the define method

classmethod collect_attr_inst(system, handle_inst=True)

collects all the attribute instances for a system

Return type:

dict

classmethod collect_cls(system)

collects all the attributes for a system

Return type:

dict

classmethod configure_for_system(name, config_class, cb=None, **kwargs)

add the config class, and perform checks with `class_validate) :returns: [optional] a dictionary of options to be used in the make_attribute method

classmethod configure_instance(instance, attribute, value)

validates the instance given attr’s init routine

classmethod create_instance(system)

Create an instance of the instance_class

Return type:

PlotInstance

Parameters:

system (System)

classmethod define(x, y, _type='relplot', kind='scatterplot', row=None, col=None, hue=None, **kwargs)[source]

Defines a plot that will be rendered in seaborn, with validation happening as much as possible in the define method

#Plot Choice :type _type: :param _type: the type of seaborn plot (relplot,displot,catplot) :type kind: :param kind: specify the kind of type of plot (ie. scatterplot of relplot)

# Dependents & Independents: :type x: :param x: the x var for each plot :type y: :param y: the y var for each plot

# Additional Parameters: :type row: :param row: create a grid of data with row var :type col: :param col: create a grid of data with column var :type hue: :param hue: provide an additional dimension of color based on this var :param title: this title will be applied to the figure.suptitle()

classmethod define_validate(**kwargs)

A method to validate the kwargs passed to the define method

evolve(**changes)

Copy self and apply changes.

This works similarly to attrs.evolve but that function does not work with Attribute.

It is mainly meant to be used for transform-fields.

Added in version 20.3.0.

classmethod handle_instance(canidate)

no interacion with system, reporing only

instance_class

alias of PlotInstance

classmethod make_attribute(name, comp_class, **kwargs)

makes an attrs.Attribute for the class

classmethod plot_vars()[source]

gathers seaborn plot vars that will scope from system.dataframe

Return type:

dict

classmethod subclasses(out=None)

return all subclasses of components, including their subclasses :type out: :param out: out is to pass when the middle of a recursive operation, do not use it!

classmethod validate_plot_args(system)

Checks system.system_references that cls.plot_vars exists

Parameters:

system (System)