{
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "%matplotlib inline"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "\n# Randomly Generated Data\n\nFrom the README.\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "import numpy as np\nfrom taco_vis import FLOW\nimport sys\nsys.path.append('../') #So taco_vis.py is visible to import\n\n# Import and generate some random data\ndata = np.random.rand(10,10)\n\nf = FLOW(data)\n# Create instance of FLOW class and use it to plot an animation.\nf.plot_cylinders_3D(animate=True)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "This produces a 2D plot of a slice through the equitorial plane with\nconcentric circles representing the concentric cylinders (with as many\ncylinders as there are radial grid points in the data). A series of black\ndots are plotted on each cylinder and are advected to visualise the sense of\nrotation. The cylinders are coloured by the value of velocity at that time\ninterval.\n\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "f.plot_cylinders(animate=False, save=False, time_idx=0)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "The same as 'cylinders' but instead the plot is a 3D representation of the\ncylinders within a spherical core.\n\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "f.plot_cylinders(animate=False, save=False, time_idx=0)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "A filled contour plot of the data is produces, which does not strictly need\nto be axisymmetric and hence the data array may be 3D (radius, theta, time).\n\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "f.plot_contours(animate=False, save=False, time_idx=0)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "Default settings for the appearance of the plots are attributes of the FLOW\nclass. Current settings can be seen by the call method of the class:\n\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "print(f())"
      ]
    }
  ],
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.7.9"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}