当前位置:首页>python>1小时22分速通Python可视化基础

1小时22分速通Python可视化基础

  • 2026-01-24 17:29:36
1小时22分速通Python可视化基础

Introduction

Hello,各位好久不见!经过长达大半年的大鸽后,我回来更新了(实际上如果去掉中间短暂地更新了一次DeepSeek的内容,时长已经超过一年了)。

对于大鸽,其中不乏很多事务繁忙的要素。

比如离开了一个城市,又重新进入了象牙塔开启中断的学业;论文的写作、修改、投稿、拒稿、返修,反复循环;在青藏高原开展了长达小两个月的野外考察,回来又面对着庞大的账目,同时还得应付为数不少的课程等。

但也有另一方面的原因是,已经鸽到心安理得,不愿意打破现状了(比如这篇推文,早在至少两周前就已经构思好了)。

说起来本人算不上什么高能量人群,在新城市出门逛的多,而逛完后又需要进入修复状态恢复能量。

不过,现在总体算是安顿下来,可以慢慢地静下心来开始新的阶段了。

之前我们系统性地介绍了Python基础语法和科学计算中最常用的两个库NumPyPandas,那么下一步自然就是使用可视化展示数据的问题了。

MatplotlibPython中最常用的可视化库,它提供了一系列绘图函数,可以轻松地创建各种图表。诸如ProplotPlotlyCartopy这些库,都是基于Matplotlib的扩展。

所以我们今天就从Matplotlib的基础结构出发介绍Python可视化,后续以此推广到更高阶的可视化模块和第三方库。

创建第一个图形

首先,让我们使用Matplotlib库创建一个最基础的图形。

我们需要用到的是matplotlib.pyplot模块,它提供了一系列函数用于创建各种图形。

import matplotlib.pyplot as pltimport numpy as np

我们假定某地一天的气温变化符合正弦波,按小时步长创建出温度曲线。

temp = np.sin(np.linspace(-1/2*np.pi, 3/2*np.pi, 24))temp
array([-1.        , -0.96291729, -0.8544194 , -0.68255314, -0.46006504,       -0.20345601,  0.06824241,  0.33487961,  0.57668032,  0.77571129,        0.9172113 ,  0.99068595,  0.99068595,  0.9172113 ,  0.77571129,        0.57668032,  0.33487961,  0.06824241, -0.20345601, -0.46006504,       -0.68255314, -0.8544194 , -0.96291729, -1.        ])

于是,通过指定xy数据,即可使用plot()函数绘制出变化曲线。

plt.plot(range(24), temp)

此时,整个图像的大小与横纵比均是由Python自适应调整得到。我们可以通过创建画布,使用figsize参数指定其大小即可自定义。

plt.figure(figsize=(106))         # 创建画布并指定横纵长度plt.plot(range(24), temp + np.random.rand(24))

值得注意的是,当我们不创建新的画布,绘图将会在当前画布上继续绘制。

plt.plot(range(24), temp + np.random.rand(24))plt.plot(range(24), temp + np.random.rand(24))plt.plot(range(24), temp + np.random.rand(24))

下面,继续看为每张图创建新画布的例子。

同时,我们还可以设置facecolordpi等参数设置画布。

plt.figure(figsize=(64))plt.plot(range(24), temp + np.random.rand(24))plt.figure(figsize=(64), facecolor='cyan')            # 设置画布底色为青色plt.plot(range(24), temp + np.random.rand(24))plt.figure(figsize=(64), dpi=400)                    # 设置画布分辨率为400plt.plot(range(24), temp + np.random.rand(24))

调整图形符号

创建图形后,我们可以进一步设置图形符号,如线条、颜色、透明度等,实现更丰富的可视化效果。

首先,我们尝试将正弦曲线修改为红色虚线。分别通过设置参数linestylecolor来实现,二者可以等效缩写为lsc。后续存在混用,将不再赘述。

plt.plot(range(24), temp, c='r', linestyle='--')

进一步设置alpha参数,调整透明度。

plt.plot(range(24), temp, c='r', linestyle='--', alpha=0.5)

有时候我们需要在数据中突出显示数据点位,我们可以通过设置marker属性来实现。

主要属性包括:

  • marker:设置数据点的形状,如点、圆圈、正方形、三角形、星形等
  • markersize:设置数据点的大小
  • markeredgewidth:设置数据点的边框宽度
  • markerfacecolor:设置数据点的填充颜色
  • markeredgecolor:设置数据点的边框颜色
plt.plot(range(24), temp, c='r', linestyle='--', marker='o', markersize=8, markerfacecolor='white', markeredgecolor='r', markeredgewidth=1.2)

我们可以进一步为图表指定坐标标注和标题。

plt.plot(range(24), temp, c='r', linestyle='--', marker='o', markersize=8, markerfacecolor='white', markeredgecolor='r')plt.xlabel('Hour of the day')plt.ylabel('Temperature (Celsius)')plt.title('Temperature over the day')

有时候绘图自带的字体类型、字体大小、字体风格等不令人满意,我们也可以通过一系列参数来自定义:

  • fontname:字体名称
  • fontsize:字体大小,单位为pt
  • fontstyle:字体风格,可以是normalitalicoblique
  • fontweight:字体粗细,可以是 lightnormalregularbold
plt.plot(range(24), temp, c='r', linestyle='--', marker='o', markersize=8, markerfacecolor='white', markeredgecolor='r')plt.xlabel('Hour of the day', fontname='Ubuntu Mono', fontsize='14', fontweight='bold', fontstyle='italic')plt.ylabel('Temperature (Celsius)')plt.title('Temperature over the day')

但很多时候这种字体修改在每个涉及字体的位置都自定义显得过于臃肿,我们可以修改全局字体设置,使得当前绘图代码基础字体参数全部修改。

下面我们通过设置font.sizefont.family,对全局默认字体类型和字体大小进行修改。

plt.rcParams['font.size'] = 12plt.rcParams['font.family'] = 'Ubuntu Mono'plt.plot(range(24), temp, c='r', linestyle='--', marker='o', markersize=8, markerfacecolor='white', markeredgecolor='r')plt.xlabel('Hour of the day')plt.ylabel('Temperature (Celsius)')plt.title('Temperature over the day')plt.show()

坐标及标注

除去图形本身,对于图表而言,合适地显示坐标也是可视化中重要的一步。

24h的气温变化可能难以看出这一特征,我们创建一个小时尺度的月气温数据作为案例探讨。

import pandas as pdtemp0 = temp.copy()temp = temp0 + np.random.rand(24)df = pd.DataFrame({'Time': pd.date_range('2025-11-01', periods=30*24, freq='1h'),'Beijing': (temp * 10).tolist() * 30,'Shenzhen': (temp * 10 + 10).tolist() * 30})df.set_index('Time', inplace=True)df
Beijing
Shenzhen
Time
2025-11-01 00:00:00
-2.787003
7.212997
2025-11-01 01:00:00
-3.827549
6.172451
2025-11-01 02:00:00
0.636398
10.636398
2025-11-01 03:00:00
2.737090
12.737090
2025-11-01 04:00:00
-0.366644
9.633356
...
...
...
2025-11-30 19:00:00
-0.627437
9.372563
2025-11-30 20:00:00
-0.527493
9.472507
2025-11-30 21:00:00
-1.624290
8.375710
2025-11-30 22:00:00
-2.430854
7.569146
2025-11-30 23:00:00
-1.025407
8.974593

720 rows × 2 columns

标注

由于时间序列涉及到日期,一旦显示过于密集就会挤成一团。

典型情况如下图所示:

plt.plot(df['Shenzhen'], c='r')plt.xlabel('Hour of the day')plt.ylabel('Temperature (Celsius)')plt.title('Temperature over the day')

一种可能的解决方式是,我们可以拉长画布。

plt.figure(figsize=(124))plt.plot(df['Shenzhen'], c='r')plt.xlabel('Hour of the day')plt.ylabel('Temperature (Celsius)')plt.title('Temperature over the day')

看起来似乎好很多了,但是后面两个日期叠在一起。

更好的方案是自定义坐标轴刻度位置和刻度标签。

主刻度

Python中可以对主刻度和副刻度分别进行调整,这里首先介绍主刻度。

首先,我们可以使用xticks()yticks()函数来设置主刻度显示位置。

plt.figure(figsize=(124))plt.plot(df['Shenzhen'], c='r')plt.xlabel('Hour of the day')plt.ylabel('Temperature (Celsius)')plt.title('Temperature over the day')plt.xticks(['2025-11-01''2025-11-08''2025-11-15''2025-11-22''2025-11-29'])plt.yticks([102030])

当然,不仅是指定刻度位置那么简单而已。我们可以再传入一个列表,告诉函数我们这几个刻度位置应该显示什么内容。

plt.figure(figsize=(124))plt.plot(df['Shenzhen'], c='r')plt.xlabel('Hour of the day')plt.ylabel('Temperature (Celsius)')plt.title('Temperature over the day')plt.xticks(['2025-11-01''2025-11-08''2025-11-15''2025-11-22''2025-11-29'], ['Nov.1 25''Nov.8 25''Nov.15 25''Nov.22 25''Nov.29 25'])plt.yticks([102030], ['10°C''20°C''30°C'])

由于是人为指定位置,自然显示位置也不必须是等距的。

plt.figure(figsize=(124))plt.plot(df['Shenzhen'], c='r')plt.xlabel('Hour of the day')plt.ylabel('Temperature (Celsius)')plt.title('Temperature over the day')plt.xticks(['2025-11-01''2025-11-05''2025-11-15''2025-11-20''2025-11-30'], ['Nov.1 25''Nov/5 25''25 Nov.15''25-11-20''25/11~30'])plt.yticks([03.1430], ['273.15K''3.14°C'f'{30 * 9/5 + 32:.1f}°F'])

如果我们不传入任何内容,刻度就会消失。

plt.figure(figsize=(124))plt.plot(df['Shenzhen'], c='r')plt.xticks([])plt.yticks([])

也可以使用tick_params()函数进一步调整刻度标注大小、刻度线形状。

plt.figure(figsize=(124))plt.plot(df['Shenzhen'], c='r')plt.xlabel('Hour of the day')plt.ylabel('Temperature (Celsius)')plt.title('Temperature over the day')plt.xticks(['2025-11-01''2025-11-08''2025-11-15''2025-11-22''2025-11-29'])plt.yticks([102030])plt.tick_params(axis='x', which='major', labelsize=5)plt.tick_params(axis='y', which='major', labelsize=15, direction='in', length=5, width=2)

以及,刻度显示的坐标轴。

plt.figure(figsize=(124))plt.plot(df.index.values, df['Shenzhen'].values, c='r')plt.xlabel('Hour of the day')plt.ylabel('Temperature (Celsius)')plt.title('Temperature over the day')plt.tick_params(axis='both', which='major', labelsize=10, direction='in', bottom=True, top=True, left=True, right=True)

副刻度

副刻度默认是关闭的,可以通过minorticks_on()函数开启。

plt.figure(figsize=(124))plt.plot(df.index.values, df['Shenzhen'].values, c='r')plt.xlabel('Hour of the day')plt.ylabel('Temperature (Celsius)')plt.title('Temperature over the day')plt.minorticks_on()

同样,也可以与主刻度一样进行个性化。

plt.figure(figsize=(124))plt.plot(df.index.values, df['Shenzhen'].values, c='r')plt.xlabel('Hour of the day')plt.ylabel('Temperature (Celsius)')plt.title('Temperature over the day')plt.minorticks_on()plt.tick_params(which='minor', length=8, width=1)

坐标显示范围

很多时候我们并不需要显示完整的数据序列,或者存在个别奇异值导致整个曲线变化幅度很不明显。

这种时候,我们可能需要调整图表的显示范围达到所需的可视化效果。

plt.figure(figsize=(124))plt.plot(df['Shenzhen'], c='r')plt.xlabel('Hour of the day')plt.ylabel('Temperature (Celsius)')plt.title('Temperature over the day')plt.xlim(df.index[0], df.index[7 * 24])         # 显示前7天逐小时气温plt.ylim(035)                                 # 气温显示范围调整为0-35°C

图例

作为图表的重要组成要素,图例是绘图不可或缺的要素之一。

Matplotlib中,我们只需要在绘图时指定label参数,即可通过legend()函数来创建图例。

plt.figure(figsize=(124))plt.plot(df['Beijing'], c='tab:green', label='Beijing')plt.plot(df['Shenzhen'], c='r', label='Shenzhen')plt.xlabel('Hour of the day')plt.ylabel('Temperature (Celsius)')plt.title('Temperature over the day')plt.xticks(['2025-11-01''2025-11-08''2025-11-15''2025-11-22''2025-11-29'])plt.yticks([102030])plt.legend()

通过进一步指定参数,可以调整图例样式。常见参数包括:

  • loc:图例位置,可以是bestupper rightupper leftlower leftlower rightrightcenter leftcenter rightlower centerupper centercenter
  • ncol:图例列数
  • fontsize:字体大小
  • frameon:是否显示边框(TrueFalse
plt.figure(figsize=(124))plt.plot(df['Beijing'], c='tab:green', label='Beijing')plt.plot(df['Shenzhen'], c='r', label='Shenzhen')plt.xlabel('Hour of the day')plt.ylabel('Temperature (Celsius)')plt.title('Temperature over the day')plt.xticks(['2025-11-01''2025-11-08''2025-11-15''2025-11-22''2025-11-29'])plt.yticks([0102030])plt.legend(loc='upper right', ncol=2, frameon=False)

网格与外框

给图形添加网格是一种常见的绘图方式,可以更精细地观察数据分布。

Matplotlib中提供了grid()函数,可以简易地添加网格。

plt.figure(figsize=(124))plt.plot(df['Beijing'], c='tab:green', label='Beijing')plt.plot(df['Shenzhen'], c='r', label='Shenzhen')plt.xlabel('Hour of the day')plt.ylabel('Temperature (Celsius)')plt.title('Temperature over the day')plt.xticks(['2025-11-01''2025-11-08''2025-11-15''2025-11-22''2025-11-29'])plt.yticks([102030])plt.legend()plt.grid(True)

也可以分别对不同的坐标轴单独设置网格线条样式,如果需要同时设置所有坐标轴网格样式,只需移除axis参数即可。

plt.figure(figsize=(124))plt.plot(df['Beijing'], c='tab:green', label='Beijing')plt.plot(df['Shenzhen'], c='r', label='Shenzhen')plt.xlabel('Hour of the day')plt.ylabel('Temperature (Celsius)')plt.title('Temperature over the day')plt.xticks(['2025-11-01''2025-11-08''2025-11-15''2025-11-22''2025-11-29'])plt.yticks([102030])plt.legend()plt.grid(True, linestyle='--', alpha=0.7, which='major', c='tab:blue', axis='x')plt.grid(True, linestyle='--', alpha=0.7, which='major', c='deeppink', axis='y')

以中学时代学习坐标系的经验出发,上下左右完整的四个坐标轴并非必要,我们可以选择关掉其中的一些。

plt.figure(figsize=(124))plt.plot(df['Beijing'], c='tab:green', label='Beijing')plt.plot(df['Shenzhen'], c='r', label='Shenzhen')plt.xlabel('Hour of the day')plt.ylabel('Temperature (Celsius)')plt.title('Temperature over the day')plt.xticks(['2025-11-01''2025-11-08''2025-11-15''2025-11-22''2025-11-29'])plt.yticks([102030])plt.ylim(-530)plt.legend()plt.gca().spines['top'].set_visible(False)plt.gca().spines['right'].set_visible(False

其中,gca()函数用于获取当前的坐标轴,spines属性用于获取坐标轴的边框,set_visible方法用于设置边框的可见性。

子图

最后,我们简要引入一下子图。这里仅作展示,更详细的内容我们后续专栏报道。

很多时候,我们需要将多个图画在同一个画布上,这时候就需要用到子图(Subplot)。我们可以使用 subplots() 函数来创建子图,并指定行数和列数。

fig, axes = plt.subplots(24, figsize=(1610))            # 创建2行4列的子图,并设置子图的尺寸为(16, 10)fig.subplots_adjust(wspace=0.1, hspace=0.05)# 创建2个列表,分别存储不同色彩映射的函数cmaps = [[plt.cm.viridis, plt.cm.plasma, plt.cm.inferno, plt.cm.magma],         [plt.cm.cividis, plt.cm.Greys, plt.cm.Purples, plt.cm.Blues]]# 遍历绘制子图,分别设置标题和色彩映射for i in range(2):for j in range(4):        ax = axes[i, j]# imshow()函数用于绘制二维数组        h = ax.imshow(np.random.rand(100100), cmap=cmaps[i][j])        ax.set_title(f"({i}{j})")        fig.colorbar(h, ax=ax, orientation="horizontal", shrink=0.8, pad=0.1)

pltax

这里需要注意到,相比之前设置各项图形符号等要素使用的都是从plt模块中调用的函数,我们这里是基于ax对象的方法来设置图形符号等要素。

二者的区别在于,plt仅作用于最后一个图形区域,而ax对象通过指定不同的图形区域名称可以作用于不同的图形区域。

如下面的例子,我们可以指定ax代表的图形区域来修改特定的图形。

fig, axes = plt.subplots(24, figsize=(206))fig.subplots_adjust(wspace=0.15, hspace=0.25)cs = [['tab:red''tab:blue''tab:green''tab:orange''tab:purple'],         ['tab:pink''tab:gray''tab:olive''tab:brown''tab:cyan']]for i in range(2):for j in range(4):        ax = axes[i, j]        h = ax.plot(np.random.rand(100), c=cs[i][j])        ax.set_title(f"({i}{j})")        ax.spines['top'].set_visible(False)        ax.spines['right'].set_visible(False)        ax.set_ylim(01)        ax.set_xlim(0100)# 在第0行第1列的图中追加一条曲线ax = axes[01]ax.plot(np.random.rand(100), c='deeppink')# 可为所有子图设置一个大标题plt.suptitle("Random Plot", fontsize=16)

保存图像

最后是绘制的图形保存的问题,可以使用savefig()函数将图形保存为特定格式文件。

同时,还可以对参数进行一些设置,如:

  • format:设置图像的格式,默认为png
  • dpi:设置图像的分辨率,默认为100
  • transparent:设置背景是否透明,默认为False
fig, axes = plt.subplots(12, figsize=(84))fig.subplots_adjust(wspace=0.1, hspace=0.1)ax = axes[0]h = ax.plot(np.random.rand(100), c='deeppink')ax.set_title(f"Line Plot")ax.spines['top'].set_visible(False)ax.spines['right'].set_visible(False)ax.set_ylim(01)ax.set_xlim(0100)ax = axes[1]h = ax.imshow(np.random.rand(100100), cmap='RdYlBu_r')ax.set_title(f"Imshow Plot")plt.suptitle("Combine Plot", fontsize=16)plt.savefig("CombinePlot.png", dpi=400, transparent=True)

后日谈

以上就是我对Python可视化基本框架的一些理解,后续我们便可基于这一框架开展不同类型的可视化探索。

个中函数我列出的只是一些我比较常用的参数,还有很多参数没有提及,如有需要还请自行探索。

本次开更后,由于基础性的科学计算内容我们已经系统性介绍过了,后续希望能够更新一些更贴近地球科学领域的内容。

下次再见。

Manuscript: RitasCake
Proof: Philero(你什么开始更新?); RitasCake

获取更多资讯,欢迎订阅微信公众号:Westerlies

「阅读原文」跳转和鲸社区,云端运行本文案例。

SC.Pandas 03 | 如何使用Pandas分析时间序列数据?

SC.Pandas 02 | 如何使用Pandas计算、统计地球科学数据?

SC.Pandas 01 | 如何使用Pandas分析地球科学数据?

SC.NumPy 04 | 重构地球科学数据的一千〇一种方式 100%

SC.NumPy 03 | 重构地球科学数据的一千〇一种方式 ½

关注我们,阅读原文跳转和鲸社区

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-02-09 09:00:48 HTTP/2.0 GET : https://f.mffb.com.cn/a/460254.html
  2. 运行时间 : 0.339877s [ 吞吐率:2.94req/s ] 内存消耗:4,978.34kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=23c56ad394ccb2d257469ce45ddda5fd
  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.000991s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001519s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.005637s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000992s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001387s ]
  6. SELECT * FROM `set` [ RunTime:0.001828s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001485s ]
  8. SELECT * FROM `article` WHERE `id` = 460254 LIMIT 1 [ RunTime:0.029800s ]
  9. UPDATE `article` SET `lasttime` = 1770598848 WHERE `id` = 460254 [ RunTime:0.016909s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000736s ]
  11. SELECT * FROM `article` WHERE `id` < 460254 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.002021s ]
  12. SELECT * FROM `article` WHERE `id` > 460254 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.005168s ]
  13. SELECT * FROM `article` WHERE `id` < 460254 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.014847s ]
  14. SELECT * FROM `article` WHERE `id` < 460254 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.057418s ]
  15. SELECT * FROM `article` WHERE `id` < 460254 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.015068s ]
0.343629s