{
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "%matplotlib inline"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "\n# Joint probability plot example\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "import pandas as pd\nimport toto\nimport matplotlib.pyplot as plt\nfrom toto.inputs.txt import TXTfile\nimport os\n# read the file\nhindcast='https://raw.githubusercontent.com/calypso-science/Toto/master/_tests/txt_file/tahuna_hindcast.txt'\nos.system('wget %s ' % hindcast)\n\nhd=TXTfile(['tahuna_hindcast.txt'],colNamesLine=1,skiprows=1,unitNamesLine=0,time_col_name={'Year':'year','Month':'month','Day':'day','Hour':'hour','Min':'Minute'})\nhd.reads()\nhd.read_time()\nhd=hd._toDataFrame()\n\n# # Processing\nhd[0].StatPlots.joint_probability_plot(Y='hs',X='tp',\\\n        args={    \n        'X Min Res Max(optional)':[2,1,22],\n        'Y Min Res Max(optional)':[0,0.5],\n        'X label':'Wave Period [s]',\n        'Y label':'Wave height [m]',\n        'time blocking':'Annual',\n        'probablity expressed in':'percent',\n        'display':'On',\n        })"
      ]
    }
  ],
  "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.8.10"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}