当前位置:首页>python>科研绘图系列:R和python画图代码对比

科研绘图系列:R和python画图代码对比

  • 2026-03-26 21:18:29
科研绘图系列:R和python画图代码对比

专注收集和自写可发表的科研图形的数据和代码分享,该系列的数据均可从以下链接下载:

百度云盘链接: https://pan.baidu.com/s/1M4vgU1ls0tilt0oSwFbqYQ提取码: 请关注WX公zhong号 生信学习者 后台发送 科研绘图 获取提取码

介绍

在数据科学和统计分析领域,R和Python都是广泛使用的编程语言,它们都提供了丰富的数据可视化工具和库。以下是对使用R和Python进行散点图、箱线图、条形图和热图绘制的比较。

每种语言都有其独特的优势和特点。R语言以其统计分析功能和丰富的图形库而闻名,特别适合于数据可视化和图形展示。Python则以其通用性和强大的科学计算库而受到欢迎,其数据可视化库如matplotlib和seaborn提供了灵活的图表定制选项。

我们通过reticulateR包协同Python和R之间数据流转。

加载R包

knitr::opts_chunk$set(message = FALSE, warning = FALSE)library(tidyverse)library(scales)library(reshape2)# rm(list = ls())options(stringsAsFactors = F)options(future.globals.maxSize = 10000 * 1024^2)

加载reticulate包

reticulate协同R和python操作的工具。

# install.packages("reticulate")library(reticulate)

设置python环境

reticulate提供的use_condaenv函数选择python环境(使用conda管理python环境)

use_condaenv("base", required = TRUE)

散点图

  • R代码

iris %>% mutate(Species=factor(Species, levels = c("setosa", "versicolor", "virginica"))) %>%  ggplot(aes(x=Sepal.Width, y=Petal.Width, color=Species))+  geom_point()+  guides(color=guide_legend("", keywidth = .5, keyheight = .5))+  labs(title = 'Scatter plot')+  theme_bw()+  scale_color_manual(values = c("red", "green", "blue"))+  theme(plot.title = element_text(size = 10, color = "black", face = "bold", hjust = 0.5),       axis.title = element_text(size = 10, color = "black", face = "bold"),      axis.text = element_text(size = 9, color = "black"),      text = element_text(size = 8, color = "black"),      strip.text = element_text(size = 9, color = "black", face = "bold"),      panel.grid = element_blank(),      legend.position = c(1, 1),      legend.justification = c(1, 1),      legend.background = element_rect(fill="white", color = "black"))
  • python代码

dat = r.iris  # Python调用R内嵌数据使用r.dataspecies_map = {'setosa':1, 'versicolor':2, 'virginica':3}dat['Species'] = dat['Species'].map(species_map)import numpy as npimport matplotlib.pyplot as plt# plt.scatter(dat['Sepal.Width'], dat['Petal.Width'], c=dat['Species'],#      alpha=0.8, edgecolors='none', s=30, label=["1", "2", "3"])# plt.title('Scatter plot in iris')# plt.xlabel('Sepal.Width (cm)')# plt.ylabel('Petal.Width (cm)')# plt.legend(loc=1)# plt.show()dat1 = (np.array(dat[dat.Species==1]['Sepal.Width']),         np.array(dat[dat.Species==1]['Petal.Width']))dat2 = (np.array(dat[dat.Species==2]['Sepal.Width']),         np.array(dat[dat.Species==2]['Petal.Width']))dat3 = (np.array(dat[dat.Species==3]['Sepal.Width']),         np.array(dat[dat.Species==3]['Petal.Width']))mdat = (dat1, dat2, dat3)colors = ("red", "green", "blue")groups = ("setosa", "versicolor", "virginica")# step1 build figure backgroundfig = plt.figure()# step2 build axisax  = fig.add_subplot(1, 1, 1, facecolor='1.0')  # step3 build figurefor data, color, group in zip(mdat, colors, groups):  x, y = data  ax.scatter(x, y, alpha=0.8, c=color,       edgecolors='none', s=30, label=group)      plt.title('Scatter plot')plt.legend(loc=1)  # step4 show figure in the screenplt.show() 

箱形图

  • R代码

iris %>% mutate(Species=factor(Species, levels = c("setosa", "versicolor", "virginica"))) %>%  ggplot(aes(x=Species, y=Sepal.Width, fill=Species))+  stat_boxplot(geom = "errorbar", width = .12)+  geom_boxplot(width = .3, outlier.shape = 3, outlier.size = 1)+  guides(fill=guide_legend(NULL, keywidth = .5, keyheight = .5))+  xlab("")+  theme_bw()+  scale_fill_manual(values = c("red", "green", "blue"))+  theme(plot.title = element_text(size = 10, color = "black", face = "bold", hjust = 0.5),       axis.title = element_text(size = 10, color = "black", face = "bold"),      axis.text = element_text(size = 9, color = "black"),      text = element_text(size = 8, color = "black"),      strip.text = element_text(size = 9, color = "black", face = "bold"),      panel.grid = element_blank(),      legend.position = c(1, 1),      legend.justification = c(1, 1),      legend.background = element_rect(fill="white", color = "black"))
  • python代码

dat = r.iris  # Python调用R内嵌数据使用r.dataspecies_map = {'setosa':1, 'versicolor':2, 'virginica':3}dat['Species'] = dat['Species'].map(species_map)import numpy as npimport matplotlib.pyplot as pltimport matplotlib.patches as mpatchesdat11 = (np.array(dat[dat.Species==1]['Sepal.Width']))dat21 = (np.array(dat[dat.Species==2]['Sepal.Width']))dat31 = (np.array(dat[dat.Species==3]['Sepal.Width']))mdat2 = (dat11, dat21, dat31)colors = ("red", "green", "blue")groups = ("setosa", "versicolor", "virginica")fig = plt.figure()axes = fig.add_subplot(facecolor='1.0')bplot = axes.boxplot(mdat2, patch_artist=True, notch=0, sym='+', vert=1, whis=1.5,  whiskerprops = dict(linestyle='--',linewidth=1.2, color='black'))# colorfor patch, color in zip(bplot['boxes'], colors):  patch.set_facecolor(color)# axes labelsplt.setp(axes, xticks=[1,2,3],         xticklabels=["setosa", "versicolor", "virginica"])red_patch = mpatches.Patch(color='red', label='setosa')green_patch = mpatches.Patch(color='green', label='versicolor')blue_patch = mpatches.Patch(color='blue', label='virginica')plt.legend(handles=[red_patch, green_patch, blue_patch], loc=1)plt.show()

条形图

  • R代码

iris %>% mutate(Species=factor(Species, levels = c("setosa", "versicolor", "virginica"))) %>%  select(Species, Sepal.Width) %>% group_by(Species) %>%  summarize(avg=mean(Sepal.Width), n=n(), sd=sd(Sepal.Width), se=sd/sqrt(n)) %>%  ungroup() %>%  ggplot(aes(x=Species, y=avg, fill=Species))+  geom_bar(stat="identity", width=.4, color="black")+  geom_errorbar(aes(ymin=avg-sd, ymax=avg+sd), width=.15,                 position=position_dodge(.9), linewidth=1)+  guides(fill=guide_legend(NULL, keywidth = .5, keyheight = .5))+  xlab("")+  ylab("Sepal.Width")+  scale_y_continuous(breaks=seq(0, 3.5,0.5), limits=c(0, 4.4),expand = c(0,0))+  theme_bw()+  scale_fill_manual(values = c("red", "green", "blue"))+  theme(axis.title = element_text(size = 10, color = "black", face = "bold"),      axis.text = element_text(size = 9, color = "black"),      text = element_text(size = 8, color = "black"),      strip.text = element_text(size = 9, color = "black", face = "bold"),      panel.grid = element_blank(),      legend.position = c(1, 1),      legend.justification = c(1, 1),      legend.background = element_rect(fill="white", color = "black"))
  • python代码

dat = r.iris  # Python调用R内嵌数据使用r.dataspecies_map = {'setosa':1, 'versicolor':2, 'virginica':3}dat['Species'] = dat['Species'].map(species_map)import numpy as npimport pandas as pdimport matplotlib.pyplot as pltmean = list(dat['Sepal.Width'].groupby(dat['Species']).mean())sd   = list(dat.groupby('Species').agg(np.std, ddof=0)['Sepal.Width'])colors = ["red", "green", "blue"]df = pd.DataFrame({'mean':mean}, index=["setosa", "versicolor", "virginica"])df.plot(kind='bar', alpha=0.75, rot=0, edgecolor='black',         yerr=sd, align='center', ecolor='black', capsize=5,        color=colors,        ylim=(0.0, 4.4),        yticks=list(np.arange(0, 4.0, 0.5)))# xlabelplt.xlabel('')plt.ylabel('Sepal.Width')# legendred_patch = mpatches.Patch(color='red', label='setosa')green_patch = mpatches.Patch(color='green', label='versicolor')blue_patch = mpatches.Patch(color='blue', label='virginica')plt.legend(handles=[red_patch, green_patch, blue_patch],   # color and group    loc=1,                # location    prop={'size': 8})     # size plt.show()

热图

  • R 代码

get_upper_tri <- function(x){  x[upper.tri(x)] <- NA   return(x)}round(cor(mtcars[, c(1:7)], method = "spearman"), 2) %>%   get_upper_tri() %>% reshape2::melt(na.rm = TRUE) %>%   ggplot(aes(x=Var1, y=Var2, fill=value))+  geom_tile(color = "white")+  scale_fill_gradient2(low = "blue", high = "red", mid = "white",    midpoint = 0, limit = c(-1,1), space = "Lab", name="Spearman\nCorrelation")+  theme_minimal()+  guides(fill = guide_colorbar(barwidth = 7, barheight = 1,                title.position = "top", title.hjust = 0.5))+  coord_fixed()+  geom_text(aes(label = value), color = "black", size = 4)+  scale_y_discrete(position = "right") +  theme(axis.title.x = element_blank(),    axis.title.y = element_blank(),    axis.text.x = element_text(angle = 45, vjust = 1, size = 12, hjust = 1),    panel.grid.major = element_blank(),    panel.border = element_blank(),    panel.background = element_blank(),    axis.ticks = element_blank(),    legend.justification = c(1, 0),    legend.position = c(0.6, 0.7),    legend.direction = "horizontal")
  • python

import pandas as pd import numpy as npimport matplotlib.pyplot as pltimport seaborn as snscorr = r.mtcars.corr()mask = np.zeros_like(corr)mask[np.triu_indices_from(mask)] = Truef, ax = plt.subplots(figsize=(6, 5))heatmap = sns.heatmap(corr, vmin=-1, vmax=1, mask=mask, center=0,  # , orientation='horizontal'  cbar_kws=dict(shrink=.4, label='Spearman\nCorrelation', ticks=[-.8, -.4, 0, .4, .8]),  annot_kws={'size': 8, 'color': 'white'},  #cbar_kws = dict(use_gridspec=False,location="right"),   linewidths=.2, cmap = 'seismic', square=True, annot=True,  xticklabels=corr.columns.values,  yticklabels=corr.columns.values)#add the column names as labelsax.set_xticklabels(corr.columns, rotation = 45)ax.set_yticklabels(corr.columns)sns.set_style({'xtick.bottom': True}, {'ytick.left': True})#heatmap.get_figure().savefig("heatmap.pdf", bbox_inches='tight')plt.show()

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-03-27 06:29:53 HTTP/2.0 GET : https://f.mffb.com.cn/a/483093.html
  2. 运行时间 : 0.184867s [ 吞吐率:5.41req/s ] 内存消耗:4,653.51kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=acde187a4780bbdc2b45d5c48b7dd6b2
  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.001082s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001441s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000611s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000598s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001144s ]
  6. SELECT * FROM `set` [ RunTime:0.000456s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001270s ]
  8. SELECT * FROM `article` WHERE `id` = 483093 LIMIT 1 [ RunTime:0.001555s ]
  9. UPDATE `article` SET `lasttime` = 1774564193 WHERE `id` = 483093 [ RunTime:0.007280s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000587s ]
  11. SELECT * FROM `article` WHERE `id` < 483093 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.001003s ]
  12. SELECT * FROM `article` WHERE `id` > 483093 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000904s ]
  13. SELECT * FROM `article` WHERE `id` < 483093 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.003191s ]
  14. SELECT * FROM `article` WHERE `id` < 483093 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.001800s ]
  15. SELECT * FROM `article` WHERE `id` < 483093 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.002557s ]
0.188072s