Git Product home page Git Product logo

Comments (5)

rhysgt avatar rhysgt commented on August 20, 2024 1

Running
%matplotlib qt
before
import matplotlib.pyplot as plt
seems to work on both Windows and OSX from my experience. I changed the example workbook accordingly.

from defdap.

rhysgt avatar rhysgt commented on August 20, 2024

Does the qt backend work for you on Windows 10 @merrygoat? I'm currently using it on OSX and it works nicely. Would be good to have an unified backend for Windows and OSX.

from defdap.

merrygoat avatar merrygoat commented on August 20, 2024

I am getting super inconsistent results, with some backends the plots aren't showing at all and it makes a difference if the plots are inline or not. I'm away for a couple of weeks now but we should look at this again when I get back.

from defdap.

merrygoat avatar merrygoat commented on August 20, 2024

Qt still not working for me - my guess would be that the difference is due to us having different library versions. Overall it isn't a big deal since %matplotlib notebook works.

A small correction for the notebook:

In cell 4
DicMap.plotMaxShear(plotColourBar=True, scaleBar=True, vmin=0, vmax=0.1)
should be
DicMap.plotMaxShear(plotColourBar=True, plotScaleBar=True, vmin=0, vmax=0.1)

from defdap.

tom-armitage avatar tom-armitage commented on August 20, 2024

EDIT: %matplotlib qt is working well for me at the moment, im not sure what changed but I now get a figure popup outside of the notebook.
For reference I will leave the below information as an alternative method should anyone want interactive inline plots.

I have managed to get interactive figures working in windows using %matplotlib ipympl (instead of widget). The installation steps are as below:

14

Complete steps
Install nodejs, e.g. conda install nodejs.
Install ipympl, e.g. pip install ipympl.
[Optional, but recommended; update JupyterLab, e.g.
pip install --upgrade jupyterlab.]
[Optional, but recommended; for a local user installation, run:
export JUPYTERLAB_DIR="$HOME/.local/share/jupyter/lab".]
Install extensions:

jupyter labextension install @jupyter-widgets/jupyterlab-manager
jupyter labextension install jupyter-matplotlib
Enable widgets: jupyter nbextension enable --py widgetsnbextension.

Restart JupyterLab.
Decorate with %matplotlib widget (I had to use %matplotlib IPYMPL)

Source: https://stackoverflow.com/questions/50149562/jupyterlab-interactive-plot

from defdap.

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.