Dual-pol H-alpha plot (plot_h_alpha_dp) — PolSARtools 0.10 documentation

Skip to main content
`Ctrl`+`K`

# Dual-pol H-alpha plot (`plot_h_alpha_dp`)

polsartools.plot_h_alpha_dp(h, alpha, ppath=None, cmap='viridis', colorbar=True, norm='', grey_region=True, gridsize=300)

  Generates and saves a hexbin density plot of entropy (H) versus alpha (degrees) for dual-pol data.

  ## Example:

      >>> plot_h_alpha_dp(h, alpha, ppath="HA_plot.png", cmap='jet', colorbar=True, norm='log')
      This will generates a H/Alpha plot  from the input arrays and save it as HA_plot.png, using the 'jet' colormap and logarithmic normalization

  ## Parameters:

  harray-like

    Array representing entropy values.

  alphaarray-like

    Array representing alpha values in degrees.

  ppathstr, optional

    Path to save the generated plot. If a folder is given, the plot is saved as ‘halpha_plot_dp.png’ inside that folder. If the file already exists, it will be overwritten.

  cmapstr, optional

    Colormap used for the hexbin plot. Defaults to ‘viridis’.

  colorbarbool, optional

    If True, displays a colorbar representing sample count. Defaults to True.

  normstr, optional

    If set to ‘log’, applies logarithmic normalization to the hexbin plot.

  grey_regionbool, optional

    If True, fills non-feasible regions of the plot with a grey color to indicate feasible boundaries. Defaults to True.

  gridsizeint, optional

    Number of hexagonal bins used in the plot. Higher values result in finer binning. Defaults to 300.

  ## Returns:

  None

    Displays the plot and optionally saves it to the specified location.

  ## Notes:

  - Uses get_feas_bounds() to obtain feasible boundary curves for plotting.

  - If norm is ‘log’, a LogNorm() normalization is applied.