Home »
Python »
Matplotlib MCQs
Which parameter is used to set the font properties for the plot?
18. Which parameter is used to set the font properties for the plot?
- fontdict
- fonts
- fontfamily
- plotfonts
Answer: A) fontdict
Explanation:
The fontdict parameter is used to set the font properties for the plot. Consider the below syntax of using fontdict parameter –
# define font properties
font1 = {'family':'Arial','color':'Red','size':17}
# Apply font properties to title
plt.title("Employee Data", fontdict = font1)