ttim.plots ========== .. py:module:: ttim.plots Classes ------- .. autoapisummary:: ttim.plots.PlotTtim Module Contents --------------- .. py:class:: PlotTtim(ml) .. py:attribute:: _ml .. py:method:: topview(win=None, ax=None, figsize=None, layers=None) Plot top-view. This method plots all elements (in specified layers). :param win: [x1, x2, y1, y2] :type win: list or tuple :param ax: axes to plot on, default is None which creates a new figure :type ax: matplotlib.Axes, optional :param figsize: size of figure :type figsize: tuple of 2 values :param layers: layers to plot, default is None which plots elements in all layers :type layers: int or list of ints, optional :returns: **ax** -- axes with plot :rtype: matplotlib.Axes .. !! processed by numpydoc !! .. py:method:: xsection(xy = None, labels=True, params=False, ax=None, fmt=None) Plot cross-section of model. Note: this method does not plot elements at this time. It does plot cross-section inhoms if the model is a cross-section model (ModelXsection). :param xy: list of tuples with coordinates of the form [(x0, y0), (x1, y1)]. If not provided, a cross section with length 1 is plotted. :type xy: list of tuples, optional :param labels: add layer numbering labels to plot :type labels: bool, optional :param params: add parameter values to plot :type params: bool, optional :param ax: axes to plot on, default is None which creates a new figure :type ax: matplotlib.Axes, optional :param fmt: format string for parameter values, e.g. '.2f' for 2 decimals. :type fmt: str, optional :returns: **ax** -- axes with plot :rtype: matplotlib.Axes .. !! processed by numpydoc !! .. py:method:: head_along_line(x1=0, x2=1, y1=0, y2=0, npoints=100, t=1.0, layers=0, sstart=0, color=None, lw=1, figsize=None, ax=None, legend=True, grid=True) Plot head along line. :param x1: start and end coordinates of line :type x1: float :param x2: start and end coordinates of line :type x2: float :param y1: start and end coordinates of line :type y1: float :param y2: start and end coordinates of line :type y2: float :param npoints: number of points along line :type npoints: int :param t: times at which to plot heads :type t: scalar or array :param layers: layers for which to plot heads :param sstart: starting distance for cross-section :type sstart: float :param color: color of line :type color: str :param lw: line width :type lw: float :param figsize: size of figure :type figsize: tuple of 2 values :param ax: axes to plot on, default is None which creates a new figure :type ax: matplotlib.Axes :param legend: add legend to plot :type legend: bool :param grid: add grid to plot :type grid: bool :returns: **ax** -- axes with plot :rtype: matplotlib.Axes .. !! processed by numpydoc !! .. py:method:: contour(win, ngr=20, t=1, layers=0, levels=20, layout=True, labels=True, decimals=1, color=None, ax=None, figsize=None, legend=True) Contour plot. :param win: [x1, x2, y1, y2] :type win: list or tuple :param ngr: if scalar: number of grid points in x and y direction if tuple or list: nx, ny, number of grid points in x and y direction :type ngr: scalar, tuple or list :param t: time :type t: scalar :param layers: layers for which grid is returned :type layers: integer, list or array :param levels: levels that are contoured :type levels: integer or array (default 20) :param layout: plot layout of elements :type layout: boolean (default True_) :param labels: print labels along contours :type labels: boolean (default True) :param decimals: number of decimals of labels along contours :type decimals: integer (default 1) :param color: color of contour lines :type color: str or list of strings :param ax: axes to plot on, default is None which creates a new figure :type ax: matplotlib.Axes :param figsize: size of figure :type figsize: tuple of 2 values (default is mpl default) :param legend: add legend to figure if list of strings: use strings as names in legend :type legend: list or boolean (default True) :returns: **ax** -- axes with plot :rtype: matplotlib.Axes .. !! processed by numpydoc !!