Setting the Title of a Plot
In this lesson, we will learn how to set the title for a plot.
The title
feature allows us to set a title for our plot.
Adding a title for the axes
set_title()
is the basic function we can use to add a title to the axes. We can pass a string to this function, and a title will be added at the top center position of the graph.
axe.set_title("two functions demo")
Setting a location for the title
By default, the title is placed at the center near the top of the graph. In addition to center
, which is the default option, we have other options: left
and right
. As shown in the code below, we can set the position of the title by assigning ...