Matplotlib Guide | CMSC 105 Elementary Programming - Fall 2024

Matplotlib Guide

This guide provides an overview of common Matplotlib features for creating visualizations in Python. For detailed documentation, refer to the Matplotlib Official Guide.


1. plot(x, y)


2. scatter(x, y)


3. bar(x, height)


4. hist(data, bins)


5. pie(sizes)


6. xlabel(label) and ylabel(label)


7. title(label)


8. legend()


9. savefig(filename)


10. show()