当前位置:首页>python>Python数据可视化:高级篇 - Seaborn

Python数据可视化:高级篇 - Seaborn

  • 2026-04-21 02:38:32
Python数据可视化:高级篇 - Seaborn

引言:为什么选择Seaborn?

Seaborn是基于Matplotlib的高级数据可视化库,它提供了更简洁的API和更美观的默认样式,让你能够用更少的代码创建出更专业的统计图表。

与Matplotlib相比,Seaborn的优势在于:

  • 更简洁的API:一行代码就能创建复杂的统计图表
  • 更美观的默认样式:无需大量美化代码就能获得专业效果
  • 更好的统计支持:内置多种统计图表,自动处理数据聚合
  • 无缝集成Pandas:直接支持DataFrame数据结构

本文将带你掌握Seaborn的核心技能。


一、Seaborn介绍

什么是Seaborn

Seaborn是基于Matplotlib的高级数据可视化库,专注于统计数据可视化。

特点

  • 统计图表:内置箱线图、小提琴图、热力图等
  • 自动聚合:自动处理分类数据和聚合统计
  • 美观样式:默认样式精美,减少美化代码
  • Pandas集成:与DataFrame无缝集成

二、环境搭建

1. 安装Seaborn

# 使用pip安装
pip install seaborn matplotlib numpy pandas

# 或使用conda安装
conda install seaborn matplotlib numpy pandas

2. 验证安装

import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd

print("Seaborn版本:", sns.__version__)
print("环境搭建成功!")

3. 设置中文字体和样式

# 设置中文字体
plt.rcParams["font.sans-serif"] = ["SimHei"]
plt.rcParams["axes.unicode_minus"] = False

# 设置Seaborn风格
sns.set_style("whitegrid")  # 可选: darkgrid, white, dark, ticks
sns.set_palette("viridis")   # 可选: deep, muted, bright, pastel, dark, colorblind

三、分类数据可视化

1. 箱线图(Box Plot)

箱线图适合展示数据的分布和异常值。

import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np

# 设置中文字体
plt.rcParams["font.sans-serif"] = ["SimHei"]
plt.rcParams["axes.unicode_minus"] = False
sns.set_style("whitegrid")

# 加载示例数据
iris = sns.load_dataset('iris')

# 绘制箱线图
plt.figure(figsize=(126))
sns.boxplot(x='species', y='sepal_length', data=iris, 
            palette='Set2', linewidth=2)
plt.title('不同品种鸢尾花的萼片长度分布', fontsize=14)
plt.xlabel('品种', fontsize=12)
plt.ylabel('萼片长度 (cm)', fontsize=12)
plt.show()

2. 小提琴图(Violin Plot)

小提琴图结合了箱线图和密度图的特点。

plt.figure(figsize=(126))
sns.violinplot(x='species', y='sepal_length', data=iris,
               palette='Set2', inner='quartile')  # inner可选: box, quartile, point, stick
plt.title('不同品种鸢尾花的萼片长度分布(小提琴图)', fontsize=14)
plt.xlabel('品种', fontsize=12)
plt.ylabel('萼片长度 (cm)', fontsize=12)
plt.show()

3. 条形图(Bar Plot)

条形图显示分类变量的中心趋势估计。

tips = sns.load_dataset('tips')

plt.figure(figsize=(106))
sns.barplot(x='day', y='total_bill', data=tips, 
            palette='viridis', ci=95)  # ci表示置信区间
plt.title('每天的平均账单金额', fontsize=14)
plt.xlabel('星期', fontsize=12)
plt.ylabel('平均账单金额 ($)', fontsize=12)
plt.show()

4. 计数图(Count Plot)

计数图显示每个类别中的观测数量。

plt.figure(figsize=(106))
sns.countplot(x='day', data=tips, palette='viridis', hue='time')
plt.title('每天的用餐人数', fontsize=14)
plt.xlabel('星期', fontsize=12)
plt.ylabel('人数', fontsize=12)
plt.legend(title='用餐时间')
plt.show()

5. 点图(Point Plot)

点图用点和误差线显示中心趋势和置信区间。

plt.figure(figsize=(106))
sns.pointplot(x='day', y='total_bill', data=tips, 
              hue='sex', palette='Set2', capsize=0.1)
plt.title('不同性别每天的平均账单', fontsize=14)
plt.xlabel('星期', fontsize=12)
plt.ylabel('平均账单 ($)', fontsize=12)
plt.legend(title='性别')
plt.show()

四、关系数据可视化

1. 散点图(Scatter Plot)

散点图展示两个变量之间的关系。

plt.figure(figsize=(106))
sns.scatterplot(x='total_bill', y='tip', data=tips,
                hue='sex', size='size', sizes=(50200),
                palette='Set2', alpha=0.7)
plt.title('账单金额与小费的关系', fontsize=14)
plt.xlabel('账单金额 ($)', fontsize=12)
plt.ylabel('小费 ($)', fontsize=12)
plt.legend(bbox_to_anchor=(1.051), loc='upper left')
plt.tight_layout()
plt.show()

2. 线图(Line Plot)

线图适合展示连续变量之间的关系。

# 创建时间序列数据
np.random.seed(42)
time = np.arange(100)
value1 = np.cumsum(np.random.randn(100))
value2 = np.cumsum(np.random.randn(100))
df_line = pd.DataFrame({'时间': time, '序列A': value1, '序列B': value2})

plt.figure(figsize=(126))
sns.lineplot(x='时间', y='value', hue='variable'
             data=pd.melt(df_line, ['时间']),
             palette='Set2', linewidth=2)
plt.title('时间序列对比', fontsize=14)
plt.xlabel('时间', fontsize=12)
plt.ylabel('值', fontsize=12)
plt.show()

3. 联合分布图(Joint Plot)

联合分布图同时展示两个变量的关系和各自的分布。

g = sns.jointplot(x='total_bill', y='tip', data=tips,
                  kind='reg', height=8, color='
#4ECDC4')
g.fig.suptitle('账单金额与小费的关系', fontsize=14, y=1.02)
g.set_axis_labels('账单金额 ($)''小费 ($)', fontsize=12)
plt.show()

4. 配对图(Pair Plot)

配对图展示数据集中所有变量两两之间的关系。

g = sns.pairplot(iris, hue='species', palette='Set2'
                 diag_kind='kde', height=2.5)
g.fig.suptitle('鸢尾花数据配对图', fontsize=16, y=1.02)
plt.show()

五、分布数据可视化

1. 直方图(Histogram)

直方图展示单变量的分布。

plt.figure(figsize=(106))
sns.histplot(data=tips, x='total_bill', bins=20
             kde=True, color='#45B7D1', edgecolor='black')
plt.title('账单金额分布', fontsize=14)
plt.xlabel('账单金额 ($)', fontsize=12)
plt.ylabel('频率', fontsize=12)
plt.show()

2. 核密度估计图(KDE Plot)

KDE图展示连续变量的概率密度。

plt.figure(figsize=(106))
sns.kdeplot(data=tips, x='total_bill', hue='time',
            fill=True, palette='Set2', alpha=0.5, linewidth=2)
plt.title('不同用餐时间的账单金额分布', fontsize=14)
plt.xlabel('账单金额 ($)', fontsize=12)
plt.ylabel('密度', fontsize=12)
plt.show()

3.  rugplot

Rugplot在坐标轴上显示每个数据点。

plt.figure(figsize=(106))
sns.kdeplot(data=tips, x='total_bill', color='#4ECDC4', fill=True)
sns.rugplot(data=tips, x='total_bill', color='#FF6B6B', height=0.05)
plt.title('账单金额分布(带rugplot)', fontsize=14)
plt.xlabel('账单金额 ($)', fontsize=12)
plt.ylabel('密度', fontsize=12)
plt.show()

4. ECDF图

ECDF(经验累积分布函数)图展示数据的累积分布。

plt.figure(figsize=(106))
sns.ecdfplot(data=tips, x='total_bill', hue='sex'
             palette='Set2', linewidth=2)
plt.title('账单金额的累积分布', fontsize=14)
plt.xlabel('账单金额 ($)', fontsize=12)
plt.ylabel('ECDF', fontsize=12)
plt.show()

六、矩阵图和热力图

1. 相关性热力图

热力图非常适合展示相关性矩阵。

# 计算相关性矩阵
corr = iris.corr(numeric_only=True)

plt.figure(figsize=(108))
sns.heatmap(corr, annot=True, cmap='coolwarm'
            center=0, square=True, linewidths=1
            cbar_kws={"shrink"0.8}, fmt='.2f')
plt.title('鸢尾花数据相关性热力图', fontsize=14)
plt.xticks(rotation=45, ha='right')
plt.yticks(rotation=0)
plt.tight_layout()
plt.show()

2. 聚类热力图

聚类热力图同时对行和列进行层次聚类。

g = sns.clustermap(iris.drop('species', axis=1), 
                    cmap='coolwarm', standard_scale=1,
                    figsize=(108))
g.fig.suptitle('鸢尾花数据聚类热力图', fontsize=14, y=1.02)
plt.show()

七、样式和主题设置

1. 设置样式

# 查看可用样式
print(sns.axes_style())

# 试用不同样式
styles = ['darkgrid''whitegrid''dark''white''ticks']

fig, axes = plt.subplots(15, figsize=(204))

for i, style in enumerate(styles):
    sns.set_style(style)
    sns.histplot(data=tips, x='total_bill', ax=axes[i], color='#4ECDC4')
    axes[i].set_title(style)
    axes[i].set_xlabel('')
    axes[i].set_ylabel('')

plt.tight_layout()
plt.show()

# 恢复默认样式
sns.set_style("whitegrid")

2. 设置调色板

# 查看可用调色板
print(sns.color_palette())

# 试用不同调色板
palettes = ['deep''muted''bright''pastel''dark''colorblind'
'Set2''viridis''coolwarm']

fig, axes = plt.subplots(33, figsize=(1512))
axes = axes.flatten()

for i, palette in enumerate(palettes):
    sns.set_palette(palette)
    sns.barplot(x='day', y='total_bill', data=tips, ax=axes[i])
    axes[i].set_title(palette)
    axes[i].set_xlabel('')
    axes[i].set_ylabel('')

plt.tight_layout()
plt.show()

# 恢复默认调色板
sns.set_palette("viridis")

3. 设置上下文

# 试用不同上下文
contexts = ['paper''notebook''talk''poster']

fig, axes = plt.subplots(22, figsize=(1410))
axes = axes.flatten()

for i, context in enumerate(contexts):
    sns.set_context(context, font_scale=1.2)
    sns.histplot(data=tips, x='total_bill', ax=axes[i], color='#4ECDC4')
    axes[i].set_title(context)

plt.tight_layout()
plt.show()

# 恢复默认上下文
sns.set_context("notebook", font_scale=1)

八、实战案例:销售数据分析

1. 数据描述

我们有一份销售数据,包含以下字段:

  • date: 销售日期
  • product: 产品名称
  • category: 产品类别
  • quantity: 销售数量
  • price: 单价
  • revenue: 销售额

2. 可视化目标

  • 分析产品类别销售分布
  • 分析价格与销售额的关系
  • 分析月度销售情况

3. 代码实现

import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np

# 设置中文字体和样式
plt.rcParams["font.sans-serif"] = ["SimHei"]
plt.rcParams["axes.unicode_minus"] = False
sns.set_style("whitegrid")
sns.set_palette("viridis")

# 创建模拟数据
np.random.seed(42)
dates = pd.date_range('2024-01-01''2024-12-31', freq='D')
products = ['智能手机''笔记本电脑''平板电脑''耳机''充电器']
categories = ['电子产品''电子产品''电子产品''配件''配件']

data = {
'date': np.random.choice(dates, 1000),
'product': np.random.choice(products, 1000),
'category': np.random.choice(categories, 1000),
'quantity': np.random.randint(1101000),
'price': np.random.choice([29995999199929999], 1000)
}

df = pd.DataFrame(data)
df['revenue'] = df['quantity'] * df['price']
df['month'] = df['date'].dt.month

# 1. 产品类别销售分布
fig, (ax1, ax2) = plt.subplots(12, figsize=(166))

# 箱线图
sns.boxplot(x='category', y='revenue', data=df, ax=ax1, palette='Set2')
ax1.set_title('不同类别的销售额分布', fontsize=14)
ax1.set_xlabel('类别', fontsize=12)
ax1.set_ylabel('销售额', fontsize=12)

# 小提琴图
sns.violinplot(x='category', y='revenue', data=df, ax=ax2, palette='Set2')
ax2.set_title('不同类别的销售额分布(小提琴图)', fontsize=14)
ax2.set_xlabel('类别', fontsize=12)
ax2.set_ylabel('销售额', fontsize=12)

plt.tight_layout()
plt.show()

# 2. 价格与销售额的关系
plt.figure(figsize=(126))
sns.scatterplot(x='price', y='revenue', data=df, 
                hue='category', size='quantity', sizes=(50300),
                palette='Set2', alpha=0.6)
plt.title('价格与销售额的关系', fontsize=14)
plt.xlabel('价格', fontsize=12)
plt.ylabel('销售额', fontsize=12)
plt.legend(bbox_to_anchor=(1.051), loc='upper left')
plt.tight_layout()
plt.show()

# 3. 月度销售情况
plt.figure(figsize=(126))
sns.barplot(x='month', y='revenue', data=df, 
            palette='viridis', errorbar=('ci'95))
months = ['1月''2月''3月''4月''5月''6月'
'7月''8月''9月''10月''11月''12月']
plt.title('月度平均销售额', fontsize=14)
plt.xlabel('月份', fontsize=12)
plt.ylabel('平均销售额', fontsize=12)
plt.xticks(range(12), months)
plt.show()

# 4. 相关性热力图
corr = df[['quantity''price''revenue']].corr()

plt.figure(figsize=(86))
sns.heatmap(corr, annot=True, cmap='coolwarm'
            center=0, square=True, linewidths=1, fmt='.2f')
plt.title('销售数据相关性热力图', fontsize=14)
plt.tight_layout()
plt.show()

九、最佳实践

1. 选择合适的图表

数据类型
Seaborn图表
分类数据分布
boxplot, violinplot
分类数据计数
countplot
分类数据统计
barplot, pointplot
两个变量关系
scatterplot, lineplot
多变量关系
pairplot, jointplot
单变量分布
histplot, kdeplot
相关性
heatmap

2. 设计原则

  • 从简原则:先使用默认样式,再按需美化
  • 色彩搭配:使用Seaborn内置的调色板
  • 清晰标注:确保标题、坐标轴标签清晰易读
  • 合理布局:使用tight_layout避免重叠

十、学习资源推荐

1. 官方资源

  • Seaborn官网:https://seaborn.pydata.org/
  • Seaborn教程:https://seaborn.pydata.org/tutorial.html
  • Seaborn示例库:https://seaborn.pydata.org/examples/index.html

2. 书籍

  • 《Python数据可视化》(Kelsey Innes)
  • 《Python数据科学手册》(Jake VanderPlas)

十一、总结

Seaborn让统计数据可视化变得简单而优雅。通过本文的学习,你已经掌握了:

  • Seaborn的基本概念和环境搭建
  • 分类数据、关系数据、分布数据的可视化
  • 矩阵图和热力图的使用
  • 样式和主题的自定义
  • 实战案例应用

Seaborn和Matplotlib配合使用,可以满足绝大多数数据可视化需求。记住,好的可视化是技术和艺术的结合,多实践、多尝试,你会越来越熟练!

小贴士:Seaborn是Matplotlib的高级封装,掌握Matplotlib基础能让你更好地理解和使用Seaborn。遇到复杂需求时,可以直接使用Matplotlib进行定制。

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-04-21 20:03:23 HTTP/2.0 GET : https://f.mffb.com.cn/a/484190.html
  2. 运行时间 : 0.111983s [ 吞吐率:8.93req/s ] 内存消耗:4,556.26kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=fa87365e477d2855e8c81a1ac3f9306d
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000533s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000613s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000283s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000256s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000499s ]
  6. SELECT * FROM `set` [ RunTime:0.000193s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000484s ]
  8. SELECT * FROM `article` WHERE `id` = 484190 LIMIT 1 [ RunTime:0.000784s ]
  9. UPDATE `article` SET `lasttime` = 1776773003 WHERE `id` = 484190 [ RunTime:0.002702s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000283s ]
  11. SELECT * FROM `article` WHERE `id` < 484190 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000513s ]
  12. SELECT * FROM `article` WHERE `id` > 484190 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000396s ]
  13. SELECT * FROM `article` WHERE `id` < 484190 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.001340s ]
  14. SELECT * FROM `article` WHERE `id` < 484190 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.001440s ]
  15. SELECT * FROM `article` WHERE `id` < 484190 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.001088s ]
0.113547s