gcpy.plot.six_plot

gcpy.plot.six_plot(subplot, all_zero, all_nan, plot_val, grid, axes, rowcol, title, comap, unit, extent, masked_data, other_all_nan, gridtype, vmins, vmaxs, use_cmap_RdBu, match_cbar, verbose, log_color_scale, pedge=array([[-1]]), pedge_ind=array([[-1]]), log_yaxis=False, xtick_positions=None, xticklabels=None, plot_type='single_level', ratio_log=False, proj=<Projected CRS: +proj=eqc +ellps=WGS84 +a=6378137.0 +lon_0=0.0 +to ...> Name: unknown Axis Info [cartesian]: - E[east]: Easting (unknown) - N[north]: Northing (unknown) - h[up]: Ellipsoidal height (metre) Area of Use: - undefined Coordinate Operation: - name: unknown - method: Equidistant Cylindrical Datum: Unknown based on WGS 84 ellipsoid - Ellipsoid: WGS 84 - Prime Meridian: Greenwich, ll_plot_func='imshow', **extra_plot_args)[source]

Plotting function to be called from compare_single_level or compare_zonal_mean. Primarily exists to eliminate code redundancy in the prior listed functions and has not been tested separately.

Parameters:
  • subplot (str) – Type of plot to create (ref, dev, absolute difference or fractional difference).

  • all_zero (bool) – Set this flag to True if the data to be plotted consist only of zeros.

  • all_nan (bool) – Set this flag to True if the data to be plotted consist only of NaNs.

  • plot_val (xarray.DataArray or numpy.ndarray or dask.array.Array) – Single data variable to plot.

  • grid (dict) – Dictionary mapping plot_val to plottable coordinates.

  • axes (matplotlib.axes.Axes) – Axes object to plot information. Will create a new axes if none is passed.

  • rowcol (tuple) – Subplot position in overall Figure.

  • title (str) – Title to print on axes.

  • comap (matplotlib.colors.Colormap) – Colormap for plotting data values.

  • unit (str) – Units of plotted data.

  • extent (tuple of float) – Describes minimum and maximum latitude and longitude of input data in the form (minlon, maxlon, minlat, maxlat).

  • masked_data (numpy.ndarray) – Masked area for cubed-sphere plotting.

  • other_all_nan (bool) – Set this flag to True if plotting ref/dev and the other of ref/dev is all nan.

  • gridtype (str) – “ll” for lat/lon or “cs” for cubed-sphere.

  • vmins (list of float) – List of length 3 of minimum ref value, dev value, and minimum of both (for use with match_cbar=True).

  • vmaxs (list of float) – List of length 3 of maximum ref value, dev value, and maximum of both (for use with match_cbar=True).

  • use_cmap_RdBu (bool) – Set this flag to True to use a blue-white-red colormap.

  • match_cbar (bool) – Set this flag to True if you are plotting with the same colorbar for ref and dev.

  • verbose (bool) – Set this flag to True to enable informative printout.

  • log_color_scale (bool) – Set this flag to True to enable log-scale colormapping.

  • pedge (numpy.ndarray, optional) – Edge pressures of grid cells in data to be plotted. Default value: np.full((1,1), -1)

  • pedge_ind (numpy.ndarray, optional) – Indices where edge pressure values are within a given pressure range. Default value: np.full((1,1), -1)

  • log_yaxis (bool, optional) – Set this flag to True to enable log scaling of pressure in zonal mean plots. Default value: False

  • xtick_positions (list of float, optional) – Locations of lat/lon or lon ticks on plot. Default value: None

  • xticklabels (list of str, optional) – Labels for lat/lon ticks. Default value: None

  • plot_type (str, optional) – Type of plot, either “single_level” or “zonal_mean”. Default value: “single_level”

  • ratio_log (bool, optional) – Set this flag to True to enable log scaling for ratio plots. Default value: False

  • proj (cartopy.crs.Projection, optional) – Projection for plotting data. Default value: ccrs.PlateCarree()

  • ll_plot_func (str, optional) – Function to use for lat/lon single level plotting with possible values ‘imshow’ and ‘pcolormesh’. imshow is much faster but is slightly displaced when plotting from dateline to dateline and/or pole to pole. Default value: ‘imshow’

  • **extra_plot_args – Any extra keyword arguments are passed through the plotting functions to be used in calls to pcolormesh() (CS) or imshow() (Lat/Lon).