Download Stack/Stack_646b4df22386dea5/code_edit.py from AIHero123/ChartM3: direct link, hf CLI and curl.
- Browser
- Download file 1.01 kB
-
https://huggingface.co/datasets/AIHero123/ChartM3/resolve/main/Stack/Stack_646b4df22386dea5/code_edit.py
- Command line
-
hf download hf://datasets/AIHero123/ChartM3/Stack/Stack_646b4df22386dea5/code_edit.py
-
curl -L -o code_edit.py https://huggingface.co/datasets/AIHero123/ChartM3/resolve/main/Stack/Stack_646b4df22386dea5/code_edit.py
1.01 kB
| import matplotlib.pyplot as plt | |
| time_intervals = ['0-10 mins', '10-20 mins', '20-30 mins', '30-40 mins', '40-50 mins'] | |
| cells_G1_Phase = [20, 18, 16, 14, 12] | |
| cells_S_Phase = [15, 17, 19, 18, 20] | |
| cells_G2_Phase = [10, 12, 14, 16, 18] | |
| cells_Prophase = [5, 6, 7, 8, 9] | |
| cells_Metaphase = [3, 5, 6, 7, 8] | |
| cells_Anaphase = [2, 3, 4, 5, 6] | |
| cells_Telophase = [1, 2, 3, 4, 5] | |
| cells_Cytokinesis = [0, 1, 2, 3, 4] | |
| plt.stackplot(time_intervals, cells_G1_Phase, cells_S_Phase, cells_G2_Phase, cells_Prophase, cells_Metaphase, cells_Anaphase, cells_Telophase, cells_Cytokinesis, labels=['G1 Phase','S Phase','G2 Phase','Prophase', 'Metaphase', 'Anaphase', 'Telophase', 'Cytokinesis']) | |
| for i, area in enumerate(plt.gca().collections): | |
| if i == 2: # G2 Phase's stack | |
| area.set_picker(True) | |
| plt.legend(loc='upper left') | |
| plt.xlabel("Time Intervals (minutes)") | |
| plt.ylabel("Number of Cells") | |
| plt.title("Number of Cells at Different Phases of Cell Cycle Over Time") | |
| plt.tight_layout() | |
| plt.savefig("Edit_figure.png") |