watex.view.ExPlot#

class watex.view.ExPlot(tname=None, inplace=False, **kws)[source]#

Exploratory plot for data analysis

ExPlot is a shadow class. Explore data is needed to create a model since it gives a feel for the data and also at great excuses to meet and discuss issues with business units that controls the data. ExPlot methods i.e. return an instancied object that inherits from watex.property.Baseplots ABC (Abstract Base Class) for visualization.

Parameters
  • savefig (str, Path-like object,) – savefigure’s name, default is None

  • fig_dpi (float,) – dots-per-inch resolution of the figure. default is 300

  • fig_num (int,) – size of figure in inches (width, height). default is [5, 5]

  • fig_size (Tuple (int, int) or inch) – size of figure in inches (width, height).*default* is [5, 5]

  • fig_orientation (str,) – figure orientation. default is landscape

  • fig_tile (str,) – figure title. default is None

  • fs (float,) – size of font of axis tick labels, axis labels are fs+2. default is 6

  • ls (str,) – line style, it can be [ ‘-’ | ‘.’ | ‘:’ ] . default is ‘-’

  • lc (str, Optional,) – line color of the plot, default is k

  • lw (float, Optional,) – line weight of the plot, default is 1.5

  • alpha (float between 0 < alpha < 1,) – transparency number, default is 0.5,

  • font_weight (str, Optional) – weight of the font , default is bold.

  • font_style (str, Optional) – style of the font. default is italic

  • font_size (float, Optional) – size of font in inches (width, height). default is 3.

  • ms (float, Optional) – size of marker in points. default is 5

  • marker (str, Optional) – marker of stations default is o.

  • marker_style (str, Optional) – facecolor of the marker. default is yellow

  • marker_edgecolor (str, Optional) – facecolor of the marker. default is yellow

  • marker_edgewidth (float, Optional) – width of the marker. default is 3.

  • xminorticks (float, Optional) – minortick according to x-axis size and default is 1.

  • yminorticks (float, Optional) – yminorticks according to x-axis size and default is 1.

  • bins (histograms element separation between two bar. default is 10.) –

  • xlim (tuple (int, int), Optional) – limit of x-axis in plot.

  • ylim (tuple (int, int), Optional) – limit of x-axis in plot.

  • xlabel (str, Optional,) – label name of x-axis in plot.

  • ylabel (str, Optional,) – label name of y-axis in plot.

  • rotate_xlabel (float, Optional) – angle to rotate xlabel in plot.

  • rotate_ylabel (float, Optional) – angle to rotate ylabel in plot.

  • leg_kws (dict, Optional) – keyword arguments of legend. default is empty dict

  • plt_kws (dict, Optional) – keyword arguments of plot. default is empty dict

  • glc (str, Optional) – line color of the grid plot, default is k

  • glw (float, Optional) – line weight of the grid plot, default is 2

  • galpha (float, Optional,) – transparency number of grid, default is 0.5

  • gaxis (str ('x', 'y', 'both')) – type of axis to hold the grid, default is both

  • gwhich (str, Optional) – kind of grid in the plot. default is major

  • tp_axis (bool,) – axis to apply the ticks params. default is both

  • tp_labelsize (str, Optional) – labelsize of ticks params. default is italic

  • tp_bottom (bool,) – position at bottom of ticks params. default is True.

  • tp_labelbottom (bool,) – put label on the bottom of the ticks. default is False

  • tp_labeltop (bool,) – put label on the top of the ticks. default is True

  • cb_orientation (str , ('vertical', 'horizontal')) – orientation of the colorbar, default is vertical

  • cb_aspect (float, Optional) – aspect of the colorbar. default is 20.

  • cb_shrink (float, Optional) – shrink size of the colorbar. default is 1.0

  • cb_pad (float,) – pad of the colorbar of plot. default is .05

  • cb_anchor (tuple (float, float)) – anchor of the colorbar. default is (0.0, 0.5)

  • cb_panchor (tuple (float, float)) – proportionality anchor of the colorbar. default is (1.0, 0.5)

  • cb_label (str, Optional) – label of the colorbar.

  • cb_spacing (str, Optional) – spacing of the colorbar. default is uniform

  • cb_drawedges (bool,) – draw edges inside of the colorbar. default is False

  • sns_orient ('v' | 'h', optional) – Orientation of the plot (vertical or horizontal). This is usually inferred based on the type of the input variables, but it can be used to resolve ambiguity when both x and y are numeric or when plotting wide-form data. default is v which refer to ‘vertical’

  • sns_style (dict, or one of {darkgrid, whitegrid, dark, white, ticks}) – A dictionary of parameters or the name of a preconfigured style.

  • sns_palette (seaborn color paltte | matplotlib colormap | hls | husl) – Palette definition. Should be something color_palette() can process. the palette generates the point with different colors

  • sns_height (float,) – Proportion of axes extent covered by each rug element. Can be negative. default is 4.

  • sns_aspect (scalar (float, int)) – Aspect ratio of each facet, so that aspect * height gives the width of each facet in inches. default is .7

Returns

self – returns self for easy method chaining.

Return type

Baseclass instance

Examples

>>> import pandas as pd
>>> from watex.view import ExPlot
>>> data = pd.read_csv ('data/geodata/main.bagciv.data.csv' )
>>> ExPlot(fig_size = (12, 4)).fit(data).missing(kind ='corr')
... <watex.view.plot.ExPlot at 0x21162a975e0>