美文网首页
2019-12-21

2019-12-21

作者: richybai | 来源:发表于2019-12-21 23:11 被阅读0次

PINN discover代码学习 作图部分

PINNs-master\appendix\continuous_time_identification (Burgers)


fig, ax = newfig(1.0, 1.4)
ax.axis('off')
ax = fig.add_subplot(111) # ax = fig.add_subplot(1, 1, 1)
gs0 = gridspec.GridSpec(1, 2) # 将画布分割,一行二列
gs0.update(top=1-0.06, bottom=1-1.0/3.0+0.06, left=0.15, right=0.85, wspace=0)
ax = plt.subplot(gs0[:, :]) #规定作图区域


imshow()部分参数

h = ax.imshow(X, interpolation='nearest', cmap='rainbow', 
                  extent=[t.min(), t.max(), x.min(), x.max()], 
                  origin='lower', aspect='auto')
  • X: 数据 shape(M, N)
  • interpolation: nearest,把某块显示成一种颜色,不是渐变的那种
  • cmap: 用于设置热图的Colormap,不同选项图中颜色不同
  • extent: 控制坐标轴
  • origin:
    1. lower: 数据左下(0, 0),右上(M, N)
    2. upper: 数据左上(0, 0),右下(M, N)
  • aspect: 待解决

from scipy.interpolate import griddata多维插值,常用于重构图片

griddata(points, values, xi, method='linear', fill_value=nan)
  • points: K维空间中的坐标,它可以是形状为(N,k)的数组,也可以是一个有k个数组的序列。
  • values: points中每个点对应的值。
  • xi: 需要插值的坐标
  • method:
    1. nearest, 0阶插值
    2. linear, 1阶插值
    3. cubic, 3阶插值

相关文章

  • 2019-12-21遗愿清单

    2019-12-21遗愿清单

  • 2019-12-21我爱你

    2019-12-21我爱你

  • 2019-12-21张思倩分享【每天进步一点点】 爱。

  • 2019-12-21晚间日记

    2019-12-21晚间总结 今天是什么日子 起床:6:00左右 就寝:昨晚12:00左右(可怜(๑ó﹏ò๑)……...

  • 文先森的日常--LP107天

    日精进打卡第468天 姓名:李文杰 (四爷); 公司:中国太平人寿; 日期:2019-12-21 【知~学习】 《...

  • 2019-12-22

    2019-12-21 【日精进打卡第 637 天 【知~学习】 《六项精进》大纲 4 遍共 2404 遍 《大学》...

  • 2019-12-30

    菜菜_d868 字数 223 · 阅读 1 2019-12-21 20:25 姓名:邢彩颜 公司:三亚蔚蓝时代实业...

  • 公益项目管理培训

    2019-12-21 这次培训学习到很多很专业,很系统的公益系统知识,期待能学习到更多的技能和知识

  • 周末作业

    ❤️焦点·智慧父母课堂【肖丹分享第177天·运动第167天·读书第17天~2019-12-21】 又是周末,写作业...

  • 精读  作为意志和表象的世界2019-12-21

    标签 精读 作为意志和表象的世界 2019-12-21 > 01 第56节 419-423 重新概述一下意志表出为...

网友评论

      本文标题:2019-12-21

      本文链接:https://www.haomeiwen.com/subject/cdrnnctx.html