<jupyter_start><jupyter_text>SigPlot Jupyter Notebook Extension![![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/LGSInnovations/jupyter-sigplot/master?filepath=example%2FJupyterSigplot.ipynb) Installation (If not running the notebook on [myBinder](https://mybinder.org/v2/gh/LGSInnovations/jupyter-sigplot/master?filepath=example%2FJupyterSigplot.ipynb))- Download extension from [GitHub](https://github.com/LGSInnovations/jupyter-sigplot)- Install Python 2.6+ or 3.5+- Install `pip` (usually bundled with Python)- Install Jupyter using `pip` (or install the Anaconda platform, which also includes Jupyter)```pip install jupyter```- Install the SigPlot Jupyter Notebook extension (run the following in order)```[/path/to/jupyter_sigplot]$ python setup.py install[/path/to/jupyter_sigplot]$ jupyter nbextension install --py --symlink --sys-prefix jupyter_sigplot[/path/to/jupyter_sigplot]$ jupyter nbextension enable jupyter_sigplot --py --sys-prefix```- To launch the notebook, simply run```$ jupyter notebook```- (Note: you do not need X-MIDAS installed to use  [SigPlot](https://github.com/lgsinnovations/sigplot).) sigplot.Plot Usage- `Plot(args*, kwargs*)` - creates a sigplot with each arg as input data and kwargs as options- `overlay_array(data)` - adds an array of numbers to the sigplot's input data- `overlay_href(path)` - adds data from a file or URI to the sigplot- `change_settings(**kwargs)` - changes the options of the sigplot- `plot(*args)` - displays an interactive sigplot(Note: Changing the kernel's current working directory will affect relative data paths.)<jupyter_code># The only import you _need_ for plotting is `jupyter_sigplot.sigplot.Plot`.
from jupyter_sigplot.sigplot import Plot

# We'll import `numpy` too to show how to plot a `numpy` array.
import numpy as np
# self-explanatory, but we're instantiating a `jupyter_sigplot.sigplot.Plot` object
# and saying do not show the x and y axes.
plot = Plot(noxaxis=True, noyaxis=True, xi=True)

# Multiple `overlay_*` calls will layer on top of one-another
plot.overlay_array((1,2,3))
plot.overlay_array([3,2,1])
# you can change settings after the plot is instantiated,
# so we'll add cross-hairs and show the x axis!
plot.change_settings({'cross': True, 'show_x_axis': True})
%%time

# self-explanatory, but we're instantiating a `SigPlot` object
# and saying do not show the x and y axes.
plot = Plot(noxaxis=True, noyaxis=True)

# Multiple `overlay_*` calls will layer on top of one-another
x = np.arange(0, 200e3, .01)
plot.overlay_array(np.sin(x))
plot = Plot(noxaxis=True, noyaxis=False)

# overlay_href() can accept a local Jupyter file or an arbitrary URI;
# if it's an http or https URI, it will copy the file locally to
# avoid dealing with cross-origin resource sharing (CORS)
plot.overlay_href("http://sigplot.lgsinnovations.com/dat/pulse.tmp")
# once the resource is local,
# you can just refer to the filename
# Note: changing the kernel's current working directory will affect
# relative data paths.
# Note: Running this will affect the previous cell's plot
plot.overlay_href("sin.tmp")
# You can also plot mixed-types (i.e., hrefs and arrays)
plot = Plot()
plot.overlay_href("http://sigplot.lgsinnovations.com/dat/sin.tmp")
plot.overlay_href("http://sigplot.lgsinnovations.com/dat/pulse.tmp")
plot.overlay_array(np.arange(0, 4, .01))
# penny.prm is a type-2000 file, meaning it's layed out as
# a 2-dimensional matrix, so `plot()` will by default plot each row
# individually in a 1-D plot
plot = Plot()
plot.overlay_href("http://sigplot.lgsinnovations.com/dat/penny.prm")
plot = Plot()

# we can also force SigPlot to plot 1-dimensional arrays
# as a heatmap/raster setting `subsize` to how many
# elements should be in each row
plot.overlay_array([1,2,3,2,3,4,1,2,3], {'subsize': 3})
plot = Plot()
plot.overlay_array([1,2,3,2,3,4,1,2,3], {'subsize': 5})
plot = Plot()

# alternatively, you can just pass a 2-dimensional array/list
# and as long as "subsize" is passed, it will plot it correctly
plot.overlay_array([[1,2,3],[2,3,4],[1,2,3]], {'subsize': 3})
plot = Plot()

# you can also specify multiple files using '|' as
# the delimiter
plot.overlay_href('pulse.tmp|sin.tmp')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12544378698224853, 'fraction_numerical': 0.014911242603550296, 'mean_word_length': 5.364457831325301, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '154030', 'license': 'Apache-2.0', 'n_tokens_mistral': 1489, 'n_tokens_neox': 1411, 'n_words': 453, 'path': 'example/JupyterSigplot.ipynb', 'repo_name': 'spectriclabs/jupyter-sigplot', 'size': '4225'}