Skip to content
Snippets Groups Projects
Commit dec0735b authored by Tamino Huxohl's avatar Tamino Huxohl
Browse files

chagen import alias

parent e93154f3
No related branches found
No related tags found
No related merge requests found
from typing import List, Optional
import matplotlib as mlp
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
......@@ -40,13 +40,13 @@ def absolute_percent_error(prediction: np.ndarray, target: np.ndarray) -> float:
return 100.0 * diff / mean_t
def same_limits(axes: List[mlp.axes.Axes]):
def same_limits(axes: List[mpl.axes.Axes]):
"""
Adjust the limits of a all axes to be the same.
Parameters
----------
axes: List[mlp.axes.Axes]
axes: List[mpl.axes.Axes]
axes whose limits are adjusted
"""
x_min = min(map(lambda ax: ax.get_xlim()[0], axes))
......@@ -61,7 +61,7 @@ def same_limits(axes: List[mlp.axes.Axes]):
def bland_altman(
data1: np.ndarray,
data2: np.ndarray,
ax: Optional[mlp.axes.Axes] = None,
ax: Optional[mpl.axes.Axes] = None,
color=color_lists["printer_friendly"][0],
color_mean=color_lists["printer_friendly"][5],
color_std="black",
......@@ -77,7 +77,7 @@ def bland_altman(
first data array
data2: np.ndarray
second data array
ax: mlp.axes.Axes, optional
ax: mpl.axes.Axes, optional
axes to plot on, a new one is created if not given
color: str
color of the dots
......@@ -112,7 +112,7 @@ def bland_altman(
def plot_corellation(
data1: np.ndarray,
data2: np.ndarray,
ax: Optional[mlp.axes.Axes] = None,
ax: Optional[mpl.axes.Axes] = None,
color: str = color_lists["printer_friendly"][0],
color_line: str = color_lists["printer_friendly"][5],
v_min: Optional[float] = None,
......@@ -127,7 +127,7 @@ def plot_corellation(
first data array
data2: np.ndarray
second data array
ax: mlp.axes.Axes, optional
ax: mpl.axes.Axes, optional
axes to plot on, a new one is created if not given
color: str
color of the dots
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment