{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "colab": { "name": "MathNumbers.ipynb", "provenance": [], "collapsed_sections": [] }, "language_info": { "name": "python" }, "kernelspec": { "name": "python3", "display_name": "Python 3" } }, "cells": [ { "cell_type": "markdown", "source": [ "#Text, Math, and Numbers in Figures" ], "metadata": { "id": "y-ISeBZZLvKW" } }, { "cell_type": "markdown", "source": [ "##1. Adding Text to Figures" ], "metadata": { "id": "pDxSzYZJLvKZ" } }, { "cell_type": "markdown", "source": [ "The following matplotlib commands place text on a figure as shown in the example below.\n", "
Specifier | Meaning | Example Format | Output for −34.5678 |
---|---|---|---|
i | signed integer | %5i | -34 |
e | scientific notation | %5.4e | −3.4568e+001 |
f | floating point | %5.2f | −34.57 |