Download Stack/Stack_183cf4ef960d492d/code_edit.py from AIHero123/ChartM3: direct link, hf CLI and curl.
- Browser
- Download file 714 Bytes
-
https://huggingface.co/datasets/AIHero123/ChartM3/resolve/main/Stack/Stack_183cf4ef960d492d/code_edit.py
- Command line
-
hf download hf://datasets/AIHero123/ChartM3/Stack/Stack_183cf4ef960d492d/code_edit.py
-
curl -L -o code_edit.py https://huggingface.co/datasets/AIHero123/ChartM3/resolve/main/Stack/Stack_183cf4ef960d492d/code_edit.py
714 Bytes
| import matplotlib.pyplot as plt | |
| # Days | |
| days = [1, 2, 3, 4, 5, 6, 7] | |
| # Facebook activity level | |
| facebook_activity = [60, 72, 80, 55, 90, 63, 70] | |
| # Reported anxiety level | |
| anxiety_level = [4, 5, 6, 3, 7, 4, 5] | |
| # Plot stack plot | |
| stacks = plt.stackplot(days, facebook_activity, anxiety_level, colors=['blue', 'green'], labels=['Facebook Activity', 'Anxiety Level']) | |
| for idx, stack in enumerate(stacks): | |
| if idx in [1]: | |
| stack.set_zorder(14) | |
| stack.set_linestyle('dashdot') | |
| stack.set_edgecolor('#73e97e') | |
| plt.legend(loc='upper left') | |
| plt.title('Facebook Activity and Anxiety Level Over Time') | |
| plt.xlabel('Day') | |
| plt.ylabel('Minutes/Level') | |
| plt.tight_layout() | |
| plt.savefig("Edit_figure.png") |