Download Stack/Stack_152661b0be9fa918/code_edit.py from AIHero123/ChartM3: direct link, hf CLI and curl.
- Browser
- Download file 902 Bytes
-
https://huggingface.co/datasets/AIHero123/ChartM3/resolve/main/Stack/Stack_152661b0be9fa918/code_edit.py
- Command line
-
hf download hf://datasets/AIHero123/ChartM3/Stack/Stack_152661b0be9fa918/code_edit.py
-
curl -L -o code_edit.py https://huggingface.co/datasets/AIHero123/ChartM3/resolve/main/Stack/Stack_152661b0be9fa918/code_edit.py
902 Bytes
| import matplotlib.pyplot as plt | |
| # Artifacts Volume | |
| pottery = [1500, 1200, 1300, 1100, 1000] | |
| metal_artifacts = [800, 700, 750, 600, 500] | |
| stone_tools = [600, 500, 550, 450, 400] | |
| ceramics = [300, 250, 270, 200, 180] | |
| # Names of Sites | |
| sites = ['Site A', 'Site B', 'Site C', 'Site D', 'Site E'] | |
| # Creating stackplot | |
| stacks=plt.stackplot(sites, pottery, metal_artifacts, stone_tools, ceramics, labels=['Pottery','Metal Artifacts','Stone Tools','Ceramics']) | |
| for idx,stack in enumerate(stacks): | |
| if idx in [2]: | |
| stack.set_facecolor('#3eee95') | |
| stack.set_alpha(0.3985620007711062) | |
| # Adding Labels and Title | |
| plt.xlabel('Archaeological Sites') | |
| plt.ylabel('Volume of Artifacts (cubic meters)') | |
| plt.title('Volumetric Distribution of Artifacts at Underwater Archaeological Sites') | |
| # Adding Legend | |
| plt.legend(loc='upper right') | |
| # Displaying Plot | |
| plt.tight_layout() | |
| plt.savefig("Edit_figure.png") |