Plotting functions
This plateflex module contains the following functions for plotting:
- plateflex.plotting.plot_real_grid(grid, log=False, mask=None, title=None, save=None, clabel=None, contours=None, **kwargs)
Plot 2D image of any real-valued 2D array, used in several context throughout
plateflex. For example, it can be used to plot the input grids of topography or gravity anomalies, the real or imaginary values of the wavelet transform at a given wavenumber index, the wavelet scalograms at a given wavenumber index, the wavelet admittance or coherence at a given wavenumber index, or the final grids of results.- Parameters:
grid (
ndarray) – Array of real-valued datalog (bool, optional) – Whether or not to take the log of the array values (useful in scalogram)
mask (np.ndarray, optional) – Array of booleans for masking data points
title (str, optional) – Title of plot
save (str, optional) – Name of file for to save figure
clabel (str, optional) – Label for colorbar
contours (List) – Contours to overlay on maps (e.g., useful for plotting outline of land areas)
- plateflex.plotting.plot_bayes_stats(trace, summary, map_estimate, title=None, save=None)
Extract results from variables
trace,summaryandmap_estimateto plot marginal and joint posterior distributions. Automatically determines how to plot results from those variables.- Parameters:
trace (
MultiTrace) – Posterior samples from the MCMC chainssummary (
DataFrame) – Summary statistics from Posterior distributionsmap_estimate (dict) – Container for Maximum a Posteriori (MAP) estimates
title (str, optional) – Title of plot
save (str, optional) – Name of file for to save figure
- plateflex.plotting.plot_functions(k, adm, eadm, coh, ecoh, padm=None, pcoh=None, title=None, save=None)
Function to plot observed and predicted (
Noneby default) admittance and coherence functions. Both admittance and coherence are plotted regardless of method to estimate the model paramters.- Parameters:
k (
ndarray) – 1D array of wavenumbersadm (
ndarray) – 1D array of observed wavelet admittanceeadm (
ndarray) – 1D array of error on observed wavelet admittancecoh (
ndarray) – 1D array of observed wavelet coherenceecoh (
ndarray) – 1D array of error on observed wavelet coherencepadm (
ndarray) – 1D array of predicted wavelet admittancepcoh (
ndarray) – 1D array of predicted wavelet coherencetitle (str, optional) – Title of plot
save (str, optional) – Name of file for to save figure