Changeset 4057e06 in sasmodels for sasmodels/jitter.py


Ignore:
Timestamp:
Mar 4, 2019 3:17:36 PM (5 years ago)
Author:
GitHub <noreply@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
cff2939
Parents:
275511c (diff), 8064d5e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Paul Kienzle <pkienzle@…> (03/04/19 15:17:36)
git-committer:
GitHub <noreply@…> (03/04/19 15:17:36)
Message:

Merge branch 'py3' into webgl_jitter_viewer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/jitter.py

    r275511c r4057e06  
    964964 
    965965def mpl_plot(calculator, draw_shape, size, view, jitter, dist, mesh, projection): 
     966    # Note: travis-ci does not support mpl_toolkits.mplot3d, but this shouldn't be 
     967    # an issue since we are lazy-loading the package on a path that isn't tested. 
    966968    import mpl_toolkits.mplot3d  # Adds projection='3d' option to subplot 
     969    import matplotlib as mpl 
    967970    import matplotlib.pyplot as plt 
    968971    from matplotlib.widgets import Slider 
    969  
     972     
    970973    ## create the plot window 
    971974    #plt.hold(True) 
     
    982985        pass 
    983986 
    984     #axcolor = {'facecolor': 'lightgoldenrodyellow'} 
    985     axcolor = {} 
     987 
     988    # CRUFT: use axisbg instead of facecolor for matplotlib<2 
     989    facecolor_prop = 'facecolor' if mpl.__version__ > '2' else 'axisbg' 
     990    props = {facecolor_prop: 'lightgoldenrodyellow'} 
    986991 
    987992    ## add control widgets to plot 
    988     axes_theta = plt.axes([0.1, 0.15, 0.45, 0.04], **axcolor) 
    989     axes_phi = plt.axes([0.1, 0.1, 0.45, 0.04], **axcolor) 
    990     axes_psi = plt.axes([0.1, 0.05, 0.45, 0.04], **axcolor) 
    991     stheta = Slider(axes_theta, u'Ξ', -90, 90, valinit=0) 
    992     sphi = Slider(axes_phi, u'φ', -180, 180, valinit=0) 
    993     spsi = Slider(axes_psi, u'ψ', -180, 180, valinit=0) 
    994  
    995     axes_dtheta = plt.axes([0.75, 0.15, 0.15, 0.04], **axcolor) 
    996     axes_dphi = plt.axes([0.75, 0.1, 0.15, 0.04], **axcolor) 
    997     axes_dpsi = plt.axes([0.75, 0.05, 0.15, 0.04], **axcolor) 
     993    axes_theta = plt.axes([0.1, 0.15, 0.45, 0.04], **props) 
     994    axes_phi = plt.axes([0.1, 0.1, 0.45, 0.04], **props) 
     995    axes_psi = plt.axes([0.1, 0.05, 0.45, 0.04], **props) 
     996    stheta = Slider(axes_theta, 'Theta', -90, 90, valinit=theta) 
     997    sphi = Slider(axes_phi, 'Phi', -180, 180, valinit=phi) 
     998    spsi = Slider(axes_psi, 'Psi', -180, 180, valinit=psi) 
     999 
     1000    axes_dtheta = plt.axes([0.75, 0.15, 0.15, 0.04], **props) 
     1001    axes_dphi = plt.axes([0.75, 0.1, 0.15, 0.04], **props) 
     1002    axes_dpsi = plt.axes([0.75, 0.05, 0.15, 0.04], **props) 
     1003 
    9981004    # Note: using ridiculous definition of rectangle distribution, whose width 
    9991005    # in sasmodels is sqrt(3) times the given width.  Divide by sqrt(3) to keep 
Note: See TracChangeset for help on using the changeset viewer.