Comments (5)
Well, I realized I have enabled privacy.resistFingerprinting
in firefox. When this switch is turned off, it works fine.
from marimo.
Hey, thanks for opening.
Each cell gets its own figure for the imperative API. So in your last cell, plt.gcf()
returns an empty figure. We can add this to the documentation.
- You could combine the plotting cell and the cell that uses
mpl.interactive
. - Or you could use the object oriented API and grab the
axis
object.
Let me know if they look ok to you.
Two options below.
import marimo
__generated_with = "0.1.36"
app = marimo.App()
@app.cell
def __():
import marimo as mo
import numpy as np
from matplotlib import pyplot as plt
return mo, np, plt
@app.cell
def __(np):
x=np.linspace(0,1,20)
return x,
@app.cell
def __(mo, plt, x):
plt.plot(x,x)
mo.mpl.interactive(plt.gcf())
return
if __name__ == "__main__":
app.run()
This should also work:
import marimo
__generated_with = "0.1.36"
app = marimo.App()
@app.cell
def __():
import marimo as mo
import numpy as np
from matplotlib import pyplot as plt
return mo, np, plt
@app.cell
def __(np):
x=np.linspace(0,1,20)
return x,
@app.cell
def __(plt, x):
plt.plot(x, x)
ax = plt.gca()
return ax,
@app.cell
def __(ax, mo):
mo.mpl.interactive(ax)
return
if __name__ == "__main__":
app.run()
from marimo.
Well, not exactly. It is no longer blank, but still have some weird behavior.
plot.webm
from marimo.
Oh weird. @mscolnick could this have to do with iframe resizing?
from marimo.
@proItheus, i am unable to reproduce it. on my computer the interactive plot takes up the full size it is given.
couple questions that could help us:
- what browser are you using
- what version of matplotlib
thanks
from marimo.
Related Issues (20)
- 3D UI Elements HOT 8
- Feature Request: Unpublish HTML HOT 1
- Support code formatting using `ruff format` HOT 1
- System theme for dark/light mode HOT 1
- "Oops! It looks like you don't have ... installed" has weird formatting
- Ctrl-[ does not act as Escape in vim mode HOT 5
- Dark theme dropdown has wrong background color
- Feature Request: Live Documentation Panel HOT 2
- Progress bar doesn't work well with objects that have no len() HOT 1
- Unable to view HTML exported notebook when offline HOT 3
- Add option for horizontal layout of ui.radio group (proposal) HOT 1
- Virtualize mo.ui.multiselect to handle large lists HOT 2
- Support async/await in cells HOT 2
- reload app when file updated externally HOT 4
- Dataframe view crashes after `pd.set_option('display.max_rows', None)` HOT 1
- Working code on editor crashes when launching via python HOT 5
- Implement multifile support in both edit and run mode. HOT 1
- ipyleaflet support HOT 3
- Large file uploads fail silently.
- mo.ui.dataframe cannot render a Polars dataframe HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from marimo.