mayavi | 3D visualization of scientific data in Python | Data Visualization library

 by   enthought Python Version: 4.7.3 License: Non-SPDX

kandi X-RAY | mayavi Summary

kandi X-RAY | mayavi Summary

mayavi is a Python library typically used in Analytics, Data Visualization applications. mayavi has build file available and it has high support. However mayavi has 26 bugs, it has 5 vulnerabilities and it has a Non-SPDX License. You can download it from GitHub.

3D visualization of scientific data in Python
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              mayavi has a highly active ecosystem.
              It has 1126 star(s) with 268 fork(s). There are 97 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 419 open issues and 423 have been closed. On average issues are closed in 32 days. There are 4 open pull requests and 0 closed requests.
              It has a positive sentiment in the developer community.
              The latest version of mayavi is 4.7.3

            kandi-Quality Quality

              mayavi has 26 bugs (0 blocker, 0 critical, 23 major, 3 minor) and 905 code smells.

            kandi-Security Security

              mayavi has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              OutlinedDot
              mayavi code analysis shows 5 unresolved vulnerabilities (5 blocker, 0 critical, 0 major, 0 minor).
              There are 26 security hotspots that need review.

            kandi-License License

              mayavi has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              mayavi releases are available to install and integrate.
              Build file is available. You can build the component from source.
              mayavi saves you 43313 person hours of effort in developing the same functionality from scratch.
              It has 51159 lines of code, 3889 functions and 569 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed mayavi and discovered the below as its top functions. This is intended to give you an instant insight into mayavi implemented functionality, and help decide if they suit your requirements.
            • Plot the camera view
            • Returns the bounds of the outline
            • Get an Engine instance
            • Returns the camera direction of the camera
            • Print usage message
            • Decorate an animation function
            • Save a scene
            • Update the subdirectory
            • Start recording
            • Convert array to vtkCellArray
            • Handle key press events
            • Write the vtkDataArray to the vtk file
            • Move the view
            • Create the VTK control window
            • Default actions
            • Render Mlab examples
            • Decorator that shows the given function
            • Convert vtkArray to numpy array
            • Run the program
            • Update the volume
            • Flips the normals of the STL file
            • Calculate magnetic field
            • Write the points to out
            • Generate code
            • Probes the data at the given coordinates
            • Write the vtk object to the vtk file
            Get all kandi verified functions for this library.

            mayavi Key Features

            No Key Features are available at this moment for mayavi.

            mayavi Examples and Code Snippets

            No Code Snippets are available at this moment for mayavi.

            Community Discussions

            QUESTION

            Is Pyvista a complete library already? [January 2021]
            Asked 2021-Feb-18 at 01:35

            I was searching for new visualization libraries in Python, and I learned about the existence of Pyvista. The examples I've seen look amazing.

            I used to work with Mayavi a few years ago, but Pyvista seems very tempting. Are the features in Pyvista really as well-rounded as traditional libraries like Mayavi, etc.?

            The question can seem opinion-based, but sometimes new libraries need a few years to become complete. I learned this the hard way with some CAD packages.

            I intend to use Mayavi to post-process results from CFD simulations (computational fluid dynamics). Please let me know your opinions.

            Thanks in advance,

            ...

            ANSWER

            Answered 2021-Feb-18 at 01:35

            As PyVista is just a wrapper for VTK it's safe to say that you are not restricted in what is possible.

            I found the move from Mayavi to Pyvista really straight forward. The library has a couple of functions that allows you to convert your existing data structure into VTK friendly structures quite easily. And if you were a fan of Mayavi's pipeline work there is something similar in PyVista where you can add on different things to do plotter.

            I hope that helps. Also, join the slack channel if you want to ask any questions / see what other people are using it for.

            Source https://stackoverflow.com/questions/65659293

            QUESTION

            Creating a fence diagram in Mayavi or Matplotlib
            Asked 2020-Nov-16 at 17:11

            working with Matplotlib I have produced some resistivity cross sections of the soil, obtaining pictures like this:

            Now I would like to display all those sections in 3D so as to visualise better the spatial distribution of resistivity in the field (i.e. a so-called fence diagram). I would also like to plot the 2D map of the site where those measurements were carried out at the base of my plot (say on the XY plane). As far as I have seen this is not feasible (or at least not convenient) with Matplotlib in 3D hence I decided to switch to Mayavi. My questions are:

            1. is it feasible georeferenced rasters and then properly place them on the correct (vertical) planes (not necessarily parallel to the cartesian ones) with Mayavi? Does imshow() serves this purpose?
            2. is it better to recreate the contours in Mayavi at the proper locations? If this is the case I did not find a function to create contours from unstructured data (the input images were created with tricontour/tricontourf in Matplotlib). I do not think interpolating over a structured grid in scipy would do, given the non convex domain.
            ...

            ANSWER

            Answered 2020-Nov-16 at 17:11

            Ok, answering my own question:

            Source https://stackoverflow.com/questions/64855806

            QUESTION

            How to rotate actor on tvtk rendered scene with Mayavi in Python?
            Asked 2020-Nov-05 at 10:30

            I played a bit with Mayavi and particularly with tvtk but I struggle finding examples in which glyphs are placed on the scene at different orientation than default.

            Based on this example I prepared the following scene with two cyllinders, one red and one blue,

            ...

            ANSWER

            Answered 2020-Nov-05 at 10:30

            Ok, it turned out Actor accepts orientation argument which is in degrees (not in radians!). Also, the position of the actor has to be specified when actor is created and not when glyph is created!

            Source https://stackoverflow.com/questions/64639371

            QUESTION

            Saving a 3D graph generated in Networkx to VTK format for viewing in Paraview
            Asked 2020-Jul-19 at 13:11

            I have generated a 3D graph network using the following code and Mayavi has been used for visualization.

            ...

            ANSWER

            Answered 2020-Jul-19 at 13:11

            If you're ok with using vedo, which is built on top of vtk, this becomes easy:

            Source https://stackoverflow.com/questions/62888678

            QUESTION

            Mayavi imshow obscures quiver3d
            Asked 2020-Jul-19 at 03:15

            I am trying to overlay a quiver3d plot over an imshow plot in mayavi. The code I am using looks something like this:

            ...

            ANSWER

            Answered 2020-Jul-19 at 03:15

            OK, so the solution wound up being switching to nvidia graphics. I was running the code on a laptop with a GeForce GTX 1050 maxQ GPU and Intel on-board graphics. With on-board graphics (sudo prime-select intel), I get the bug, when I switch to dedicated graphics (sudo prime-select nvidia) I get the desired output.

            Source https://stackoverflow.com/questions/62907389

            QUESTION

            installing mayavi errors out with exit status -11
            Asked 2020-Jul-18 at 15:26

            On Fedora 31, I tried to install mayavi with pip

            ...

            ANSWER

            Answered 2020-Jul-14 at 18:12

            I had this same issue on Ubuntu 20.04. I was not able not able to install from pypi. I had to get the source and install via git:

            Source https://stackoverflow.com/questions/62878257

            QUESTION

            How to execute a batch script from an anaconda virtual environment (not from base)?
            Asked 2020-Jun-16 at 21:22

            I want to run a batch file in a Conda environment, not in the base env, but in another virtual environment (here pylayers). I copied the activate.bat script from F:\Anaconda3\Scripts to F:\Anaconda3\envs\pylayers\Scripts.

            And my batch script (installer_win.bat) is:

            ...

            ANSWER

            Answered 2020-Jun-15 at 00:59

            To run a bat file from a dos prompt inside a new (non-base) conda env, you can try something like this:

            prompt> cmd "/c activate ds_tensorflow && myfile.bat && deactivate"

            contents of myfile.bat to show you are in the non-base env:

            Source https://stackoverflow.com/questions/62377906

            QUESTION

            Issue with dependencies -- ImportError: cannot import name getfullargspec
            Asked 2020-May-15 at 20:14

            I'm trying to use mayavi in python to visualize a pointcloud, and cannot resolve this error. I'm sure it is an easy pip install, but I am unsure of the command. Any help is much appreciated! Thanks!

            BTW, I am running Ubuntu 18.04 and have tried installing scipy as mentioned here: Python import error "getfullargspec". I have also ran pip install traitsui. Additionally, I have rebooted my system.

            Update: After further digging, it appears that it may be an issue with Python versions. I was able to get it to run with Python3, but not Python 2.7 (I need it to work with python 2). I have also tried modifying the code within handler.py to getargspec instead of getfullargspec. I was given an error about trait_factory by doing this

            Here is the entire printout:

            ...

            ANSWER

            Answered 2020-May-15 at 20:14

            The solution for this problem was to use older packages. Not all of the dependencies such as traitsui are compatible with Python 2.7. Even though an older version of mayavi was installed, the dependencies that are installed automatically are not compatible (they only support Python 3).

            Here are the versions that work well together for me:

            mayavi==4.6.2

            traitsui==6.1.3

            traits==5.2.0

            numpy==1.17.4

            pyface==6.1.2

            To install a specific version, just run sudo pip install packageName==#.#.#

            Source https://stackoverflow.com/questions/61739135

            QUESTION

            Using Mayavi mlab over VNC Throws OpenGL error
            Asked 2020-May-07 at 16:16

            I'm having some difficulty using Mayavi mlab in python with PyCharm IDE from the MNE-Python environment. I access the Conda environment with Mayavi and VTK over a VNC session using a xvnc server from my local MacOS to a Linux cluster machine.

            The error I get when opening a mlab window is:

            ...

            ANSWER

            Answered 2020-Apr-25 at 14:15

            I am unable to reproduce. Have you made sure that the machine you are accessing has available and loaded up-to-date graphics drivers and/or Mesa software? As an example, I am using TurboVNC to access a remote Ubuntu 18.04 machine, and I am able to produce the Spherical Harmonics Gallery Example both through the regular and envisage Mayavi backends. However, using the default settings of TurboVNC, the rendered scene has artefacts and saving the scene as png yields a black image, which I guess is a consequence of Mesa being used (llvmpipe). If I either start TurboVNC with -extension GLX or if I simply prepend vglrun to the python3 command, which calls VirtualGL, then OpenGL is used and the rendered scene is flawless. I attach the screenshot and saved figures below.

            Source https://stackoverflow.com/questions/61114076

            QUESTION

            Mayavi : setting pipeline.tube radius
            Asked 2020-Apr-27 at 13:19

            I'm plotting a 3D network using Mayavi,

            ...

            ANSWER

            Answered 2020-Apr-27 at 13:19

            Is seems to me that you can't plot multiple tubes with different diameter at once. So one solution is to plot them one after another:

            Source https://stackoverflow.com/questions/61442388

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install mayavi

            You can download it from GitHub.
            You can use mayavi like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/enthought/mayavi.git

          • CLI

            gh repo clone enthought/mayavi

          • sshUrl

            git@github.com:enthought/mayavi.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link