{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# How to plot mathematical expressions and symbols in vcs? \n", "\n", "VCS can take advantage of matolotlib's text capabilites, this Jupyter notebook essentially shows how to implement in vcs [the following matplolib tutorial](https://matplotlib.org/users/mathtext.html)\n", "\n", "You can use a subset TeX markup in any vcs text string by placing it inside a pair of dollar signs ($).\n", "\n", "Note that you do not need to have TeX installed, since matplotlib ships its own TeX expression parser, layout engine and fonts. The layout engine is a fairly direct adaptation of the layout algorithms in Donald Knuth’s TeX, so the quality is quite good.\n", "\n", "Any text element can use math text. You should use raw strings (precede the quotes with an 'r'), and surround the math text with dollar signs ($), as in TeX. Regular text and mathtext can be interleaved within the same string. Mathtext can use DejaVu Sans (default), DejaVu Serif, the Computer Modern fonts (from (La)TeX), STIX fonts (with are designed to blend well with Times), or a Unicode font that you provide. The mathtext font can be selected with the customization variable mathtext.fontset [see Customizing matplotlib](https://matplotlib.org/users/customizing.html#customizing-matplotlib)\n", "\n", "Simple example\n", "\n", "The CDAT software was developed by LLNL. This tutorial was written by Charles Doutriaux. This work was performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344.\n", "\n", "[Download the Jupyter Notebook](Mathematical_Expressions_and_Symbols.ipynb)" ] }, { "cell_type": "markdown", "metadata": { "toc": true }, "source": [ "