Embedding Text and Expressions

In this chapter, we will learn how to embed text and mathematical expressions on the plot using the following recipes:

  • Using mathematical expressions with a font dictionary
  • Annotating a point on a polar plot
  • Using ConnectionPatch
  • Using a text box
  • Plotting the area under an integral curve
  • Defining custom markers
  • Using fractions, regular mathematical expressions, and symbols
  • Word embeddings in a two-dimensional space

Introduction

Annotations and text come in handy when you want to draw the user's attention to specific areas of the plot, want to provide additional information, or provide an explanation for certain parts of the plot. They also help in creating a story line, and providing additional insights into your data for any formal presentations. In this chapter, we will learn how to use these features.