fractopo.analysis.azimuth module
Functions for plotting rose plots.
- class fractopo.analysis.azimuth.AzimuthBins(bin_width, bin_locs, bin_heights)
Bases:
object
Dataclass for azimuth rose plot bin data.
-
bin_heights:
ndarray
-
bin_locs:
ndarray
-
bin_width:
float
-
bin_heights:
- fractopo.analysis.azimuth.decorate_azimuth_ax(ax, label, length_array, set_array, set_names, set_ranges, axial, visualize_sets, append_azimuth_set_text=False, add_abundance_order=False)
Decorate azimuth rose plot ax.
- fractopo.analysis.azimuth.determine_azimuth_bins(azimuth_array, length_array=None, bin_multiplier=1, axial=True)
Calculate azimuth bins for plotting azimuth rose plots.
E.g.
>>> azimuth_array = np.array([25, 50, 145, 160]) >>> length_array = np.array([5, 5, 10, 60]) >>> azi_bins = determine_azimuth_bins(azimuth_array, length_array) >>> azi_bins.bin_heights array([ 5, 5, 0, 70]) >>> azi_bins.bin_locs array([ 22.5, 67.5, 112.5, 157.5]) :rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fractopo.analysis.azimuth.AzimuthBins\``
>>> azi_bins.bin_width 45.0
- fractopo.analysis.azimuth.plot_azimuth_ax(bin_width, bin_locs, bin_heights, bar_color, ax, axial=True)
Plot azimuth rose plot to ax.
- fractopo.analysis.azimuth.plot_azimuth_plot(azimuth_array, length_array, azimuth_set_array, azimuth_set_names, azimuth_set_ranges, label, plain, append_azimuth_set_text=False, add_abundance_order=False, axial=True, visualize_sets=False, bar_color='darkgrey')
Plot azimuth rose plot to its own figure.
Returns rose plot bin parameters, figure, ax
- Return type:
Tuple
[AzimuthBins
,Figure
,PolarAxes
]