pyrocko.plot.smartplot

Matplotlib plotting with some fancy extras.

Classes

Plot([x_dims, y_dims, z_dims, config, fig, ...])

Matplotlib plotting with some fancy extras.

PlotConfig(**kwargs)

Configuration for Plot.

class PlotConfig(**kwargs)[source]

Bases: Object

Configuration for Plot.

font_size

float, default: 9.0

size_cm

tuple of 2 float objects, default: (20.0, 20.0)

margins_em

tuple of 4 float objects, default: (8.0, 6.0, 8.0, 6.0)

separator_em

float, default: 1.5

colorbar_width_em

float, default: 2.0

label_offset_em

tuple of 2 float objects, default: (2.0, 2.0)

tick_label_offset_em

tuple of 2 float objects, default: (0.5, 0.5)

class Plot(x_dims=['x'], y_dims=['y'], z_dims=[], config=None, fig=None, call_mpl_init=True)[source]

Bases: object

Matplotlib plotting with some fancy extras.

  • Absolute sized figure margins, also for interactive plots.

  • Improved label placement for grids of axes.

  • Improved shared axis’es across multiple axes, e.g. for cross section plots.

  • Fixed aspect plotting across multiple axis’es on separate axes.

  • Automatic subplot sizing based on aspect and data limit constraints.

  • Serializable plot configuration.