Metadata-Version: 2.1
Name: html-plot
Version: 0.1.2
Summary: Functions for creating HTML objects out of Matplotlib plots in Jupyter
Author: Michał Kosek
Author-email: mihao@users.noreply.github.com
Requires-Python: >=3.8,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: ipython (>=8.12.0,<9.0.0)
Requires-Dist: matplotlib (>=3.7.1,<4.0.0)
Requires-Dist: numpy (>=1.24.2,<2.0.0)
Requires-Dist: python-box (>=7.0.1,<8.0.0)
Description-Content-Type: text/markdown

This package can be used to render Matplotlib plots as HTML objects in
Jupyter, so that they can be placed in HTML tables, downloaded on click,
and more.

# Examples
```python
import pandas as pd
my_plot = pd.DataFrame([[1,2,3],[4,5,6]]).plot()
```

## Simple usage
```python
html_plot.display(my_plot)
```

## Advanced usage
### Adjust Figure and Axes (e.g. figsize, title)
```python
plot_dim = html_plot.get_dim(my_plot.get_figure())
plot_dim.figsize *= 1.5
ax = html_plot.ax("This is my plot", **plot_dim)
my_html_plot = pd.DataFrame([[1,2,3],[4,5,6]]).plot(ax=ax)
```

### Output HTML string
```python
html_str = html_plot.html_str(my_html_plot)
print(html_str)
```

### Output an `IPython.display.HTML` object
```python
import IPython.display
html_obj = html_plot.HTML(my_html_plot)
IPython.display.display(html_obj)
```

### Display the object using a wrapper for `IPython.display.display()`
```python
html_plot.display(my_html_plot)
```

