{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%matplotlib widget" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "ExecuteTime": { "end_time": "2019-08-07T08:07:06.908562Z", "start_time": "2019-08-07T08:07:06.602919Z" } }, "outputs": [], "source": [ "import matplotlib.pyplot as plt" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "fig, ax = plt.subplots()\n", "fig.canvas.layout.width = '7in'\n", "fig.canvas.layout.height= '5in'\n", "\n", "# if I hide the header here, I get a libpng error\n", "# fig.canvas.header_visible = False\n", "\n", "ax.plot([1,2,3], [4,5,3])" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# hiding after rendering works\n", "fig.canvas.header_visible = False" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# hiding together with calls to toolbar options, work.\n", "fig, ax = plt.subplots()\n", "fig.canvas.layout.width = '7in'\n", "fig.canvas.layout.height= '5in'\n", "\n", "fig.canvas.toolbar_visible = False\n", "fig.canvas.header_visible = False\n", "\n", "ax.plot([1,2,3], [4,5,3])" ] }, { "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.3" } }, "nbformat": 4, "nbformat_minor": 2 }