Download Stack/Stack_613c7faea75bd073/code_edit.py from AIHero123/ChartM3: direct link, hf CLI and curl.
- Browser
- Download file 598 Bytes
-
https://huggingface.co/datasets/AIHero123/ChartM3/resolve/main/Stack/Stack_613c7faea75bd073/code_edit.py
- Command line
-
hf download hf://datasets/AIHero123/ChartM3/Stack/Stack_613c7faea75bd073/code_edit.py
-
curl -L -o code_edit.py https://huggingface.co/datasets/AIHero123/ChartM3/resolve/main/Stack/Stack_613c7faea75bd073/code_edit.py
598 Bytes
| import matplotlib.pyplot as plt | |
| # Time intervals | |
| time = [1, 2, 3, 4, 5] | |
| # Tumor sizes | |
| group_A = [10, 15, 20, 25, 30] | |
| group_B = [12, 18, 22, 28, 35] | |
| group_C = [8, 14, 19, 23, 29] | |
| fig, ax = plt.subplots() | |
| stacks = ax.stackplot(time, group_A, group_B, group_C, labels=['Group A', 'Group B', 'Group C']) | |
| for idx, stack in enumerate(stacks): | |
| if idx in [1]: | |
| stack.set_hatch('|') | |
| ax.legend(loc='upper left') | |
| plt.xlabel('Time Intervals') | |
| plt.ylabel('Tumor Size (in mm)') | |
| plt.title('Tumor Growth Progression in Different Treatment Groups') | |
| plt.tight_layout() | |
| plt.savefig("Edit_figure.png") |