seaborn入门(3)调色盘
newsun-boki Lv3

seaborn入门(3)调色盘

基础准备

续接上文

1
2
3
4
5
6
7
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
tips_df = sns.load_dataset(name='tips',cache=True,data_home="./seaborn-data")
sns.set_style('dark')
sns.set_context('talk')

调色盘

访问这个界面你能看到调色看给你的一些风格样式
https://matplotlib.org/3.3.1/tutorials/colors/colormaps.html
在这里插入图片描述
例如我选一个夏天风情的

1
sns.stripplot(x = 'day',y = 'total_bill', data = tips_df,jitter = True,hue = 'sex',palette = 'summer')

在这里插入图片描述

  • Post title:seaborn入门(3)调色盘
  • Post author:newsun-boki
  • Create time:2021-11-02 01:22:20
  • Post link:https://github.com/newsun-boki2021/11/02/seaborn3/
  • Copyright Notice:All articles in this blog are licensed under BY-NC-SA unless stating additionally.