arkouda.plotting ================ .. py:module:: arkouda.plotting Functions --------- .. autoapisummary:: arkouda.plotting.hist_all arkouda.plotting.plot_dist Module Contents --------------- .. py:function:: hist_all(ak_df: arkouda.dataframe.DataFrame, cols: list = []) Create a grid of histograms for numeric columns in an Arkouda DataFrame. :param ak_df: An Arkouda DataFrame containing the data to visualize. :type ak_df: ak.DataFrame :param cols: A list of column names to plot. If empty or not provided, all columns in the DataFrame are considered. :type cols: list of str, optional .. rubric:: Notes This function uses matplotlib to display a grid of histograms. It attempts to select a suitable number of bins using Doane's formula. Columns with non-numeric types will be grouped and encoded before plotting. .. rubric:: Examples >>> import arkouda as ak >>> import numpy as np >>> from arkouda.plotting import hist_all >>> ak_df = ak.DataFrame({ ... "a": ak.array(np.random.randn(100)), ... "b": ak.array(np.random.randn(100)), ... "c": ak.array(np.random.randn(100)), ... "d": ak.array(np.random.randn(100)) ... }) >>> hist_all(ak_df) .. py:function:: plot_dist(b, h, log=True, xlabel=None, newfig=True) Plot the distribution and cumulative distribution of histogram Data. :param b: Bin edges :type b: np.ndarray :param h: Histogram data :type h: np.ndarray :param log: use log to scale y :type log: bool :param xlabel: Label for the x axis of the graph :type xlabel: str :param newfig: Generate a new figure or not :type newfig: bool .. rubric:: Notes This function does not return or display the plot. A user must have matplotlib imported in addition to arkouda to display plots. This could be updated to return the object or have a flag to show the resulting plots. See Examples Below. .. rubric:: Examples >>> import arkouda as ak >>> from matplotlib import pyplot as plt >>> b, h = ak.histogram(ak.arange(10), 3) >>> h = h[:-1] >>> ak.plot_dist(b.to_ndarray(), h.to_ndarray()) Show the plot: >>> plt.show()