def plot_assets(calc_id=-1, site_model=False):
    """
    Plot the sites and the assets
    """
    # NB: matplotlib is imported inside since it is a costly import
    import matplotlib.pyplot as p
    from openquake.hmtk.plotting.patch import PolygonPatch
    dstore = util.read(calc_id)
    try:
        region = dstore['oqparam'].region
    except KeyError:
        region = None
    sitecol = dstore['sitecol']
    try:
        assetcol = dstore['assetcol'].value
    except AttributeError:
        assetcol = dstore['assetcol'].array
    fig = p.figure()
    ax = fig.add_subplot(111)
    if region:
        pp = PolygonPatch(shapely.wkt.loads(region), alpha=0.1)
        ax.add_patch(pp)
    ax.grid(True)
    if site_model and 'site_model' in dstore:
        sm = dstore['site_model']
        sm_lons, sm_lats = sm['lon'], sm['lat']
        if len(sm_lons) > 1 and cross_idl(*sm_lons):
            sm_lons %= 360
        p.scatter(sm_lons, sm_lats, marker='.', color='orange')
    p.scatter(sitecol.complete.lons, sitecol.complete.lats, marker='.',
              color='gray')
    p.scatter(assetcol['lon'], assetcol['lat'], marker='.', color='green')
    p.scatter(sitecol.lons, sitecol.lats, marker='+', color='black')
    if 'discarded' in dstore:
        disc = numpy.unique(dstore['discarded'].value[['lon', 'lat']])
        p.scatter(disc['lon'], disc['lat'], marker='x', color='red')
    p.show()
Plot the sites and the assets