thin wrapper on top of matplotlib
's .imshow()
for 2D plotting, with attached slice plots
- Free software: BSD license
- Documentation: https://sliceplots.readthedocs.io
- only depends on
matplotlib
- uses its pure OO (look Ma, no
pyplot
!) interface - support for 1D and 2D plots with various customization options
- broken-axis 1D plots
- small codebase
- designed for non-interactive use, scripting and publication-quality plots
Install the package via:
$ pip install sliceplots
Generate a quick slice plot:
import sliceplots.two_dimensional as two_d
axis_data = np.linspace(0, np.pi, 128)
data_2d = np.cos(axis_data - 0.5) * np.cos(axis_data.reshape(-1, 1) - 1.0)
two_d.Plot2D(
data_2d,
axis_data, # horiz. axis
axis_data, # vert. axis
xlabel="x",
ylabel="y",
zlabel="f(x,y)",
hslice_val=0.75,
vslice_val=2.75,
)
Run the sliceplots
example notebook live on
Binder
to see examples of how to use sliceplots
or visit the
tutorial on Read the Docs.