Exemple #1
0
def draw_subplot(*,
                 subplot: Axes,
                 xlabel: str,
                 ylabel: str,
                 xlim: Tuple[float, float],
                 ylim: Tuple[float, float],
                 x: List[float],
                 y: List[float],
                 cloud_color: str = 'k',
                 point_size: float = 0.5,
                 x_avg: float,
                 y_avg: float,
                 x_std: float,
                 y_std: float,
                 ratio: float = 10 / 13) -> None:
    subplot.set(xlabel=xlabel,
                ylabel=ylabel,
                xlim=xlim,
                ylim=ylim)
    subplot.scatter(x=x,
                    y=y,
                    color=cloud_color,
                    s=point_size)
    plot_ellipses(subplot=subplot,
                  x_avg=x_avg,
                  y_avg=y_avg,
                  x_std=x_std,
                  y_std=y_std)
    subplot.minorticks_on()
    subplot.xaxis.set_ticks_position('both')
    subplot.yaxis.set_ticks_position('both')
    subplot.set_aspect(ratio / subplot.get_data_ratio())
Exemple #2
0
def draw_subplot(subplot: Axes,
                 xlabel: str,
                 ylabel: str,
                 x: pd.Series,
                 y: pd.Series,
                 color: str = 'b',
                 point_size: float = 0.5,
                 ratio: float = 10 / 13) -> None:
    subplot.set(xlabel=xlabel, ylabel=ylabel)

    subplot.scatter(x=x, y=y, color=color, s=point_size)

    subplot.minorticks_on()

    subplot.xaxis.set_ticks_position('both')
    subplot.yaxis.set_ticks_position('both')

    subplot.set_aspect(ratio / subplot.get_data_ratio())
def draw_subplot(*,
                 subplot: Axes,
                 xlabel: str = None,
                 ylabel: str,
                 xlim: Tuple[float, float] = (6, 19),
                 ylim: Tuple[float, float] = (-150, 150),
                 x_line: pd.Series,
                 y_line: pd.Series,
                 yerr: pd.Series,
                 marker: str = 's',
                 markersize: float = 3.,
                 line_color: str = 'k',
                 capsize: float = 5.,
                 linewidth: float = 1.,
                 x_scatter: pd.Series,
                 y_scatter: pd.Series,
                 scatter_color: str = 'gray',
                 scatter_point_size: float = 1.,
                 ratio: float = 7 / 13) -> None:
    subplot.set(xlabel=xlabel, ylabel=ylabel, xlim=xlim, ylim=ylim)
    subplot.errorbar(x=x_line,
                     y=y_line,
                     yerr=yerr,
                     marker=marker,
                     markersize=markersize,
                     color=line_color,
                     capsize=capsize,
                     linewidth=linewidth)
    subplot.scatter(x=x_scatter,
                    y=y_scatter,
                    color=scatter_color,
                    s=scatter_point_size)

    subplot.minorticks_on()
    subplot.xaxis.set_ticks_position('both')
    subplot.yaxis.set_ticks_position('both')
    subplot.set_aspect(ratio / subplot.get_data_ratio())