engforge.attr_plotting.Trace
- class Trace(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:
PlotBasetrace is a plot for transients, with y and y2 axes which can have multiple vars each
Methods
validates onetime A method to validate the kwargs passed to the define method
collects all the attribute instances for a system
collects all the attributes for a 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
validates the instance given attr's init routine
Create an instance of the instance_class
Defines a plot that will be matplotlib, with validation happening as much as possible in the define method
A method to validate the kwargs passed to the define method
Copy self and apply changes.
from_counting_attrno interacion with system, reporing only
makes an attrs.Attribute for the class
make_factoryplot_extragathers seaborn plot vars that will scope from system.dataframe
process_combosreturn 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_atrsvalid_non_varsvalid_vars_optionsChecks system.system_references that cls.plot_vars exists
Attributes
namedefaultvalidatorrepreqeq_keyorderorder_keyhashinitmetadatatypeconverterkw_onlyinheritedon_setattraliasall_optionsalwaysattr_prefixcls_varsdefault_optionsnone_oktemplate_classtitletype_optionstype_var_optionstypesy2yxplot_argsextra_argsconfig_clskindactivecombos- 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:
- Parameters:
system (System)
- classmethod define(x='time', y=None, y2=None, kind='line', **kwargs)[source]
Defines a plot that will be matplotlib, with validation happening as much as possible in the define method
#Plot Choice :type kind: :param kind: specify the kind of type of plot scatter or line, with the default being line
# Dependents & Independents: :type x: :param x: the x var for each plot, by default ‘time’ :type y:
Union[str,list,None] :param y: the y var for each plot, required :type y2: :param y2: the y2 var for each plot, optional# Additional Parameters: :param title: this title will be applied to the figure.suptitle() :param xlabel: the x label, by default the capitalized var :param ylabel: the x label, by default the capitalized var :param y2label: the x label, by default the capitalized var
- Parameters:
y (str | list | None)
- 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
TraceInstance
- 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:
set
- 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!