Having a simple mechanism to display distributions and descriptive statistics for phenotype information of a subset of subjects


In [1]:
# Imports
import brainbox as bb
from matplotlib import pyplot as plt

In [27]:
x = np.arange(100)
dist = 0.06
ticks = True
border = False
title = True

f = plt.figure(figsize=(6,6))
ax = f.add_subplot(111)
if not ticks:
    ax.set_xticks([])
    ax.set_yticks([])
if not border:
    ax.spines["top"].set_visible(False)
    ax.spines["right"].set_visible(False)
    ax.spines["left"].set_visible(False)
    ax.spines["bottom"].set_visible(False)

lt = bb.visuOps.add_subplot_axes(ax, [0, 0.5+dist/2, 0.5-dist/(2-title), 0.5-dist/(2-title)])
lt.set_title('left top')
if not ticks:
    lt.set_xticks([])
    lt.set_yticks([])
if not border:
    lt.spines["top"].set_visible(False)
    lt.spines["right"].set_visible(False)
    lt.spines["left"].set_visible(False)
    lt.spines["bottom"].set_visible(False)
lt.plot(x, np.sin((x)))

lb = bb.visuOps.add_subplot_axes(ax, [0, 0, 0.5-dist/(2-title), 0.5-dist/(2-title)])
lb.set_title('left bottom')
if not ticks:
    lb.set_xticks([])
    lb.set_yticks([])
if not border:
    lb.spines["top"].set_visible(False)
    lb.spines["right"].set_visible(False)
    lb.spines["left"].set_visible(False)
    lb.spines["bottom"].set_visible(False)
lb.plot(x, np.tan((x)))

rt = bb.visuOps.add_subplot_axes(ax, [0.5+dist/2, 0, 0.5-dist/(2-title), 0.5-dist/(2-title)])
rt.set_title('right top')
if not border:
    rt.set_xticks([])
    rt.set_yticks([])
if not border:
    rt.spines["top"].set_visible(False)
    rt.spines["right"].set_visible(False)
    rt.spines["left"].set_visible(False)
    rt.spines["bottom"].set_visible(False)
rt.plot(x, np.cos((x)))

rb = bb.visuOps.add_subplot_axes(ax, [0.5+dist/2, 0.5+dist/2, 0.5-dist/(2-title), 0.5-dist/(2-title)])
rb.set_title('right bottom')
if not ticks:
    rb.set_xticks([])
    rb.set_yticks([])
if not border:
    rb.spines["top"].set_visible(False)
    rb.spines["right"].set_visible(False)
    rb.spines["left"].set_visible(False)
    rb.spines["bottom"].set_visible(False)
rb.plot(x, x)



In [24]:


In [23]:



Out[23]:
2

In [ ]: