Exemple #1
0
def plot_data(geo_data,
              direction="y",
              data_type='all',
              series="all",
              legend_font_size=6,
              **kwargs):
    """
    Plot the projection of the raw data (interfaces and orientations) in 2D following a
    specific directions

    Args:
        direction(str): xyz. Caartesian direction to be plotted
        series(str): series to plot
        **kwargs: seaborn lmplot key arguments. (TODO: adding the link to them)

    Returns:
        None
    """

    warnings.warn(
        "gempy plotting functionality will be moved in version 1.2, use gempy.plotting module instead",
        FutureWarning)

    plot = PlotData2D(geo_data)

    # TODO saving options
    return plot.plot_data(direction=direction,
                          data_type=data_type,
                          series=series,
                          legend_font_size=legend_font_size,
                          **kwargs)
Exemple #2
0
def plot_section(geo_data, block, cell_number, direction="y", **kwargs):
    """
    Plot a section of the block model

    Args:
        cell_number(int): position of the array to plot
        direction(str): xyz. Caartesian direction to be plotted
        interpolation(str): Type of interpolation of plt.imshow. Default 'none'.  Acceptable values are 'none'
        ,'nearest', 'bilinear', 'bicubic',
        'spline16', 'spline36', 'hanning', 'hamming', 'hermite', 'kaiser',
        'quadric', 'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc',
        'lanczos'
       **kwargs: imshow keywargs

    Returns:
        None
    """
    warnings.warn(
        "gempy plotting functionality will be moved in version 1.2, "
        "use gempy.plotting module instead", FutureWarning)
    plot = PlotData2D(geo_data)
    sec_plot = plot.plot_block_section(cell_number,
                                       block=block,
                                       direction=direction,
                                       **kwargs)
Exemple #3
0
def plot_scalar_field(geo_data,
                      potential_field,
                      cell_number,
                      N=20,
                      direction="y",
                      plot_data=True,
                      series="all",
                      *args,
                      **kwargs):
    """
    Plot a potential field in a given direction.

    Args:
        cell_number(int): position of the array to plot
        potential_field(str): name of the potential field (or series) to plot
        n_pf(int): number of the  potential field (or series) to plot
        direction(str): xyz. Caartesian direction to be plotted
        serie: *Deprecated*
        **kwargs: plt.contour kwargs

    Returns:
        None
    """
    warnings.warn(
        "gempy plotting functionality will be moved in version 1.2, "
        "use gempy.plotting module instead", FutureWarning)
    plot = PlotData2D(geo_data)
    plot.plot_scalar_field(potential_field,
                           cell_number,
                           N=N,
                           direction=direction,
                           plot_data=plot_data,
                           series=series,
                           *args,
                           **kwargs)
Exemple #4
0
def plot_topology(geo_data, G, centroids, direction="y"):
    """
    Plot the topology adjacency graph in 2-D.

    Args:
        geo_data (gempy.data_management.InputData):
        G (skimage.future.graph.rag.RAG):
        centroids (dict): Centroid node coordinates as a dictionary with node id's (int) as keys and (x,y,z) coordinates
                as values.
    Keyword Args
        direction (str): "x", "y" or "z" specifying the slice direction for 2-D topology analysis. Default None.

    Returns:
        Nothing, it just plots.
    """
    warnings.warn("gempy plotting functionality will be moved in version 1.2, "
                  "use gempy.plotting module instead", FutureWarning)
    PlotData2D.plot_topo_g(geo_data, G, centroids, direction=direction)
Exemple #5
0
def plot_gradient(geo_data,
                  scalar_field,
                  gx,
                  gy,
                  gz,
                  cell_number,
                  q_stepsize=5,
                  direction="y",
                  plot_scalar=True,
                  **kwargs):
    """
        Plot the gradient of the scalar field in a given direction.

        Args:
            geo_data (gempy.DataManagement.InputData): Input data of the model
            scalar_field(numpy.array): scalar field to plot with the gradient
            gx(numpy.array): gradient in x-direction
            gy(numpy.array): gradient in y-direction
            gz(numpy.array): gradient in z-direction
            cell_number(int): position of the array to plot
            q_stepsize(int): step size between arrows to indicate gradient
            direction(str): xyz. Caartesian direction to be plotted
            plot_scalar(bool): boolean to plot scalar field
            **kwargs: plt.contour kwargs

        Returns:
            None
    """
    plot = PlotData2D(geo_data)
    plot.plot_gradient(scalar_field,
                       gx,
                       gy,
                       gz,
                       cell_number,
                       q_stepsize=q_stepsize,
                       direction=direction,
                       plot_scalar=plot_scalar,
                       **kwargs)