U/Graph/Categorical Plots Using catPlotter

The module cdtg include basic functions for processing data and generating plots.

import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)
warnings.filterwarnings("ignore", category=FutureWarning)

The function boxplot generates plots for a given continuous variable Y, a categorical variable X, and a categorical group variable.

To create a horizontal box plot:

from mtbp3.util.cdtg import catPlotter 

cat_plot = catPlotter(None, x_col='Group', y_col='Value', y_scale_base=5, title='An Example')
cat_plot.boxplot()
/home/runner/.cache/pypoetry/virtualenvs/mtbp3-STzYEG9e-py3.10/lib/python3.10/site-packages/seaborn/categorical.py:3399: UserWarning: 5.6% of the points cannot be placed; you may want to decrease the size of the markers or use stripplot.
  warnings.warn(msg, UserWarning)
/home/runner/.cache/pypoetry/virtualenvs/mtbp3-STzYEG9e-py3.10/lib/python3.10/site-packages/seaborn/categorical.py:3399: UserWarning: 20.0% of the points cannot be placed; you may want to decrease the size of the markers or use stripplot.
  warnings.warn(msg, UserWarning)
_images/da1b9a6fa5a9014155905154be22cb4f5f7532c2fbd32b8b2050e7eb652a104a.png

To create a line plot:

cat_plot.update_parameters(group_col='CValueGroup', x_col='CValue', title='Another Example')
cat_plot.lineplot()
_images/b806eee10efd4495d18bda005d039921446fb0ec5cdf9f852c0da62515cce784.png