Commit b49ece73 by Gustavo Pinzon

### Update tools/plotting/orientationPlotter.py

parent 0523738d
Pipeline #68968 passed with stages
in 27 minutes and 19 seconds
 ... ... @@ -967,7 +967,7 @@ def plotSphericalHistogram(orientations, numberOfPoints = orientations.shape[0] # Check that they are 3D vectors if orientations.shape[1] != 3: print('\nspam.helpers.orientationPlotter.pllotSphericalHistogram: The input vectors are not 3D') print('\nspam.helpers.orientationPlotter.plotSphericalHistogram: The input vectors are not 3D') return # from http://stackoverflow.com/questions/2850743/numpy-how-to-quickly-normalize-many-vectors norms = numpy.apply_along_axis(numpy.linalg.norm, 1, orientations ) ... ... @@ -977,15 +977,15 @@ def plotSphericalHistogram(orientations, orientations = numpy.vstack([orientations, -1*orientations]) # Create the icosphere if verbose: print('\nspam.helpers.orientationPlotter.pllotSphericalHistogram: Creating the icosphere') print('\nspam.helpers.orientationPlotter.plotSphericalHistogram: Creating the icosphere') icoVerts, icoFaces, icoVectors = createIcosphere(subDiv) # Bin the data if verbose: print('\nspam.helpers.orientationPlotter.pllotSphericalHistogram: Binning the data') print('\nspam.helpers.orientationPlotter.plotSphericalHistogram: Binning the data') counts = binIcosphere(orientations, icoVectors, verbose = verbose) # Now we are ready to plot if verbose: print('\nspam.helpers.orientationPlotter.pllotSphericalHistogram: Plotting') print('\nspam.helpers.orientationPlotter.plotSphericalHistogram: Plotting') # Create the figure fig = matplotlib.pyplot.figure() ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!