Seaborn Learning 02: Line Chart


Seabor implemented in two line graphs. One is relplot () function of the kind set line parameters can, and the other is lineplot () function can be achieved directly line graph.

Achieved by relplot:
Import matplotlib.pyplot AS PLT
 Import Seaborn SNS AS 

# dataset 
Data = sns.load_dataset ( " fMRI " )
 Print (data.head ())
 # painting line graph 
sns.relplot (X = " TIMEPOINT " , Y = " Signal " , = kind " Line " , Data = Data, CI = None)
 # display 
plt.show ()

operation result:

  region subject event signal timepoint 
0 s13 know parietal -0.017552 18 
1 14 know parietal s5 -0.080883 
2 -0.081033 parietal know S12 18 
3 -11 18 know parietal -0.046134 
4 -0.037970 parietal know s10 18

display effect:

 

 

 

() Function is implemented by lineplot:

Import matplotlib.pyplot AS PLT
 Import Seaborn SNS AS 

# dataset 
Data = sns.load_dataset ( " fMRI " )
 Print (data.head ())
 # Painting line chart: 
sns.lineplot (X = " TIMEPOINT " , Y = " Signal " , Data = Data, CI = 95 )
 # display 
plt.show ()

The above operation is the same as a result, display is as follows:

 

 

 

Achieved by relplot

Guess you like

Origin www.cnblogs.com/jumpkin1122/p/11488294.html