watex.utils.geotools.zoom_processing#

watex.utils.geotools.zoom_processing(zoom, data, layers=None, hatches=None, colors=None)[source]#

Zoom the necessary part of the plot.

If some optionals data are given such as hatches, colors, layers, they must be the same size like the data.

Parameters
  • zoom

    float, list. If float value is given, it’s cnsidered as a zoom ratio than it should be ranged between 0 and 1. For isntance:

    • 0.25 –> 25% plot start from 0. to max depth * 0.25 m.

    Otherwise if values given are in the list, they should be composed of two items which are the top and bottom of the plot. For instance:

    • [10, 120] –> top =10m and bottom = 120 m.

    Note that if the length of list is greater than 2, the function will return the entire plot and no errors should be raised.

  • data – list of composed data. It should be the thickness from the top to the bottom of the plot.

  • layers – optional, list of layers that fits the data

  • hatches – optional, list of hatches that correspond to the data

  • colors – optional, list of colors that fits the data

Returns

  • top-botom pairs: list composed of top bottom values

  • new_thicknesses: new layers thicknesses computed from top to bottom

  • other optional arguments shrunk to match the number of layers and

    the name of exact layers at the depth.

Example
>>> import watex.utils.geotools as GU
>>> layers= ['$(i)$', 'granite', '$(i)$', 'granite']
>>> thicknesses= [59.0, 150.0, 590.0, 200.0]
>>> hatch =['//.', 'none', '+++.', None]
>>> color =[(0.5019607843137255, 0.0, 1.0), None, (0.8, 0.6, 1.),'lime']
>>> GU.zoom_processing(zoom=0.5 , data= thicknesses, layers =layers,
                      hatches =hatch, colors =color)
... ([0.0, 499.5],
...     [59.0, 150.0, 290.5],
...     ['$(i)$', 'granite', '$(i)$'],
...     ['//.', 'none', '+++.'],
...     [(0.5019607843137255, 0.0, 1.0), None, (0.8, 0.6, 1.0)])