-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show plots generated with autoviz as part of a marimo notebook does not work #2700
Comments
I am not sure what the desired output is supposed to look like, but you can convert it to Html to rendering inside marimo. mo.Html(AV.AutoViz(df, depVar="Survived", chart_format="png").to_html()) We have some documentation on how to display/format rich objects, such as AutoViz, https://docs.marimo.io/guides/integrating_with_marimo/displaying_objects.html |
Thank you very much. The issue did not solve with |
@johanneswerner, a jupyter notebook would be great. can you also screenshot what you currently see when doing |
Since github does not allow me to upload a jupyter notebook file to a comment, here is the content {
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import polars as pl\n",
"\n",
"from autoviz.AutoViz_Class import AutoViz_Class"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"df = pd.read_csv(\"data/train.csv\")\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"AV = AutoViz_Class()\n",
"AV.AutoViz(df, depVar=\"Survived\", verbose=2, chart_format=\"png\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"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.12.6"
}
},
"nbformat": 4,
"nbformat_minor": 2
} When I am running the notebook, it produces plots after the last command. With marimo, it does not show the plots, see screenshot below and at the end of the textarea Further information: I am using poetry here and it seems nltk (used for word cloud plots) has problems finding the source path for the nltk data (which ends up in my home folder, not in my environment folder) - but even without nltk, Autoviz should still be able to create plots that are not depending on nltk (which are produced but not showing inline in the plot). |
Describe the bug
I am trying to use Autoviz inside of a marino notebook.
The input dataset is the titanic train dataset from kaggle.
This does not raise any errors, however I cannot convince marimo to show the plots in the notebook. It works with Jupyer Notebooks when adding the
%matplotlib inline
statement.Any ideas why this happens and how to fix this?
The environment is set up with poetry. If any additional information is required, I am glad to share it. Thank you very much! marimo is an amazing tool!
Environment
Code to reproduce
The text was updated successfully, but these errors were encountered: