con¶
- cfplot.con(f=None, x=None, y=None, fill=True, lines=True, line_labels=True, title=None, colorbar_title=None, colorbar=True, colorbar_label_skip=None, ptype=0, negative_linestyle='solid', blockfill=False, zero_thick=False, colorbar_shrink=None, colorbar_orientation=None, colorbar_position=None, xlog=False, ylog=False, axes=True, xaxis=True, yaxis=True, xticks=None, xticklabels=None, yticks=None, yticklabels=None, xlabel=None, ylabel=None, colors='k', swap_axes=False, verbose=None, linewidths=None, alpha=1.0, colorbar_text_up_down=False, colorbar_fontsize=None, colorbar_fontweight=None, colorbar_text_down_up=False, colorbar_drawedges=True, colorbar_fraction=None, colorbar_thick=None, colorbar_anchor=None, colorbar_labels=None, linestyles=None, zorder=1, level_spacing=None, irregular=None, face_lons=False, face_lats=False, face_connectivity=False, titles=False, mytest=False, transform_first=None, blockfill_fast=None, nlevs=False, orca=None, orca_skip=None, grid=False)[source]¶
- con is the interface to contouring in cf-plot. The minimum use is con(f)where f is a 2 dimensional array. If a cf field is passed then anappropriate plot will be produced i.e. a longitude-latitude orlatitude-height plot for example. If a 2d numeric array is passed thenthe optional arrays x and y can be used to describe the x and y datapoint locations.f - array to contourx - x locations of data in f (optional)y - y locations of data in f (optional)fill=True - colour fill contourslines=True - draw contour lines and labelsline_labels=True - label contour linestitle=title - title for the plotptype=0 - plot type - not needed for cf fields.0 = no specific plot type,1 = longitude-latitude,2 = latitude - height,3 = longitude - height,4 = latitude - time,5 = longitude - time6 = rotated polenegative_linestyle='solid' - set to one of 'solid', 'dashed'zero_thick=False - add a thick zero contour line. Set to 3 for example.blockfill=False - set to True for a blockfill plotcolorbar_title=colbar_title - title for the colour barcolorbar=True - add a colour bar if a filled contour plotcolorbar_label_skip=None - skip colour bar labels. Set to 2 to skipevery other label.colorbar_orientation=None - options are 'horizontal' and 'vertical'The default for most plots is horizontal butfor polar stereographic plots this is vertical.colorbar_shrink=None - value to shrink the colorbar by. If the colorbarexceeds the plot area then values of 1.0, 0.55or 0.5m may help it better fit the plot area.colorbar_position=None - position of colorbar[xmin, ymin, x_extent,y_extent] in normalisedcoordinates. Use when a common colorbaris required for a set of plots. A typical setof values would be [0.1, 0.05, 0.8, 0.02]colorbar_fontsize=None - text size for colorbar labels and titlecolorbar_fontweight=None - font weight for colorbar labels and titlecolorbar_text_up_down=False - if True horizontal colour bar labels alternateabove (start) and below the colour barcolorbar_text_down_up=False - if True horizontal colour bar labels alternatebelow (start) and above the colour barcolorbar_drawedges=True - draw internal divisions in the colorbarcolorbar_fraction=None - space for the colorbar - default = 0.21, in normalisedcoordinatescolorbar_thick=None - thickness of the colorbar - default = 0.015, in normalisedcoordinatescolorbar_anchor=None - default=0.5 - anchor point of colorbar within the fraction space.0.0 = close to plot, 1.0 = further awaycolorbar_labels=None - labels to use for colorbar. The default is to use the contourlevels as labelscolorbar_text_up_down=False - on a horizontal colorbar alternate thelabels top and bottom starting in the up positioncolorbar_text_down_up=False - on a horizontal colorbar alternate thelabels bottom and top starting in the bottom positioncolorbar_drawedges=True - draw internal delimeter lines in the colorbarcolors='k' - contour line colors - takes one or many values.xlog=False - logarithmic x axisylog=False - logarithmic y axisaxes=True - plot x and y axesxaxis=True - plot xaxisyaxis=True - plot y axisxticks=None - xtick positionsxticklabels=None - xtick labelsyticks=None - y tick positionsyticklabels=None - ytick labelsxlabel=None - label for x axisylabel=None - label for y axisswap_axes=False - swap plotted axes - only valid for X, Y, Z vs T plotsverbose=None - change to 1 to get a verbose listing of what conis doinglinewidths=None - contour linewidths. Either a single number for alllines or array of widthslinestyles=None - takes 'solid', 'dashed', 'dashdot' or 'dotted'alpha=1.0 - transparency setting. The default is no transparency.zorder=1 - order of drawinglevel_spacing=None - Default of 'linear' level spacing. Also takes 'log', 'loglike','outlier' and 'inspect'irregular=None - flag for contouring irregular dataface_lons=None - longitude points for face verticesface_lats=None - latitude points for face verticiesface_connectivity=None - connectivity for face verticiestitles=False - set to True to have a dimensions titletransform_first=None - Cartopy should transform the points before calling the contouring algorithm,which can have a significant impact on speed (it is much faster to transformpoints than it is to transform patches) If this is unset and the number of pointsin the x direction is > 400 then it is set to True.blockfill_fast=None - Use pcolormesh blockfill. This is possibly less reliable that the usual code but isfaster for higher resolution datasetsnlevs=False - Let Matplotlib work out the levels for the contour plotorca=None - User specifies this is an orca tripolar grid. Internally cf-plot tries to detect this by lookingfor a single discontinuity in the logitude 2D array. If found a fix it make to the longitudes sothat they are no longer discontinuous.orca_skip=None - Only plot every nth grid point in the 2D longitude and latitude arrays. This is useful for whenplotting his resolution data over the whole globe which would otherwise be very slow to visualize.grid=False - Draw a grid on the map using the parameters set by cfp.setvars. Defaults are grid_x_spacing=60,grid_y_spacing=30, grid_colour='k', grid_linestyle = '--', grid_thickness=1.0
- Returns:
None