-
Notifications
You must be signed in to change notification settings - Fork 128
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
mo.mpl.interactive
doesn't work
#252
Comments
Hey, thanks for opening. Each cell gets its own figure for the imperative API. So in your last cell,
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() |
Well, not exactly. It is no longer blank, but still have some weird behavior. |
Oh weird. @mscolnick could this have to do with iframe resizing? |
@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:
thanks |
Well, I realized I have enabled |
Describe the bug
It's just blank.
Version
0.1.36
Code to reproduce
The text was updated successfully, but these errors were encountered: