Beispiel #1
0
Sat2d[~masknan] = np.NaN
var = "SATchl"
layer = Layer(0, 10)

fig, ax = mapplot(
    {"varname": var, "clim": [0, 0.4], "layer": layer, "data": Sat2d, "date": "annual"},
    fig=None,
    ax=None,
    mask=TheMask,
    coastline_lon=clon,
    coastline_lat=clat,
)
ax.set_xlim([-5, 36])
ax.set_ylim([30, 46])
ax.set_xlabel("Lon").set_fontsize(12)
ax.set_ylabel("Lat").set_fontsize(12)
ax.ticklabel_format(fontsize=10)
ax.text(
    -4, 44.5, var + " [mg /m^3]", horizontalalignment="left", verticalalignment="center", fontsize=14, color="black"
)
ax.text(
    -4, 32, "Ave:" + layer.string(), horizontalalignment="left", verticalalignment="center", fontsize=13, color="black"
)
outfile = OUTPUTDIR + "Map_" + var + "_" + req_label + "_Ave" + layer.longname() + ".png"
ax.xaxis.set_ticks(np.arange(-2, 36, 6))
ax.yaxis.set_ticks(np.arange(30, 46, 4))
ax.text(-4, 30.5, req_label, horizontalalignment="left", verticalalignment="center", fontsize=13, color="black")
ax.grid()
fig.savefig(outfile)
pl.close(fig)
Beispiel #2
0
    fig,ax = mapplot({'varname':var, 'clim':[0,0.4], \
                      'layer':layer, 'data':Sat2d, 'date':'annual'}, \
                     fig=None,ax=None, \
                     mask=TheMask, \
                     coastline_lon=clon, \
                     coastline_lat=clat)
    ax.set_xlim([-5,36])
    ax.set_ylim([30,46])
    ax.set_xlabel('Lon').set_fontsize(12)
    ax.set_ylabel('Lat').set_fontsize(12)
    ax.ticklabel_format(fontsize=10)
    ax.text(-4,44.5,var + ' [mg /m^3]', \
            horizontalalignment='left', \
            verticalalignment='center', \
            fontsize=14, color='black')
    ax.text(-4,32,'Ave:' + layer.string() , \
            horizontalalignment='left', \
            verticalalignment='center', \
            fontsize=13, color='black')
    outfile = OUTPUTDIR + "Map_" + var + "_" + req_label + \
              "_Ave" + layer.longname() + ".png"
    ax.xaxis.set_ticks(np.arange(-2,36,6))
    ax.yaxis.set_ticks(np.arange(30,46,4))
    ax.text(-4,30.5,req_label, \
            horizontalalignment='left', \
            verticalalignment='center', \
            fontsize=13, color='black')
    ax.grid()
    fig.savefig(outfile)
    pl.close(fig)