Paw in Data
Paw in Data

Reputation: 1564

How to set fontsize for title in pandas.DataFrame.plot()?

import pandas as pd
import numpy as np

df = pd.DataFrame(np.random.rand(3,3), columns=['A','B','C'])
df['Name'] = ['Lily','Mary','Joan']
df.plot(x='Name', kind='barh', stacked=True, mark_right=True, figsize=(10,6),
        title='Distribution of Tags across Participants')

When I plot from a dataframe df. Can I tune the font size of the title? Passing a list/dictionary to the title argument instead of a string, perhaps? Basically I don't know how to integrate matplotlib functions into df.plot().

Upvotes: 0

Views: 1067

Answers (1)

Paw in Data
Paw in Data

Reputation: 1564

Turns out I can use plt.title() directly. Tutorial

Upvotes: 1

Related Questions