Skip to content

thin wrapper on top of matplotlib's imshow for 2D plotting, with attached slice plots

License

Notifications You must be signed in to change notification settings

scipyargentina/sliceplots

 
 

Repository files navigation

Slice Plots

Documentation Status Updates PyPI - License

thin wrapper on top of matplotlib's .imshow() for 2D plotting, with attached slice plots

Features

  • 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

Quick start

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,
)

https://raw.githubusercontent.com/berceanu/sliceplots/master/tests/baseline/imshow_slices.png

Run the sliceplots example notebook live on Binder to see examples of how to use sliceplots or visit the tutorial on Read the Docs.

About

thin wrapper on top of matplotlib's imshow for 2D plotting, with attached slice plots

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 91.2%
  • Makefile 8.8%