Last active
June 8, 2023 16:51
-
-
Save wdecoster/4365f71852520ebb9b7317ccd4ebd9a9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
from pywaffle import Waffle | |
fig = plt.figure( | |
FigureClass=Waffle, | |
rows=5, | |
values={'AA': 82, 'AT': 18}, | |
title={'label': 'Genotypes of patients', 'loc': 'center'}, | |
legend={'loc': 'lower left', 'bbox_to_anchor': (0, -0.4), 'ncol': 2, 'framealpha': 0}, | |
icons='male', icon_size=18, | |
colors=("#983D3D", "#232066"), | |
plot_direction='NW', | |
icon_legend=True | |
) | |
plt.show() | |
fig = plt.figure( | |
FigureClass=Waffle, | |
rows=5, | |
values={'AA': 96, 'AT': 4}, | |
title={'label': 'Genotypes of healthy individuals', 'loc': 'center'}, | |
legend={'loc': 'lower left', 'bbox_to_anchor': (0, -0.4), 'ncol': 2, 'framealpha': 0}, | |
icons='male', icon_size=18, | |
colors=("#983D3D", "#232066"), | |
plot_direction='NW', | |
icon_legend=True | |
) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment