Download Stack/Stack_2c252d83aae1d62e/code.py from AIHero123/ChartM3: direct link, hf CLI and curl.
- Browser
- Download file 400 Bytes
-
https://huggingface.co/datasets/AIHero123/ChartM3/resolve/main/Stack/Stack_2c252d83aae1d62e/code.py
- Command line
-
hf download hf://datasets/AIHero123/ChartM3/Stack/Stack_2c252d83aae1d62e/code.py
-
curl -L -o code.py https://huggingface.co/datasets/AIHero123/ChartM3/resolve/main/Stack/Stack_2c252d83aae1d62e/code.py
400 Bytes
| import matplotlib.pyplot as plt | |
| sectors = [1, 2, 3, 4] | |
| Alien1 = [10, 12, 8, 15] | |
| Alien2 = [5, 7, 10, 3] | |
| Alien3 = [8, 6, 4, 12] | |
| plt.stackplot(sectors, Alien1, Alien2, Alien3, labels=['Alien1','Alien2','Alien3']) | |
| plt.xlabel("Sectors") | |
| plt.ylabel("Number of Aliens") | |
| plt.title("Distribution of Alien Life Forms Across Sectors") | |
| plt.legend(loc='upper left') | |
| plt.tight_layout() | |
| plt.savefig("figure.png") |