Plotting module for q using qutil & embedPy
Simple wrapper around matplotlib. Includes importmatplotlib.q
from kx. Requires embedPy, works nicely with jupyterq
Built for qutil, (will be) hosted on Anaconda Cloud
Accepts dictionaries with some or all args. Little error handling to prevent errors with missing required args. Suitable only for the most basic of plots, for anything with more complex requirements more direct usage of matplotlib will be required
-
Install kdb, embedPy & jupyterq. Easiest way is via Anaconda:
conda install -c kx jupyterq #other packges installed via dependency
-
Install necessary q modules. Again, via Anaconda (reQ to be used for downloading datasets):
conda install -c jmcmurray req plot
-
Run Jupyter in directory containing notebook:
jupyter notebook
Without jupyter, also works from console; display locally in Qt window or save to file
For examples, see plot.ipynb, AoC Stats.ipynb & Cryptographic Speed Test.ipynb
Basic usage is plot
with argument dictionary. Valid keys for argument dictionary:
plot
- type of plot; options:`line`pie
file
- file to save to (optional if not provided, will output plot to Jupyter/Qt window)x
- x values for line charty
- y values for line charttitle
- title [string]xlabel
- label for x axis (line chart) [string]ylabel
- label for y axis (line chart) [string]grid
- display grid (line chart) [boolean]labels
- categories for pie chartsizes
- percentages for pie chart