- 博客(5)
- 收藏
- 关注
原创 绘制直方图
#导入模块import matplotlib.pyplot as pltimport seaborn as snsimport numpy as npimport pandas as pdimport osfrom matplotlib.font_manager import FontPropertiesplt.rcParams['font.sans-serif'] = ['SimHei']plt.rcParams['axes.unicode_minus'] = Falsem =.
2021-08-31 20:24:36 116 1
原创 2021-08-31折线图
#导入模块(此处无需修改)import matplotlib.pyplot as pltimport seaborn as snsimport numpy as npimport pandas as pdimport osfrom matplotlib.font_manager import FontPropertiesplt.rcParams['font.sans-serif'] = ['SimHei']plt.rcParams['axes.unicode_minus'] = Fal.
2021-08-31 20:22:29 92
原创 词云图的绘制
#导入模块from wordcloud import WordCloudimport wordcloudimport numpy as npimport pandas as pdimport matplotlib.pyplot as pltfrom PIL import Image#创建数据#关键词和词频可以参考下面的方式进行自定义,保证一个关键词对应一个词频即可wd = pd.DataFrame({ '关键词': ['苹果', '香蕉', '梨', '橙子', '橘子', .
2021-08-31 20:20:30 171
原创 2021-08-31通过altair来绘图
1,散点import altair as alt# 加载可离线访问的数据集from vega_datasets import datasource = data.cars()alt.Chart(source).mark_circle(size=60).encode( x='Horsepower', y='Miles_per_Gallon', color='Origin', tooltip=['Name', 'Origin', 'Horsepower', ..
2021-08-31 20:15:40 300 1
原创 2021-08-31通过Seaborn来绘图
import seaborn as sns# 加载数据集,sns加载的数据集是dataframe类型flights_long = sns.load_dataset("flights")flights_long.head()# 直方图(数值型)# kde:用于控制密度曲线的有无(默认True)sns.stripplot(x='year', y='passengers', data=flights_long)‘# 统计直方图sns.countplot(flights_long['year.
2021-08-31 20:07:01 98
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人