Giter Site home page Giter Site logo

"module://matplotlib_pyodide.wasm_backend" should auto clear the old pictures instead of generate new pictures about matplotlib-pyodide HOT 4 OPEN

pyodide avatar pyodide commented on August 31, 2024
"module://matplotlib_pyodide.wasm_backend" should auto clear the old pictures instead of generate new pictures

from matplotlib-pyodide.

Comments (4)

ryanking13 avatar ryanking13 commented on August 31, 2024

Thanks for opening the issue. There is currently no maintainer actively managing matplotlib-pyodide, so it would be great if you could contribute to the issues you see.

from matplotlib-pyodide.

yu0A avatar yu0A commented on August 31, 2024

Thanks for opening the issue. There is currently no maintainer actively managing matplotlib-pyodide, so it would be great if you could contribute to the issues you see.

I'm glad to maintain this repo. BTW are there any FAQs to debug emscripten whls like this?

from matplotlib-pyodide.

hoodmane avatar hoodmane commented on August 31, 2024

BTW are there any FAQs to debug emscripten whls like this?

No, and it's a bit inconvenient but we are happy to provide suggestions / help if you get stuck. It's easier for wheels the work in node, but matplolib_pyodide is browser only.

I think the best thing is to unpack the wheel into some folder:

tmp-site/unpacked_wheel_pkg1
tmp-site/unpacked_wheel_pkg2
...

then do:

dirHandle = await showDirectoryPicker();
const nativefs = await pyodide.mountNativeFS("/mount_dir", dirHandle);
pyodide.pyimport("sys").path.insert(0, "/mount_dir")

and pick the tmp-site directory. Then you should be able to use the files on disk.
https://pyodide.org/en/stable/usage/file-system.html#experimental-using-the-native-file-system-in-the-browser

from matplotlib-pyodide.

yu0A avatar yu0A commented on August 31, 2024

I successfully overload the destroy() function, and matplotlib does generate picture from "Figure 1".
chrome_yuYizqo78e

But a new bug is, pyodide cannot call div.removeChild() method successfully.

from matplotlib-pyodide.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.