@@ -51,6 +51,78 @@ All of the tests that have been done for each hardware, along with analysis and
* [[Laptop Tests]]
* [[JETSON TK1]]
# Using Jupyter
A jupyter notebook is a useful, interactive way to present a report from test results. It combines markdown formatted text with live python code, meaning that plotted data can be analysed in more detail and much easier.
### Installation
Various packages will need to be installed to use jupyter:
```
$ sudo apt-get install jupyter-notebook
$ sudo apt-get install python3 pandas
$ sudo apt-get install python3-matplotlib
$ sudo apt-get install python-pip
pip install nbconvert
pip install jupyter_client
```
### Producing a notebook with plots
Notebooks are made of cells, each containing either markdown formatted text or python code.
The first stage is to include the necessary libraries. Matplotlib is a good library for plotting data using python.
```python
importpandasaspd
importnumpyasnp
importmatplotlib.pyplotasplt
```
Next define a function which takes a data file as an argument, parses the data, and returns a frame containing the data:
To add multiple files as subplots, define an array of axes for the plots to use (each subplot is one array element), then in `plot()` add an argument `ax=axes[n]` defining which subplot to use. Note that 2D arrays can be used to plot subplots in grids (i.e. 4 plots in a 2x2 grid).