watex.view.TPlot.plot_tensor2d#

TPlot.plot_tensor2d(tensor='res', sites=None, to_log10=False)[source]#

Plot two dimensional tensor.

Parameters
  • freqs (array-like) – y-coordinates. It should have the length N, the same of the arr2d. the rows of the arr2d.Frequency array. It should be the complete frequency used during the survey area.

  • tensor (str , ['res','phase', 'z'], default='res') – kind of tensor to plot. Can be resistivity or phase. If phase, customize your plot to not fit the default ‘res’ behaviour.

  • to_log10 (bool, defaut=False,) – Convert the resistivity data and frequeny in log10.

  • sites (list of str, optional) – List of stations/sites names. If given, it must have the same length of the positions in of the EDI data. Must fit the number of ‘EDI’ succesffully read.

Returns

  • arr2d: 2D resistivity array from the tensor component

  • freqs: array-like 1d of frequency in the survey.

  • positions: Sites/stations positions. It is equals to the distance

    between stations times the number of sites

  • sites: list of the names of the station/sites

  • base_plot_kws: plot keywords arguments inherits from

    watex.property.BasePlot. It composes the last parameters for customizing plot as decorated return function.

Return type

( arr2d , freqs, positions , sites , base_plot_kws)

Examples

>>> from watex.view.plot import TPlot
>>> from watex.datasets import load_edis
>>> # get some 3 samples of EDI for demo
>>> edi_data = load_edis (return_data =True, samples =3 )
>>> # customize plot by adding plot_kws
>>> 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.
                    )
>>> t= TPlot(**plot_kws ).fit(edi_data)
>>> # plot recovery2d using the log10 resistivity
>>> t.plot_tensor2d (to_log10=True)
<AxesSubplot:xlabel='$Distance(m)$', ylabel='$Log_{10}Frequency [Hz]$'>