Last active
November 12, 2023 16:31
-
-
Save barrysmyth/a92e58dd8878546bed6f9379758a676d to your computer and use it in GitHub Desktop.
training_log_grid_16_x_8.py
This file contains 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
# The unit height of each row. | |
row_h = 10 | |
# The outer grid. | |
sessions_grid = gridspec.GridSpec((16*row_h), 8, figure=fig, wspace=.1, hspace=.5) | |
fig = plt.figure(figsize=(10, 20)) | |
# Iterate for each row (16 weeks) and column (weekly summary col + 7 x days) ... | |
for row in range(16): | |
for col in range(8): | |
# Every section has 5 separate areas/axes | |
# The gutter provides for spacing between rows and a vertical line | |
session_gutter = fig.add_subplot(sessions_grid[(row*row_h), col]) | |
# The title/headline is the location of the main title of the chart | |
session_headline = fig.add_subplot(sessions_grid[(row*row_h)+1, col]) | |
# The header is used for secondary information. | |
session_header = fig.add_subplot(sessions_grid[(row*row_h)+2, col]) | |
# The main chart area (pie or bar chart as appropriate) | |
session_chart = fig.add_subplot(sessions_grid[(row*row_h)+3:(row*row_h)+3+(row_h-4), col]) | |
# The footer is used for additional secondary information. | |
session_footer = fig.add_subplot(sessions_grid[(row*row_h)+(row_h-1), col]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment