#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import streamlit as st
import numpy as np
import pandas as pd
import seaborn as sns
from scipy import stats, integrate
import matplotlib.pyplot as plt # 导入
x = np.random.gamma(6, size=200) # 生成gamma分布的数据
sns.distplot(x, kde=False, fit=stats.gamma) # fit拟合
plt.show()
st.set_option('deprecation.showPyplotGlobalUse', False)
st.pyplot()
sns.set(color_codes=True) # 导入seaborn包设定颜色
np.random.seed(sum(map(ord, "distributions")))
x = np.random.normal(size=100)
sns.distplot(x, kde=False, rug=True)
plt.show()
st.set_option('deprecation.showPyplotGlobalUse', False)
st.pyplot()
streamlit seaborn
最新推荐文章于 2024-08-06 23:29:52 发布