{
"cells": [
{
"cell_type": "markdown",
"id": "employed-rebate",
"metadata": {},
"source": [
"# Convenience Methods for Exporting Plot to a File or File-Like Object\n",
"\n",
"You can export figure created by `ggplot()` or `gggrid()` functions
\n",
"to a vector or raster format using the following methods: \n",
"- `to_svg(path)`\n",
"- `to_html(path, iframe)`\n",
"- `to_png(path, scale)`\n",
"- `to_pdf(path, scale)`\n",
"\n",
"To save plot to a file on disc, specify the file' pathname in `path`.
\n",
"To stream plot image to a file-like object, supply such object in the `path` parameter instead of a pathname.\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "arranged-meter",
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import io\n",
"from IPython import display\n",
"from lets_plot import *"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "c38745bd",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"