hevslib.plotly module

class hevslib.plotly.GraphInteractionOption(value)

Bases: enum.Enum

An enumeration.

interactive = 'interactive'
static = 'static'
class hevslib.plotly.GraphOutputOption(value)

Bases: enum.Enum

An enumeration.

both = 'both'
htmlFile = 'extFile'
inline = 'inline'
none = 'none'
hevslib.plotly.colorGradient(c1, c2, mix)

Return the gradient of color between two colors

Parameters
  • c1 – rgb color of max value (1)

  • c2 – rgb color of min value (0)

  • mix – value of the gradient we want (between 0 and 1)

Returns

RGB of gradient corresponding to mix

Return type

color

Raises

None

hevslib.plotly.createScoreGraph(df, thickness, time_column, ruleset, target, target_quality_order, verbose=False, log=None)

Create graph showing percentage of excellent/normal plate

Parameters
  • df – The dataframe containing the data to display

  • time_column – The column to use for x in the scatter plot

  • ml_rule – List of rules that will be used to filter plates from df

  • rule_type – List of the type of the rules (equal to, less than, etc..)

  • target – The target that will be used to differentiate excellent/normal plates

  • target_quality_order – Dictionary that indicate if a plate is excellent when the target is below (0) or above (1) the median

Returns

The score graph

Return type

Plotly figure

Raises

None

hevslib.plotly.plotFigure(graphFilename, fig, staticImageSize=None, notebookGraphicOutputs=None, notebookGraphicInteraction=None, GraphAutoOpenHTML=False)

Creates the graph plots depenmding on the choosen option

Parameters
  • graphFilename – Filename of the output html-file in case of Option htmlfile

  • fig – ply.graph_objs.Figure(data=traces, layout=mylayout)

  • staticImageSize – optional dict with {‘width’: xxx, ‘height’: xxx, ‘sacle’: xxx,}

  • notebookGraphicOutputs – GraphOutputOption(‘extFile’), GraphOutputOption(‘inline’), GraphOutputOption(‘both’)

  • notebookGraphicInteraction – GraphInteractionOption(‘static’), GraphInteractionOption(‘interactive’)

  • GraphAutoOpenHTML – auto open browser with html file

Returns

None

Raises

None

hevslib.plotly.plotTwins(df, thickness, targetMedian, graphName='Test.html')

Create graph to plot twins from a dataframe

Parameters
  • df – pandas dataframe, must contains `twins_list` column

  • thickness – thickness of the plates

  • targetMedian – value of the target median to be plotted on the graph

  • graphName – name of the plot

Returns

None

Raises

None

hevslib.plotly.plot_figure(graphFilename, fig, staticImageSize=None, notebookGraphicOutputs=None, notebookGraphicInteraction=None, GraphAutoOpenHTML=False)