src/whylogs/viz/matplotlib/visualizer.py
def plot_missing_values(self, variable, ts_format="%d-%b-%y", **kwargs):
        """Plots a Missing Value to Total Count ratio chart."""
        if not self._confirm_profile_data:
            return

        chart_data = self._summary_data_preprocessing(variable)
        chart_data.loc[:, "mv_ratio"] = (
            chart_data.loc[:, "type_null_count"] / chart_data.loc[:, "count"]
        )

        fig, ax = MatplotlibProfileVisualizer._chart_theming()

        # Primary line
        ax.plot(
            chart_data.loc[:, "date"],
            chart_data.loc[:, "mv_ratio"],
            color=self.theme["colors"][0],
            linewidth=1.5,
            label="Missing Value Ratio",
        )

        ax.yaxis.set_label_text(
            "Missing Value to\nTotal Count Ratio", fontweight="bold"
        )
        ax.set_title(f"Missing Values ({variable})", loc="left", fontweight="bold")
        handles, labels = ax.get_legend_handles_labels()
        ax.legend(
            handles,
            labels,
            loc="upper center",
            bbox_to_anchor=(0.5, -0.1),
            frameon=False,
            ncol=3,
        )
        ax.xaxis.set_major_formatter(_dates.DateFormatter(ts_format))
        ax.yaxis.set_major_formatter(
            _ticker.ScalarFormatter(useOffset=False, useMathText=False, useLocale=None)
        )

        return fig
Plots a Missing Value to Total Count ratio chart.
Plots a Missing Value to Total Count ratio chart.
Plots a Missing Value to Total Count ratio chart .
def plot_missing_values(self, variable, ts_format="%d-%b-%y", **kwargs):
        if not self._confirm_profile_data:
            return
        chart_data = self._summary_data_preprocessing(variable)
        chart_data.loc[:, "mv_ratio"] = (
            chart_data.loc[:, "type_null_count"] / chart_data.loc[:, "count"]
        )
        fig, ax = MatplotlibProfileVisualizer._chart_theming()
        ax.plot(
            chart_data.loc[:, "date"],
            chart_data.loc[:, "mv_ratio"],
            color=self.theme["colors"][0],
            linewidth=1.5,
            label="Missing Value Ratio",
        )
        ax.yaxis.set_label_text(
            "Missing Value to\nTotal Count Ratio", fontweight="bold"
        )
        ax.set_title(f"Missing Values ({variable})", loc="left", fontweight="bold")
        handles, labels = ax.get_legend_handles_labels()
        ax.legend(
            handles,
            labels,
            loc="upper center",
            bbox_to_anchor=(0.5, -0.1),
            frameon=False,
            ncol=3,
        )
        ax.xaxis.set_major_formatter(_dates.DateFormatter(ts_format))
        ax.yaxis.set_major_formatter(
            _ticker.ScalarFormatter(useOffset=False, useMathText=False, useLocale=None)
        )
        return fig
def plot_missing_values ( self , variable , ts_format = "%d-%b-%y" , ** kwargs ) : if not self . _confirm_profile_data : return chart_data = self . _summary_data_preprocessing ( variable ) chart_data . loc [ : , "mv_ratio" ] = ( chart_data . loc [ : , "type_null_count" ] / chart_data . loc [ : , "count" ] ) fig , ax = MatplotlibProfileVisualizer . _chart_theming ( ) ax . plot ( chart_data . loc [ : , "date" ] , chart_data . loc [ : , "mv_ratio" ] , color = self . theme [ "colors" ] [ 0 ] , linewidth = 1.5 , label = "Missing Value Ratio" , ) ax . yaxis . set_label_text ( "Missing Value to\nTotal Count Ratio" , fontweight = "bold" ) ax . set_title ( f"Missing Values ({variable})" , loc = "left" , fontweight = "bold" ) handles , labels = ax . get_legend_handles_labels ( ) ax . legend ( handles , labels , loc = "upper center" , bbox_to_anchor = ( 0.5 , - 0.1 ) , frameon = False , ncol = 3 , ) ax . xaxis . set_major_formatter ( _dates . DateFormatter ( ts_format ) ) ax . yaxis . set_major_formatter ( _ticker . ScalarFormatter ( useOffset = False , useMathText = False , useLocale = None ) ) return fig
Plots a Missing Value to Total Count ratio chart.
Plots a Missing Value to Total Count ratio chart .
"""Plots a Missing Value to Total Count ratio chart.""" # Primary line
self
variable
ts_format