Getting to know the layout attribute
For the current figure that we are working on, let's add a title (for the whole figure), along with axis titles, to see how it works:
fig.layout.title = 'The Figure Title' fig.layout.xaxis.title = 'The X-axis title' fig.layout.yaxis.title = 'The Y-axis title'
As you can see, we are exploring the tree-like structure of our figure. There is a title
attribute that falls directly under fig.layout
, and there are also titles for fig.layout.xaxis
and fig.layout.yaxis
. To give you a sense of how detailed the available options are, Figure 3.3 shows some of the xaxis
attributes that start with tick
only:
Let's now look at the effect of the four lines of code we just added:
The three titles we have...