In [12]:
import iris
iris.FUTURE.netcdf_promote = True
print(iris.__version__)

import os.path

os.path.abspath(iris.__file__)


1.7.2-DEV
Out[12]:
'/home/usgs/anaconda/lib/python2.7/site-packages/iris/__init__.pyc'

In [13]:
%load_ext pymatbridge


The pymatbridge extension is already loaded. To reload it, use:
  %reload_ext pymatbridge

In [14]:
import iris.plot as iplt
import matplotlib.pyplot as plt


def plot_profile(c):
    coord = c.coord('sea_surface_height_above_reference_ellipsoid')
    lon = c.coord(axis='X').points.squeeze()
    lat = c.coord(axis='Y').points.squeeze()
    depth = coord.points.min()
    
    fig, ax = plt.subplots(figsize=(5, 6))
    kw = dict(linewidth=2,  color=(.3, .4, .5),
              alpha=0.75, marker='o', label='iris')
    iplt.plot(c, coord, **kw)
    ax.grid()
    ax.set_ylabel('{} ({})'.format(coord.standard_name, coord.units))
    ax.set_xlabel('{} ({})'.format(c.name(), c.units))
    ax.set_title('lon: %s\nlat: %s\nMax depth = %s' % (lon, lat, depth))
    return fig, ax

In [15]:
a=2

In [16]:
%%matlab -i a -o b
b=a^3;

In [17]:
print b


8

In [19]:
%%matlab
peaks;
colorbar;


 
z =  3*(1-x).^2.*exp(-(x.^2) - (y+1).^2) ... 
   - 10*(x/5 - x.^3 - y.^5).*exp(-x.^2-y.^2) ... 
   - 1/3*exp(-(x+1).^2 - y.^2) 
 

In [ ]: