Git Product home page Git Product logo

Comments (9)

u-anurag avatar u-anurag commented on May 26, 2024

Thanks Dr. Scott! The best way to use the model viewer is through the terminal command (Anaconda or Linux). An interactive Matplotlib window is generated by the program. You can use the mouse/click-and-hold to manually change the window size and viewing angle and save the figure in the desired orientation/zoom level.

While using Spyder (or any other IDE), change the IPython console/Graphics settings (in Preferences) to Automatic graphics backend. This will generate an interactive window instead of an inline .png image. We should mention this on the Plotting commands page.

I'll also add an option to set view angle and window size manually, just in case.

Spyder Setting

from openseespy.

mhscott avatar mhscott commented on May 26, 2024

from openseespy.

u-anurag avatar u-anurag commented on May 26, 2024

For Jupyter notebooks, one way to do that is to write %matplotlib qt before starting the script. This will open an interactive plot window instead of an inline image. Use %matplotlib inline to switch back to inline plotting.

image

from openseespy.

mhscott avatar mhscott commented on May 26, 2024

Thanks, @u-anurag, that worked! But I had to install PySide2 first, but this is probably included already in Pythong IDEs. I'm working in Linux without an IDE.
pip install PySide2

from openseespy.

u-anurag avatar u-anurag commented on May 26, 2024

I just noticed that Anaconda installs all the dependencies of Matplotlib as a package. Qt packages (PyQt and PySide) are optional dependencies as per the Matplotlib website. I have created a pull request to update the information on the Plotting commands page.

from openseespy.

u-anurag avatar u-anurag commented on May 26, 2024

Should I force Qt backend in the plot_model() and plot_modeshape() functions? I don't use Jupyter Notebook a lot so I don't know if users prefer an inline plot or an interactive dedicated window. In that case, users don't have to worry about adding %matplotlib qt before running the script.

from openseespy.

mhscott avatar mhscott commented on May 26, 2024

from openseespy.

u-anurag avatar u-anurag commented on May 26, 2024

I found that %matplotlib notebook produces an inline interactive figure on Jupyter notebook instead of a dedicated window. You should try that.

from openseespy.

mhscott avatar mhscott commented on May 26, 2024

from openseespy.

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.