tiple values from the metric. Args: val: Either a single result from calling `metric.forward` or `metric.compute` or a list of these results. If no value is provided, will automatically call `metric.compute` and plot that result. ax: An matplotlib axis object. If provided will add plot to that axis Returns: Figure object and Axes object Raises: ModuleNotFoundError: If `matplotlib` is not installed .. plot:: :scale: 75 >>> from torch import randint >>> # Example plotting a single value per class >>> from torchmetrics.classification import MulticlassMatthewsCorrCoef >>> metric = MulticlassMatthewsCorrCoef(num_classes=3) >>> metric.update(randint(3, (20,)), randint(3, (20,))) >>> fig_, ax_ = metric.plot() .. plot:: :scale: 75 >>> from torch import randint >>> # Example plotting a multiple values per class >>> from torchmetrics.classification import MulticlassMatthewsCorrCoef >>> metric = MulticlassMatthewsCorrCoef(num_classes=3) >>> values = [] >>> for _ in range(20): ... values.append(metric(randint(3, (20,)), randint(3, (20,)))) >>> fig_, ax_ = metric.plot(values) r8