watex.view.TPlot#
- class watex.view.TPlot(survey_area=None, distance=50.0, prefix='S', how='py', window_size=5, component='xy', mode='same', method='slinear', out='srho', c=2, **kws)[source]#
Tensor plot from EMAP or AMT processing data.
TPlot is a Tensor (Impedances , resistivity and phases ) plot class. Explore SEG ( Society of Exploration Geophysicist ) class data. Plot recovery tensors. TPlot methods returns an instancied object that inherits from
watex.property.BaseplotsABC (Abstract Base Class) for visualization.- Parameters:
window_size (int) – the length of the window. Must be greater than 1 and preferably an odd integer number. Default is
5component (str) – field tensors direction. It can be
xx,xy,``yx``,yy. If arr2d` is provided, no need to give an argument. It become useful when a collection of EDI-objects is provided. If don’t specify, the resistivity and phase value at component xy should be fetched for correction by default. Change the component value to get the appropriate data for correction. Default isxy.mode (str , ['valid', 'same'], default='same') – mode of the border trimming. Should be ‘valid’ or ‘same’.’valid’ is used for regular trimimg whereas the ‘same’ is used for appending the first and last value of resistivity. Any other argument except ‘valid’ should be considered as ‘same’ argument. Default is
same.method (str, default
slinear) – Interpolation technique to use. Can benearest``or ``pad. Refer to the documentation of ~.interpolate2d.out (str) – Value to export. Can be
sfactor,tensorfor corrections factor and impedance tensor. Any other values will export the static corrected resistivitysrho.c (int,) – A window-width expansion factor that must be input to the filter adaptation process to control the roll-off characteristics of the applied Hanning window. It is recommended to select c between
1and4. Default is2.distance (float) – The step between two stations/sites. If given, it creates an array of position for plotting purpose. Default value is
50meters.prefix (str) – string value to add as prefix of given id. Prefix can be the site name. Default is
S.how (str) – Mode to index the station. Default is ‘Python indexing’ i.e. the counting of stations would starts by 0. Any other mode will start the counting by 1.
savefig (str, Path-like object,) – savefigure’s name, default is
Nonefig_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
landscapefig_tile (str,) – figure title. default is
Nonefs (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
klw (float, Optional,) – line weight of the plot, default is
1.5alpha (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
italicfont_size (float, Optional) – size of font in inches (width, height). default is
3.ms (float, Optional) – size of marker in points. default is
5marker (str, Optional) – marker of stations default is
o.marker_style (str, Optional) – facecolor of the marker. default is
yellowmarker_edgecolor (str, Optional) – facecolor of the marker. default is
yellowmarker_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
dictplt_kws (dict, Optional) – keyword arguments of plot. default is empty
dictglc (str, Optional) – line color of the grid plot, default is
kglw (float, Optional) – line weight of the grid plot, default is
2galpha (float, Optional,) – transparency number of grid, default is
0.5gaxis (str ('x', 'y', 'both')) – type of axis to hold the grid, default is
bothgwhich (str, Optional) – kind of grid in the plot. default is
majortp_axis (bool,) – axis to apply the ticks params. default is
bothtp_labelsize (str, Optional) – labelsize of ticks params. default is
italictp_bottom (bool,) – position at bottom of ticks params. default is
True.tp_labelbottom (bool,) – put label on the bottom of the ticks. default is
Falsetp_labeltop (bool,) – put label on the top of the ticks. default is
Truecb_orientation (str , ('vertical', 'horizontal')) – orientation of the colorbar, default is
verticalcb_aspect (float, Optional) – aspect of the colorbar. default is
20.cb_shrink (float, Optional) – shrink size of the colorbar. default is
1.0cb_pad (float,) – pad of the colorbar of plot. default is
.05cb_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
uniformcb_drawedges (bool,) – draw edges inside of the colorbar. default is
Falsesns_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
vwhich 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
selffor easy method chaining.- Return type:
Baseclass instance
Examples
>>> from watex.view.plot import TPlot >>> from watex.datasets import load_edis >>> plot_kws = dict( ylabel = '$Log_{10}Frequency [Hz]$', xlabel = '$Distance(m)$', cb_label = '$Log_{10}Rhoa[\Omega.m$]', fig_size =(6, 3), font_size =7., rotate_xlabel=45, imshow_interp='bicubic', ) >>> edi_data =load_edis (return_data= True, samples=7 ) >>> t= TPlot(**plot_kws ).fit(edi_data) >>> t.fit(edi_data ).plot_tensor2d (to_log10=True ) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |Data collected = 7 |EDI success. read= 7 |Rate = 100.0 %| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Out[150]: <AxesSubplot:xlabel='$Distance(m)$', ylabel='$Log_{10}Frequency [Hz]$'>