Index: sasmodels/jitter.py
===================================================================
--- sasmodels/jitter.py	(revision 275511c8966895da18ab75cc317285c01a97be2b)
+++ sasmodels/jitter.py	(revision 275511c8966895da18ab75cc317285c01a97be2b)
@@ -964,8 +964,11 @@
 
 def mpl_plot(calculator, draw_shape, size, view, jitter, dist, mesh, projection):
+    # Note: travis-ci does not support mpl_toolkits.mplot3d, but this shouldn't be
+    # an issue since we are lazy-loading the package on a path that isn't tested.
     import mpl_toolkits.mplot3d  # Adds projection='3d' option to subplot
+    import matplotlib as mpl
     import matplotlib.pyplot as plt
     from matplotlib.widgets import Slider
-
+    
     ## create the plot window
     #plt.hold(True)
@@ -982,18 +985,21 @@
         pass
 
-    #axcolor = {'facecolor': 'lightgoldenrodyellow'}
-    axcolor = {}
+
+    # CRUFT: use axisbg instead of facecolor for matplotlib<2
+    facecolor_prop = 'facecolor' if mpl.__version__ > '2' else 'axisbg'
+    props = {facecolor_prop: 'lightgoldenrodyellow'}
 
     ## add control widgets to plot
-    axes_theta = plt.axes([0.1, 0.15, 0.45, 0.04], **axcolor)
-    axes_phi = plt.axes([0.1, 0.1, 0.45, 0.04], **axcolor)
-    axes_psi = plt.axes([0.1, 0.05, 0.45, 0.04], **axcolor)
-    stheta = Slider(axes_theta, u'Îž', -90, 90, valinit=0)
-    sphi = Slider(axes_phi, u'Ï', -180, 180, valinit=0)
-    spsi = Slider(axes_psi, u'Ï', -180, 180, valinit=0)
-
-    axes_dtheta = plt.axes([0.75, 0.15, 0.15, 0.04], **axcolor)
-    axes_dphi = plt.axes([0.75, 0.1, 0.15, 0.04], **axcolor)
-    axes_dpsi = plt.axes([0.75, 0.05, 0.15, 0.04], **axcolor)
+    axes_theta = plt.axes([0.1, 0.15, 0.45, 0.04], **props)
+    axes_phi = plt.axes([0.1, 0.1, 0.45, 0.04], **props)
+    axes_psi = plt.axes([0.1, 0.05, 0.45, 0.04], **props)
+    stheta = Slider(axes_theta, 'Theta', -90, 90, valinit=theta)
+    sphi = Slider(axes_phi, 'Phi', -180, 180, valinit=phi)
+    spsi = Slider(axes_psi, 'Psi', -180, 180, valinit=psi)
+
+    axes_dtheta = plt.axes([0.75, 0.15, 0.15, 0.04], **props)
+    axes_dphi = plt.axes([0.75, 0.1, 0.15, 0.04], **props)
+    axes_dpsi = plt.axes([0.75, 0.05, 0.15, 0.04], **props)
+
     # Note: using ridiculous definition of rectangle distribution, whose width
     # in sasmodels is sqrt(3) times the given width.  Divide by sqrt(3) to keep
Index: sasmodels/kernelcl.py
===================================================================
--- sasmodels/kernelcl.py	(revision f872fd13522af1df2bf929529d37c828956eb8ef)
+++ sasmodels/kernelcl.py	(revision f872fd13522af1df2bf929529d37c828956eb8ef)
@@ -58,6 +58,14 @@
 import time
 
+try:
+    from time import perf_counter as clock
+except ImportError: # CRUFT: python < 3.3
+    import sys
+    if sys.platform.count("darwin") > 0:
+        from time import time as clock
+    else:
+        from time import clock
+
 import numpy as np  # type: ignore
-
 
 # Attempt to setup opencl. This may fail if the pyopencl package is not
@@ -611,5 +619,5 @@
         #Call kernel and retrieve results
         wait_for = None
-        last_nap = time.clock()
+        last_nap = clock()
         step = 1000000//self.q_input.nq + 1
         for start in range(0, call_details.num_eval, step):
@@ -622,5 +630,5 @@
                 # Allow other processes to run
                 wait_for[0].wait()
-                current_time = time.clock()
+                current_time = clock()
                 if current_time - last_nap > 0.5:
                     time.sleep(0.001)
Index: sasmodels/resolution.py
===================================================================
--- sasmodels/resolution.py	(revision 9e7837a27701a2e9059daf0ed4b8c5127a10bf59)
+++ sasmodels/resolution.py	(revision e2592f02ab8e424de77e5b72ae9adfc84b47a185)
@@ -445,10 +445,10 @@
     q = np.sort(q)
     if q_min + 2*MINIMUM_RESOLUTION < q[0]:
-        n_low = np.ceil((q[0]-q_min) / (q[1]-q[0])) if q[1] > q[0] else 15
+        n_low = int(np.ceil((q[0]-q_min) / (q[1]-q[0]))) if q[1] > q[0] else 15
         q_low = np.linspace(q_min, q[0], n_low+1)[:-1]
     else:
         q_low = []
     if q_max - 2*MINIMUM_RESOLUTION > q[-1]:
-        n_high = np.ceil((q_max-q[-1]) / (q[-1]-q[-2])) if q[-1] > q[-2] else 15
+        n_high = int(np.ceil((q_max-q[-1]) / (q[-1]-q[-2]))) if q[-1] > q[-2] else 15
         q_high = np.linspace(q[-1], q_max, n_high+1)[1:]
     else:
@@ -499,10 +499,10 @@
             q_min = q[0]*MINIMUM_ABSOLUTE_Q
         n_low = log_delta_q * (log(q[0])-log(q_min))
-        q_low = np.logspace(log10(q_min), log10(q[0]), np.ceil(n_low)+1)[:-1]
+        q_low = np.logspace(log10(q_min), log10(q[0]), int(np.ceil(n_low))+1)[:-1]
     else:
         q_low = []
     if q_max > q[-1]:
         n_high = log_delta_q * (log(q_max)-log(q[-1]))
-        q_high = np.logspace(log10(q[-1]), log10(q_max), np.ceil(n_high)+1)[1:]
+        q_high = np.logspace(log10(q[-1]), log10(q_max), int(np.ceil(n_high))+1)[1:]
     else:
         q_high = []
Index: sasmodels/weights.py
===================================================================
--- sasmodels/weights.py	(revision 3d5824792e80506c5c40f05fb2ddc2234a8acedf)
+++ sasmodels/weights.py	(revision e2592f02ab8e424de77e5b72ae9adfc84b47a185)
@@ -23,5 +23,5 @@
     default = dict(npts=35, width=0, nsigmas=3)
     def __init__(self, npts=None, width=None, nsigmas=None):
-        self.npts = self.default['npts'] if npts is None else npts
+        self.npts = self.default['npts'] if npts is None else int(npts)
         self.width = self.default['width'] if width is None else width
         self.nsigmas = self.default['nsigmas'] if nsigmas is None else nsigmas
