watex.utils.plot_tensors2#
- watex.utils.plot_tensors2(z_or_edis_obj_list, /, station='S00', plot_z=False, show_error_bars=True, **kwargs)[source]#
Plot resistivity and phase tensors or the real and imaginary impedance.
This function plots the apparent resistivity and phase or the real and imaginary parts of impedance tensors for a given station from a list of Z or EDI objects. It supports extensive customization for the plots including the option to show or hide error bars, control over color schemes, marker styles, and much more.
- Parameters:
z_or_edis_obj_list (list of
watex.edi.Ediorwatex.externals.z.Z) – A collection of EDI- or Impedance tensor objects. The list can contain objects directly representing impedance tensors or EDI objects from which impedance tensors can be extracted.station (int or str, default 'S00') – The station to visualize. Can be specified as an index (int) or as a string including the station name or number. For example, ‘S00’ or 0 for the first station. The counting starts from 0.
plot_z (bool, default False) – If True, visualize the real and imaginary parts of the impedance tensors (Z). If False, visualize the apparent resistivity and phase tensors.
show_error_bars (bool, default True) – Whether to show error bars in the plots. If False, error bars are omitted for a cleaner visualization.
**kwargs (dict) – Additional keyword arguments for plot customization. These can include matplotlib parameters for markers, lines, colors, and other plot attributes.
- Returns:
The Z object for the specified station, containing the impedance tensor data and any computed properties like resistivity and phase.
- Return type:
object
Examples
Plotting the apparent resistivity and phase for the fourth station from a list of EDI objects:
>>> import watex as wx >>> edi_objects = wx.fetch_data('edis', samples=17, return_data=True) >>> wx.utils.plotutils.plot_tensors(edi_objects, station=3)
Plotting the real and imaginary parts of the impedance tensor for the first station, without error bars:
>>> wx.utils.plotutils.plot_tensors(edi_objects, station='S00', zplot=True, show_error_bars=False)
Notes
This function is a part of the watex visualization utilities and requires a matplotlib environment to display the plots. Ensure that your environment supports graphical output or adjust your environment accordingly.
See also
watex.methods.EMClass for electromagnetic method processing.
watex.utils.plotutils.plot_errorbarHelper function to plot error bars.