https://github.com/zpzim/mplot-explorer
Python script to explore mplots interactively
https://github.com/zpzim/mplot-explorer
Last synced: about 1 year ago
JSON representation
Python script to explore mplots interactively
- Host: GitHub
- URL: https://github.com/zpzim/mplot-explorer
- Owner: zpzim
- License: mit
- Created: 2022-01-02T18:57:56.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-10-01T03:18:32.000Z (over 3 years ago)
- Last Synced: 2025-02-05T05:45:06.703Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 2.07 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mplot-explorer
Example Python script showing how to explore mplots interactively using [pyscamp](https://github.com/zpzim/SCAMP). This is a rudimentary implementation which does not support optimized panning.

Usage:
```
# numpy array representing the time series
ts_a = np.fromfile('example.txt', sep='\n')
ts_b = None
# subsequence length for mplot
sublen = 100
# output dimension (square of size NxN) of the mplot shown in the figure (output will be pooled to this size)
# This implementation does not support rectangles but you could easily do it.
out_dim = 500
import knn_plotting
knn_plotting.plot_matrix_interactive(ts_a, ts_b, sublen, out_dim)
# A matplotlib figure window will be created which you can interact
# with while this script is running. You can zoom in on features you
# are interested in and the mplot will be dynamically recomputed from
# the new boundary conditions based on where you zoomed. You can zoom
# out by hitting the back button. Panning is not optimized and so will
# be recomputed every single time the bounds are updated. I don't
# recommend panning without implementing some optimizations first.
```