def make_meshgrid(x, y, h=0.02):
    'Create a mesh of points to plot in\n\n        Parameters\n        ----------\n        x: data to base x-axis meshgrid on\n        y: data to base y-axis meshgrid on\n        h: stepsize for meshgrid, optional\n\n        Returns\n        -------\n        xx, yy : ndarray\n        '
    (x_min, x_max) = ((x.min() - 1), (x.max() + 1))
    (y_min, y_max) = ((y.min() - 1), (y.max() + 1))
    (xx, yy) = np.meshgrid(np.arange(x_min, x_max, h), np.arange(y_min, y_max, h))
    return (xx, yy)
Create a mesh of points to plot in

Parameters
----------
x: data to base x-axis meshgrid on
y: data to base y-axis meshgrid on
h: stepsize for meshgrid, optional

Returns
-------
xx, yy : ndarray
def make_meshgrid(x, y, h=0.02):
    'Create a mesh of points to plot in\n\n        Parameters\n        ----------\n        x: data to base x-axis meshgrid on\n        y: data to base y-axis meshgrid on\n        h: stepsize for meshgrid, optional\n\n        Returns\n        -------\n        xx, yy : ndarray\n        '
    (x_min, x_max) = ((x.min() - 1), (x.max() + 1))
    (y_min, y_max) = ((y.min() - 1), (y.max() + 1))
    (xx, yy) = np.meshgrid(np.arange(x_min, x_max, h), np.arange(y_min, y_max, h))
    return (xx, yy)