Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

jonathonmcmurray/plot

Repository files navigation

plot

Anaconda-Server Badge Anaconda-Server Badge

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

Setup

  • 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

Usage

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 chart
  • y - y values for line chart
  • title - 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 chart
  • sizes - percentages for pie chart

About

plotting module for q using qutil & embedPy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published