{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Examples - plot_heatmap()" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(1342, 4)\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
col0col1col2col3
time
2019-01-01 01:39:000.231846-0.058591-0.0103480.043459
2019-01-01 01:40:000.224582-0.046758-0.0009220.051141
2019-01-01 01:41:000.208052-0.051456-0.0057550.049070
2019-01-01 01:42:000.205155-0.072066-0.0219390.037423
2019-01-01 01:43:000.202429-0.096522-0.0226280.045342
\n", "
" ], "text/plain": [ " col0 col1 col2 col3\n", "time \n", "2019-01-01 01:39:00 0.231846 -0.058591 -0.010348 0.043459\n", "2019-01-01 01:40:00 0.224582 -0.046758 -0.000922 0.051141\n", "2019-01-01 01:41:00 0.208052 -0.051456 -0.005755 0.049070\n", "2019-01-01 01:42:00 0.205155 -0.072066 -0.021939 0.037423\n", "2019-01-01 01:43:00 0.202429 -0.096522 -0.022628 0.045342" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from am4894pd.utils import df_dummy_ts # used to generate some dummy data\n", "from am4894plots.plots import plot_heatmap\n", "\n", "# generate some dummy time series data\n", "df = df_dummy_ts(n_cols=4, freq='1min')\n", "print(df.shape)\n", "display(df.head())" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ " \n", " " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\n", " \n", " \n", "
\n", " \n", "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# plot heatmap\n", "plot_heatmap(df, renderer='notebook')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "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.2" } }, "nbformat": 4, "nbformat_minor": 1 }