How to change figuresize using seaborn factorplot

前端 未结 7 1560
长情又很酷
长情又很酷 2020-11-27 14:19
%pylab inline

import pandas as pd
import numpy as np
import matplotlib as mpl
import seaborn as sns

typessns = pd.DataFrame.from_csv(\'C:/data/testesns.csv\', inde         


        
相关标签:
7条回答
  • 2020-11-27 15:19

    Note as of July 2018:

    seaborn.__version__ == 0.9.0

    Two main changes which affect the above answers

    1. The factorplot function has been renamed to catplot()

    2. The size parameter has been renamed to height for multi plot grid functions and those that use them.

    https://seaborn.pydata.org/whatsnew.html

    Meaning the answer provided by @Fernando Hernandez should be adjusted as per below:

    %matplotlib inline
    
    import seaborn as sns
    
    exercise = sns.load_dataset("exercise")
    
    # Defaults are hieght=5, aspect=1
    sns.catplot("kind", "pulse", "diet", exercise, kind="point", height=4, aspect=2)
    
    
    0 讨论(0)
提交回复
热议问题