PyScript Tutorial - Learn plotting Matplotlib Charts on PyScript Web #6

preview_player
Показать описание
Learn how to plot Matplotlib charts using PyScript. This tutorial explains how to :

1. define matplotlib dependency for pyscript
2. set the chart placeholder
3. how to display or send the chart from pyscript to html front-end component

PyScript Playlist:

#pyscript #Pythonhtml
Рекомендации по теме
Комментарии
Автор

That’s really cool, it’s like use Dash but with matplotlib instead of plotly.

maxidiazbattan
Автор

Nice. Now, how to input data on the html webpage and click a button there and then python will use those data and return the graph on the webpage?

danielmalyuta
Автор

Hi! I'm trying to show a seaborn heatmap based on data uploaded from a CSV file. The plot object is defined under a function which is called when upload button is hit. How to get this done?

treelanceacademy
Автор

i am having this error
JsException(PythonError: Traceback (most recent call last): File "/lib/python3.10/site-packages/_pyodide/_base.py", line 429, in eval_code .run(globals, locals) File "/lib/python3.10/site-packages/_pyodide/_base.py", line 300, in run coroutine = eval(self.code, globals, locals) File "", line 4, in ModuleNotFoundError: No module named 'matplotlib' )

demonfury
Автор

Thank you very much! I have one problem with libraries. I can't import matplotlib with <py-env> - matplotlib </py-env> due to error "PythonError: Traceback (most recent call last): ... ... No module named 'matplotlib'". However i can do it using packages:
<py-config> packages = [ "matplotlib", "numpy"] </py-config>

alejandrolike