{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import sys\n",
    "from pdfCropMargins import crop\n",
    "from importlib import reload\n",
    "\n",
    "import draw_graph_expr_1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "  bench_name  time_taken    config  ckpt_trig  ckpt_exec\n",
      "0        sha    0.240614  adaptive        0.0        1.0\n",
      "1        sha    0.227808  adaptive        0.0        1.0\n",
      "  bench_name  time_taken  config  ckpt_trig  ckpt_exec\n",
      "0        sha    1.373049  unroll        NaN        NaN\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ybkim/miniconda3/envs/embedded/lib/python3.11/site-packages/seaborn/axisgrid.py:123: UserWarning: The figure layout has changed to tight\n",
      "  self._figure.tight_layout(*args, **kwargs)\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "('plot_expr_1_cropped.pdf', None, None, None)"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "[encoded data, 70404 characters]",
      "text/plain": [
       "<Figure size 1200x400 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "reload(draw_graph_expr_1)\n",
    "fig = draw_graph_expr_1.draw_graph()\n",
    "output_file_name = \"plot_expr_1.pdf\"\n",
    "cropped_file_name = \"plot_expr_1_cropped.pdf\"\n",
    "fig.savefig(output_file_name, bbox_inches=\"tight\")\n",
    "crop([\"-o\", cropped_file_name, \"-p4\", \"0\", \"20\", \"20\", \"70\", output_file_name])"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "embedded",
   "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.11.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
