watex.view.ExPlot.plotscatter#

ExPlot.plotscatter(xname=None, yname=None, c=None, s=None, **kwd)[source]#

Shows the relationship between two numeric columns.

Parameters
  • xname (vectors or keys in data) – Variables that specify positions on the x and y axes. Both are the column names to consider. Shoud be items in the dataframe columns. Raise an error if elements do not exist.

  • yname (vectors or keys in data) – Variables that specify positions on the x and y axes. Both are the column names to consider. Shoud be items in the dataframe columns. Raise an error if elements do not exist.

  • c (str, int or array_like, Optional) –

    The color of each point. Possible values are:
    • A single color string referred to by name, RGB or RGBA code,

      for instance ‘red’ or ‘#a98d19’.

    • A sequence of color strings referred to by name, RGB or RGBA

      code, which will be used for each point’s color recursively. For instance [‘green’,’yellow’] all points will be filled in green or yellow, alternatively.

    • A column name or position whose values will be used to color

      the marker points according to a colormap.

  • s (scalar or array_like, Optional,) –

    The size of each point. Possible values are:
    • A single scalar so all points have the same size.

    • A sequence of scalars, which will be used for each point’s

      size recursively. For instance, when passing [2,14] all points size will be either 2 or 14, alternatively.

  • kwd (dict,) – Other keyword arguments are passed down to seaborn.scatterplot .

Returns

``self`` – returns self for easy method chaining.

Return type

ExPlot instance

Example

>>> from watex.view import ExPlot
>>> p = ExPlot(tname='flow').fit(data).plotscatter (
    xname ='sfi', yname='ohmS')
>>> p
...  <'ExPlot':xname='sfi', yname='ohmS' , tname='flow'>

References

Scatterplot: https://seaborn.pydata.org/generated/seaborn.scatterplot.html Pd.scatter plot: https://www.w3resource.com/pandas/dataframe/dataframe-plot-scatter.php