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

Discussão em 'Python' iniciado por Stack, Setembro 1, 2025.

  1. Stack

    Stack Membro Participativo

    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().

    Continue reading...

Compartilhe esta Página