src/proteingnn/util.py
def plot_corr(x: OrderedIterableType, y: OrderedIterableType, x_name: str, y_name: str, png: Optional[AnyPath] = None,
              rootdir: Optional[AnyPath] = None, **kwargs) -> None:
    """Plot x, y in seaborn jointplot

    Args:
        x: x-axis samples
        y: y-axis samples
        x_name: Name of x variable for plotting
        y_name: Name of y variable for plotting
        png: png filename. Default: {x_name}_{y_name}.png
        rootdir: Destination directory for png.
        kwargs: Keyword arguments for seaborn.jointplot.
    """
    if type(x) is collections.OrderedDict:
        x = list(x.values())
    if type(y) is collections.OrderedDict:
        y = list(y.values())

    assert len(x) == len(y)
    df = pd.DataFrame(zip(x, y), columns=[x_name, y_name])
    jg = sns.jointplot(x=df[x_name], y=df[y_name], **kwargs)

    png = f'{x_name}-{y_name}.png' if png is None else Path(png)
    if rootdir is not None:
        png = Path(rootdir) / png
    plt.savefig(png)
    plt.close()
Plot x, y in seaborn jointplot

    Args:
        x: x-axis samples
        y: y-axis samples
        x_name: Name of x variable for plotting
        y_name: Name of y variable for plotting
        png: png filename. Default: {x_name}_{y_name}.png
        rootdir: Destination directory for png.
        kwargs: Keyword arguments for seaborn.jointplot.
    
Plot x, y in seaborn jointplot
Plot x y in seaborn jointplot
def plot_corr(x: OrderedIterableType, y: OrderedIterableType, x_name: str, y_name: str, png: Optional[AnyPath] = None,
              rootdir: Optional[AnyPath] = None, **kwargs) -> None:
    if type(x) is collections.OrderedDict:
        x = list(x.values())
    if type(y) is collections.OrderedDict:
        y = list(y.values())
    assert len(x) == len(y)
    df = pd.DataFrame(zip(x, y), columns=[x_name, y_name])
    jg = sns.jointplot(x=df[x_name], y=df[y_name], **kwargs)
    png = f'{x_name}-{y_name}.png' if png is None else Path(png)
    if rootdir is not None:
        png = Path(rootdir) / png
    plt.savefig(png)
    plt.close()
def plot_corr ( x : OrderedIterableType , y : OrderedIterableType , x_name : str , y_name : str , png : Optional [ AnyPath ] = None , rootdir : Optional [ AnyPath ] = None , ** kwargs ) -> None : if type ( x ) is collections . OrderedDict : x = list ( x . values ( ) ) if type ( y ) is collections . OrderedDict : y = list ( y . values ( ) ) assert len ( x ) == len ( y ) df = pd . DataFrame ( zip ( x , y ) , columns = [ x_name , y_name ] ) jg = sns . jointplot ( x = df [ x_name ] , y = df [ y_name ] , ** kwargs ) png = f'{x_name}-{y_name}.png' if png is None else Path ( png ) if rootdir is not None : png = Path ( rootdir ) / png plt . savefig ( png ) plt . close ( )
Plot x, y in seaborn jointplot
Plot x y in seaborn jointplot
"""Plot x, y in seaborn jointplot

    Args:
        x: x-axis samples
        y: y-axis samples
        x_name: Name of x variable for plotting
        y_name: Name of y variable for plotting
        png: png filename. Default: {x_name}_{y_name}.png
        rootdir: Destination directory for png.
        kwargs: Keyword arguments for seaborn.jointplot.
    """
x
OrderedIterableType
None
y
OrderedIterableType
None
x_name
str
Name of x variable for plotting
Name of x variable for plotting
y_name
str
Name of y variable for plotting
Name of y variable for plotting
png
Optional[AnyPath]
png filename. Default: {x_name}_{y_name}.png
png filename . Default : { x_name } _ { y_name } . png
rootdir
Optional[AnyPath]
Destination directory for png.
Destination directory for png .
kwargs
Keyword arguments for seaborn.jointplot.
Keyword arguments for seaborn . jointplot .