12345678910111213141516 |
- def screeplot(obj="pcascree", axlabelfontsize=9, axlabelfontname="Arial", axxlabel=None,
- axylabel=None, figtype='png', r=300, show=False, dim=(6, 4), theme=None):
- if theme == 'dark':
- general.dark_bg()
- y = [x * 100 for x in obj[1]]
- plt.subplots(figsize=dim)
- plt.bar(obj[0], y)
- xlab='PCs'
- ylab='Proportion of variance (%)'
- if axxlabel:
- xlab = axxlabel
- if axylabel:
- ylab = axylabel
- plt.xticks(fontsize=7, rotation=70)
- general.axis_labels(xlab, ylab, axlabelfontsize, axlabelfontname)
- general.get_figure(show, r, figtype, 'screeplot', theme)
|