resistics.common.plot module

resistics.common.plot.addLegends(fig: <function figure at 0x000001ED97863F28>, pos: int = 1) → None[source]

Add legends to all subplots in figure

Parameters
figmagplotlib.pyplot.figure

A matplotlib figure

posint

Location of legend

resistics.common.plot.colorbar2dOther()[source]

Alternative colormap for 2d data

Returns
outplt.cm

Colormap

resistics.common.plot.colorbar2dSpectra()[source]

Return colorbar for plotting spectra sections

Returns
outplt.cm

Colormap

resistics.common.plot.colorbar2dTime()[source]

Get default colormap for 2d plots with time

Returns
outplt.cm

Colormap

resistics.common.plot.colorbarMultiline()[source]

Alternative colormap for plotting multiple line plots

Returns
outplt.cm

Colormap

resistics.common.plot.getPaperFonts() → Dict[source]

Get default plot font options for paper plots

Returns
outDict

Dictionary of default plot font options

resistics.common.plot.getPlotFonts() → Dict[source]

Get default plot font options for saving plots

Returns
outDict

Dictionary of default plot font options

resistics.common.plot.getPlotRowsAndCols(maxCols: int, numPlots: int = 0) → Tuple[int, int][source]

Get the numbers of rows and columns for plots

Parameters
maxColsint

The maximum number of columns

numPlotsint

The of subplots

resistics.common.plot.getPresentationFonts() → Dict[source]

Get default plot font options for presentation plots

Returns
outDict

Dictionary of default plot font options

resistics.common.plot.getTransferFunctionFigSize(oneplot: bool, npolarisations: int) → Tuple[int, int][source]

Get the plot size for a transfer function plot

Parameters
oneplotbool

All polarisations in one plot

npolarisationsint

Number of polarisations to plot

Returns
figsizeTuple

The figure size

Notes

This is awkward because of maintaining aspect ratio for the apparent resistivity. A better solution might be required at some point.

resistics.common.plot.getViewFonts() → Dict[source]

Get default plot font options for viewing plots

Returns
outDict

Dictionary of default plot font options

resistics.common.plot.plotOptionsSpec(**kwargs) → Dict[source]

Get default plot options for plotting spectra data

Parameters
figsizeTuple, optional

Set the figure size

plotfontsDict, optional

Font sizes to use for plotting fonts

blockbool, optional

Boolean flag for blocking execution when plot is shown

amplimList[float], optional

Amplitude limits for plotting spectra

Returns
outDict

Dictionary of default plot options for plotting spectra data

resistics.common.plot.plotOptionsStandard(**kwargs) → Dict[source]

Get a set of standard plot options

Parameters
figsizeTuple, optional

Set the figure size

plotfontsDict, optional

Font sizes to use for plotting fonts

blockbool, optional

Boolean flag for blocking execution when plot is shown

Returns
Dict

Dictionary of standard plot options

resistics.common.plot.plotOptionsTime(**kwargs) → Dict[source]

Get default plot options for plotting time data

Parameters
figsizeTuple, optional

Set the figure size

plotfontsDict, optional

Font sizes to use for plotting fonts

blockbool, optional

Boolean flag for blocking execution when plot is shown

EylimList[float], optional

y limits for electric data

HylimList[float], optional

y limits for magnetic data

Returns
outDict

Dictionary of default plot options for plotting time data

resistics.common.plot.plotOptionsTipper(**kwargs) → Dict[source]

Get default plot options for plotting transfer function data

Parameters
figsizeTuple, optional

Set the figure size

plotfontsDict, optional

Font sizes to use for plotting fonts

blockbool, optional

Boolean flag for blocking execution when plot is shown

length_ylimList[float], optional

y limits for length data

angle_ylimList[float], optional

y limits for angle data

xlimList[float], optional

x limits for transfer function data

Returns
outDict

Dictionary of default plot options for plotting spectra data

resistics.common.plot.plotOptionsTransferFunction(**kwargs) → Dict[source]

Get default plot options for plotting transfer function data

Parameters
figsizeTuple, optional

Set the figure size

plotfontsDict, optional

Font sizes to use for plotting fonts

blockbool, optional

Boolean flag for blocking execution when plot is shown

res_ylimList[float], optional

y limits for resistivity data

phase_ylimList[float], optional

y limits for phase data

xlimList[float], optional

x limits for transfer function data

Returns
outDict

Dictionary of default plot options for plotting spectra data

resistics.common.plot.savePlot(path: str, filename: str, fig: <function figure at 0x000001ED97863F28>) → str[source]

Save plot whilst checking for overwriting

Parameters
pathstr

The path to save the file

filenamestr

Filename to save to

figplt.figure

Matplotlig figure to save

Returns
str

The filename written out to

resistics.common.plot.transferFunctionColours() → Dict[str, str][source]

Get colours from the different components of standard magnetotelluric transfer functions

Returns
Dict[str, str]

Dictionary mapping magnetotelluric transfer funciton components to colours