Home »
Python »
Matplotlib MCQs
Which parameter is used to define the position/alignment of the plot title in the title() function?
20. Which parameter is used to define the position/alignment of the plot title in the title() function?
- pos
- align
- loc
- All of the above
Answer: C) loc
Explanation:
The loc parameter is used to define the position/alignment of the plot title in the title() function with the following values –
Where "center" is the default value.
Consider the below code statement –
plt.title("Employee Data", loc = 'left')