ptvis.attach_plain_cells

ptvis.attach_plain_cells(fig, elements, shape='square', areas=None, area_max=None, texts=None, text_colorway=None, colors=None, color_conversion=None, color_guide=None, tooltip=None, labels=None, formats=None, table_layout=None, row=None, col=None)[source]

Attach the periodic table with plain cells.

Parameters:
  • fig (plotly.graph_objects.Figure) – Figure object to which the periodic table is attached.

  • elements (series-like of ptvis.Element) – Chemical elements whose cells are drawn.

  • shape ({'square', 'circle'}, optional) – Shape of a cell.

  • areas (series-like of float, optional) – Values determining areas of cells. Must be nonnegative.

  • area_max (float, optional) – Value of the areas argument corresponding to the largest possible cell area. If not given, the maximum of the argument is used.

  • texts (series-like of str, optional) – Texts of cells.

  • text_colorway (collection of str, optional) – Candidates for text colors. A color of the highest contrast ratio to a cell color is selected.

  • colors (series-like, optional) – Values determining colors of cells.

  • color_conversion (ptvis.color.BaseColorConversion, optional) – Conversion from the colors argument to colors. If not given, use a ptvis.color.ContinuousColorConversion object for a numerical colors argument and a ptvis.color.CategoricalColorConversion object for a non-numerical colors argument.

  • color_guide (mapping, optional) – Attributes of a color guide. If not given, a color guide is not added.

  • tooltip (mapping, optional) – Tooltip contents. The key is a label of data and the value is bool or series-like. The value of bool controls whether an item is shown. The series-like value is extra data.

  • labels (mapping, optional) – Labels of data. The key is a default label.

  • formats (mapping, optional) – Formats of data. The key is a default label of data.

  • table_layout (ptvis.layouts.BaseTableLayout, optional) – Layout of the periodic table.

  • row (int, optional) – Row where the periodic table is attached.

  • col (int, optional) – Column where the periodic table is attached.