├── bar ├── README.md ├── requirements.txt ├── SID.pdf ├── SID.png ├── SMID.pdf ├── SMID.png ├── LOL_v1.png ├── SDSD_in.pdf ├── SDSD_in.png ├── bar_ex.png ├── LOL_v2_syn.pdf ├── LOL_v2_syn.png ├── SDSD_out.pdf ├── SDSD_out.png ├── BiSCI_teaser.pdf ├── BiSCI_teaser.png ├── LOL_v2_real.pdf ├── LOL_v2_real.png ├── BiSCI_teaser_v2.pdf ├── BiSCI_teaser_v2.png ├── LOL_v1_no_snr.pdf ├── LOL_v1_no_snr.png ├── line.py ├── draw_compare_SID.py ├── draw_compare_SMID.py ├── draw_compare_SDSD_in.py ├── draw_compare_SDSD_out.py ├── draw_compare_LOL_v1.py ├── draw_compare_LOL_v2_syn.py ├── draw_compare_LOL_v2_real.py ├── scatter_ex.py ├── pie_ex.py ├── draw_compare_BiSCI_v2.py ├── quiver_ex.py ├── polar_ex.py ├── contour_ex.py ├── plot_ex.py ├── bar_ex.py ├── grid_ex.py ├── draw_compare_BiSCI.py └── draw_compare_xnerf_proj.py ├── .DS_Store ├── README.md └── 3D_coordinate_compare └── XGaussian_teaser_compare.py /bar/README.md: -------------------------------------------------------------------------------- 1 | # draw_bar -------------------------------------------------------------------------------- /bar/requirements.txt: -------------------------------------------------------------------------------- 1 | matplotlib==3.6.1 2 | numpy==1.23.3 3 | -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caiyuanhao1998/draw_script/HEAD/.DS_Store -------------------------------------------------------------------------------- /bar/SID.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caiyuanhao1998/draw_script/HEAD/bar/SID.pdf -------------------------------------------------------------------------------- /bar/SID.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caiyuanhao1998/draw_script/HEAD/bar/SID.png -------------------------------------------------------------------------------- /bar/SMID.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caiyuanhao1998/draw_script/HEAD/bar/SMID.pdf -------------------------------------------------------------------------------- /bar/SMID.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caiyuanhao1998/draw_script/HEAD/bar/SMID.png -------------------------------------------------------------------------------- /bar/LOL_v1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caiyuanhao1998/draw_script/HEAD/bar/LOL_v1.png -------------------------------------------------------------------------------- /bar/SDSD_in.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caiyuanhao1998/draw_script/HEAD/bar/SDSD_in.pdf -------------------------------------------------------------------------------- /bar/SDSD_in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caiyuanhao1998/draw_script/HEAD/bar/SDSD_in.png -------------------------------------------------------------------------------- /bar/bar_ex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caiyuanhao1998/draw_script/HEAD/bar/bar_ex.png -------------------------------------------------------------------------------- /bar/LOL_v2_syn.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caiyuanhao1998/draw_script/HEAD/bar/LOL_v2_syn.pdf -------------------------------------------------------------------------------- /bar/LOL_v2_syn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caiyuanhao1998/draw_script/HEAD/bar/LOL_v2_syn.png -------------------------------------------------------------------------------- /bar/SDSD_out.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caiyuanhao1998/draw_script/HEAD/bar/SDSD_out.pdf -------------------------------------------------------------------------------- /bar/SDSD_out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caiyuanhao1998/draw_script/HEAD/bar/SDSD_out.png -------------------------------------------------------------------------------- /bar/BiSCI_teaser.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caiyuanhao1998/draw_script/HEAD/bar/BiSCI_teaser.pdf -------------------------------------------------------------------------------- /bar/BiSCI_teaser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caiyuanhao1998/draw_script/HEAD/bar/BiSCI_teaser.png -------------------------------------------------------------------------------- /bar/LOL_v2_real.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caiyuanhao1998/draw_script/HEAD/bar/LOL_v2_real.pdf -------------------------------------------------------------------------------- /bar/LOL_v2_real.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caiyuanhao1998/draw_script/HEAD/bar/LOL_v2_real.png -------------------------------------------------------------------------------- /bar/BiSCI_teaser_v2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caiyuanhao1998/draw_script/HEAD/bar/BiSCI_teaser_v2.pdf -------------------------------------------------------------------------------- /bar/BiSCI_teaser_v2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caiyuanhao1998/draw_script/HEAD/bar/BiSCI_teaser_v2.png -------------------------------------------------------------------------------- /bar/LOL_v1_no_snr.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caiyuanhao1998/draw_script/HEAD/bar/LOL_v1_no_snr.pdf -------------------------------------------------------------------------------- /bar/LOL_v1_no_snr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caiyuanhao1998/draw_script/HEAD/bar/LOL_v1_no_snr.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #### 绘图函数集合 2 | 3 | ##### 1. bar - 柱形图对比 4 | 5 | ##### 2. 3d_coordinate - MST teaser 类似的三维对比坐标图 6 | -------------------------------------------------------------------------------- /bar/line.py: -------------------------------------------------------------------------------- 1 | """ 2 | 这是Python Matplotlib模板的一个示例: 直线图 3 | 点击右键 ->【运行当前文件】查看效果 4 | 5 | 了解更多关于Matplotlib的使用方法, 点击这里查看官方文档: https://matplotlib.org/stable/users/index 6 | """ 7 | import matplotlib.pyplot as plt 8 | import numpy as np 9 | 10 | x = np.linspace(-1, 1, 50) 11 | y1 = 2*x + 1 12 | y2 = 2**x + 1 13 | 14 | plt.figure() 15 | plt.plot(x, y1) 16 | 17 | plt.xlabel("Here is x") 18 | plt.ylabel("Here is y") 19 | 20 | plt.show() 21 | -------------------------------------------------------------------------------- /bar/draw_compare_SID.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | # color = ['blue', 'blue', 'blue', 'blue', 'green', 'red'] 5 | 6 | # LOL_v1_method = ['DeepUPE', 'RetinexNet', 'RUAS', 'KinD', 'SNR-Net', 'Retinexformer'] 7 | 8 | # LOL_v1_value = [14.38, 16.77, 18.23, 20.86, 24.61, 25.16] 9 | 10 | color = ['blue', 'blue', 'blue', 'blue', 'red'] 11 | 12 | SID_method = ['ReNet', 'DUPE', 'KinD', 'RUAS', 'Ours'] 13 | 14 | SID_value = [16.48, 17.01, 18.02, 18.44, 24.44] 15 | 16 | plt.bar(SID_method, SID_value, width = 0.6, color = color, linewidth = 1) 17 | 18 | # plt.yscale('log') 19 | plt.ylim(16,25) 20 | 21 | plt.xticks(fontsize=18) 22 | 23 | plt.yticks(fontsize=18) 24 | 25 | plt.savefig('SID.png') 26 | plt.savefig('SID.pdf') -------------------------------------------------------------------------------- /bar/draw_compare_SMID.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | # color = ['blue', 'blue', 'blue', 'blue', 'green', 'red'] 5 | 6 | # LOL_v1_method = ['DeepUPE', 'RetinexNet', 'RUAS', 'KinD', 'SNR-Net', 'Retinexformer'] 7 | 8 | # LOL_v1_value = [14.38, 16.77, 18.23, 20.86, 24.61, 25.16] 9 | 10 | color = ['blue', 'blue', 'blue', 'blue', 'red'] 11 | 12 | SMID_method = ['KinD', 'ReNet', 'DUPE', 'RUAS', 'Ours'] 13 | 14 | SMID_value = [22.18, 22.83, 23.91, 25.88, 29.15] 15 | 16 | plt.bar(SMID_method, SMID_value, width = 0.6, color = color, linewidth = 1) 17 | 18 | # plt.yscale('log') 19 | plt.ylim(22,30) 20 | 21 | plt.xticks(fontsize=18) 22 | 23 | plt.yticks(fontsize=18) 24 | 25 | plt.savefig('SMID.png') 26 | plt.savefig('SMID.pdf') -------------------------------------------------------------------------------- /bar/draw_compare_SDSD_in.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | # color = ['blue', 'blue', 'blue', 'blue', 'green', 'red'] 5 | 6 | # LOL_v1_method = ['DeepUPE', 'RetinexNet', 'RUAS', 'KinD', 'SNR-Net', 'Retinexformer'] 7 | 8 | # LOL_v1_value = [14.38, 16.77, 18.23, 20.86, 24.61, 25.16] 9 | 10 | color = ['blue', 'blue', 'blue', 'blue', 'red'] 11 | 12 | SDSD_method = ['ReNet', 'DUPE', 'KinD', 'RUAS', 'Ours'] 13 | 14 | SDSD_value = [20.84, 21.70, 21.95, 23.17, 29.77] 15 | 16 | plt.bar(SDSD_method, SDSD_value, width = 0.4, color = color, linewidth = 1) 17 | 18 | # plt.yscale('log') 19 | plt.ylim(20,30) 20 | 21 | plt.xticks(fontsize=18) 22 | 23 | plt.yticks(fontsize=18) 24 | 25 | plt.savefig('SDSD_in.png') 26 | plt.savefig('SDSD_in.pdf') -------------------------------------------------------------------------------- /bar/draw_compare_SDSD_out.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | # color = ['blue', 'blue', 'blue', 'blue', 'green', 'red'] 5 | 6 | # LOL_v1_method = ['DeepUPE', 'RetinexNet', 'RUAS', 'KinD', 'SNR-Net', 'Retinexformer'] 7 | 8 | # LOL_v1_value = [14.38, 16.77, 18.23, 20.86, 24.61, 25.16] 9 | 10 | color = ['blue', 'blue', 'blue', 'blue', 'red'] 11 | 12 | SDSD_method = ['ReNet', 'DUPE', 'KinD', 'RUAS', 'Ours'] 13 | 14 | SDSD_value = [20.96, 21.94, 21.97, 23.84, 29.84] 15 | 16 | plt.bar(SDSD_method, SDSD_value, width = 0.6, color = color, linewidth = 1) 17 | 18 | # plt.yscale('log') 19 | plt.ylim(20,30) 20 | 21 | plt.xticks(fontsize=18) 22 | 23 | plt.yticks(fontsize=18) 24 | 25 | plt.savefig('SDSD_out.png') 26 | plt.savefig('SDSD_out.pdf') -------------------------------------------------------------------------------- /bar/draw_compare_LOL_v1.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | # color = ['blue', 'blue', 'blue', 'blue', 'green', 'red'] 5 | 6 | # LOL_v1_method = ['DeepUPE', 'RetinexNet', 'RUAS', 'KinD', 'SNR-Net', 'Retinexformer'] 7 | 8 | # LOL_v1_value = [14.38, 16.77, 18.23, 20.86, 24.61, 25.16] 9 | 10 | color = ['blue', 'blue', 'blue', 'blue', 'red'] 11 | 12 | LOL_v1_method = ['DUPE', 'ReNet', 'RUAS', 'KinD', 'Ours'] 13 | 14 | LOL_v1_value = [14.38, 16.77, 18.23, 20.86, 25.16] 15 | 16 | plt.bar(LOL_v1_method, LOL_v1_value, width = 0.6, color = color, linewidth = 1) 17 | 18 | # plt.yscale('log') 19 | plt.ylim(14,26) 20 | 21 | plt.xticks(fontsize=18) 22 | 23 | plt.yticks(fontsize=18) 24 | 25 | plt.savefig('LOL_v1_no_snr.png') 26 | 27 | plt.savefig('LOL_v1_no_snr.pdf') -------------------------------------------------------------------------------- /bar/draw_compare_LOL_v2_syn.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | # color = ['blue', 'blue', 'blue', 'blue', 'green', 'red'] 5 | 6 | # LOL_v1_method = ['DeepUPE', 'RetinexNet', 'RUAS', 'KinD', 'SNR-Net', 'Retinexformer'] 7 | 8 | # LOL_v1_value = [14.38, 16.77, 18.23, 20.86, 24.61, 25.16] 9 | 10 | color = ['blue', 'blue', 'blue', 'blue', 'red'] 11 | 12 | SMID_method = ['KinD', 'DUPE', 'RUAS', 'ReNet', 'Ours'] 13 | 14 | SMID_value = [13.29, 15.08, 16.55, 17.13, 25.67] 15 | 16 | plt.bar(SMID_method, SMID_value, width = 0.6, color = color, linewidth = 1) 17 | 18 | # plt.yscale('log') 19 | plt.ylim(13,26) 20 | 21 | plt.xticks(fontsize=18) 22 | 23 | plt.yticks(fontsize=18) 24 | 25 | # plt.savefig('SMID.png') 26 | plt.savefig('LOL_v2_syn.png') 27 | plt.savefig('LOL_v2_syn.pdf') -------------------------------------------------------------------------------- /bar/draw_compare_LOL_v2_real.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | # color = ['blue', 'blue', 'blue', 'blue', 'green', 'red'] 5 | 6 | # LOL_v1_method = ['DeepUPE', 'RetinexNet', 'RUAS', 'KinD', 'SNR-Net', 'Retinexformer'] 7 | 8 | # LOL_v1_value = [14.38, 16.77, 18.23, 20.86, 24.61, 25.16] 9 | 10 | color = ['blue', 'blue', 'blue', 'blue', 'red'] 11 | 12 | SMID_method = ['DUPE', 'KinD', 'ReNet', 'RUAS', 'Ours'] 13 | 14 | SMID_value = [13.27, 14.74, 15.47, 18.37, 22.80] 15 | 16 | plt.bar(SMID_method, SMID_value, width = 0.6, color = color, linewidth = 1) 17 | 18 | # plt.yscale('log') 19 | plt.ylim(13,23) 20 | 21 | plt.xticks(fontsize=18) 22 | 23 | plt.yticks(fontsize=18) 24 | 25 | # plt.savefig('SMID.png') 26 | plt.savefig('LOL_v2_real.pdf') 27 | plt.savefig('LOL_v2_real.png') -------------------------------------------------------------------------------- /bar/scatter_ex.py: -------------------------------------------------------------------------------- 1 | """ 2 | 这是Python Matplotlib模板的一个示例: 散点图 3 | 点击右键 ->【运行当前文件】查看效果 4 | 5 | 了解更多关于Matplotlib的使用方法, 点击这里查看官方文档: https://matplotlib.org/stable/users/index 6 | """ 7 | # ----------------------------------------------------------------------------- 8 | # Copyright (c) 2015, Nicolas P. Rougier. All Rights Reserved. 9 | # Distributed under the (new) BSD License. See LICENSE.txt for more info. 10 | # ----------------------------------------------------------------------------- 11 | import numpy as np 12 | import matplotlib.pyplot as plt 13 | 14 | n = 1024 15 | X = np.random.normal(0, 1, n) 16 | Y = np.random.normal(0, 1, n) 17 | T = np.arctan2(Y, X) 18 | 19 | plt.axes([0.025, 0.025, 0.95, 0.95]) 20 | plt.scatter(X, Y, s=75, c=T, alpha=.5) 21 | 22 | plt.xlim(-1.5, 1.5), plt.xticks([]) 23 | plt.ylim(-1.5, 1.5), plt.yticks([]) 24 | 25 | plt.show() 26 | -------------------------------------------------------------------------------- /bar/pie_ex.py: -------------------------------------------------------------------------------- 1 | 2 | """ 3 | 这是Python Matplotlib模板的一个示例: 饼状图 4 | 点击右键 ->【运行当前文件】查看效果 5 | 6 | 了解更多关于Matplotlib的使用方法, 点击这里查看官方文档: https://matplotlib.org/stable/users/index 7 | """ 8 | # ----------------------------------------------------------------------------- 9 | # Copyright (c) 2015, Nicolas P. Rougier. All Rights Reserved. 10 | # Distributed under the (new) BSD License. See LICENSE.txt for more info. 11 | # ----------------------------------------------------------------------------- 12 | import numpy as np 13 | import matplotlib.pyplot as plt 14 | 15 | n = 20 16 | Z = np.ones(n) 17 | Z[-1] *= 2 18 | 19 | plt.axes([0.025, 0.025, 0.95, 0.95]) 20 | 21 | plt.pie(Z, explode=Z*.05, colors=['%f' % (i/float(n)) for i in range(n)], 22 | wedgeprops={"linewidth": 1, "edgecolor": "black"}) 23 | plt.gca().set_aspect('equal') 24 | plt.xticks([]), plt.yticks([]) 25 | 26 | plt.show() 27 | -------------------------------------------------------------------------------- /bar/draw_compare_BiSCI_v2.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | # color = ['blue', 'blue', 'blue', 'blue', 'green', 'red'] 5 | 6 | # LOL_v1_method = ['DeepUPE', 'RetinexNet', 'RUAS', 'KinD', 'SNR-Net', 'Retinexformer'] 7 | 8 | # LOL_v1_value = [14.38, 16.77, 18.23, 20.86, 24.61, 25.16] 9 | 10 | color = ['blue', 'blue', 'blue', 'blue', 'blue', 'blue', 'blue', 'orange', 'red'] 11 | 12 | bisci_method = ['BiConnect', 'BNN', 'Bi-Real', 'IRNet', 'ReActNet', 'BBCU', 'BTM', 'λ-Net' ,'BiSRNet'] 13 | 14 | bisci_value = [22.19, 23.88, 26.26, 26.30, 26.48, 26.51, 27.21, 28.53, 29.76] 15 | 16 | plt.figure(num=3,figsize=(22,5)) 17 | 18 | plt.bar(bisci_method, bisci_value, width = 0.4, color = color, linewidth = 1) 19 | 20 | # plt.yscale('log') 21 | plt.ylim(21,30.3) 22 | 23 | plt.xticks(fontsize=18) 24 | 25 | plt.yticks(fontsize=18) 26 | 27 | 28 | 29 | plt.savefig('BiSCI_teaser_v2.png') 30 | 31 | plt.savefig('BiSCI_teaser_v2.pdf') -------------------------------------------------------------------------------- /bar/quiver_ex.py: -------------------------------------------------------------------------------- 1 | """ 2 | 这是Python Matplotlib模板的一个示例: 量场图 3 | 点击右键 ->【运行当前文件】查看效果 4 | 5 | 了解更多关于Matplotlib的使用方法, 点击这里查看官方文档: https://matplotlib.org/stable/users/index 6 | """ 7 | # ----------------------------------------------------------------------------- 8 | # Copyright (c) 2015, Nicolas P. Rougier. All Rights Reserved. 9 | # Distributed under the (new) BSD License. See LICENSE.txt for more info. 10 | # ----------------------------------------------------------------------------- 11 | import numpy as np 12 | import matplotlib.pyplot as plt 13 | 14 | n = 8 15 | X, Y = np.mgrid[0:n, 0:n] 16 | T = np.arctan2(Y-n/2.0, X-n/2.0) 17 | R = 10+np.sqrt((Y-n/2.0)**2+(X-n/2.0)**2) 18 | U, V = R*np.cos(T), R*np.sin(T) 19 | 20 | plt.axes([0.025, 0.025, 0.95, 0.95]) 21 | plt.quiver(X, Y, U, V, R, alpha=.5) 22 | plt.quiver(X, Y, U, V, edgecolor='k', facecolor='None', linewidth=.5) 23 | 24 | plt.xlim(-1, n), plt.xticks([]) 25 | plt.ylim(-1, n), plt.yticks([]) 26 | 27 | plt.show() 28 | -------------------------------------------------------------------------------- /bar/polar_ex.py: -------------------------------------------------------------------------------- 1 | """ 2 | 这是Python Matplotlib模板的一个示例: 极轴图 3 | 点击右键 ->【运行当前文件】查看效果 4 | 5 | 了解更多关于Matplotlib的使用方法, 点击这里查看官方文档: https://matplotlib.org/stable/users/index 6 | """ 7 | # ----------------------------------------------------------------------------- 8 | # Copyright (c) 2015, Nicolas P. Rougier. All Rights Reserved. 9 | # Distributed under the (new) BSD License. See LICENSE.txt for more info. 10 | # ----------------------------------------------------------------------------- 11 | import numpy as np 12 | import matplotlib.pyplot as plt 13 | 14 | ax = plt.axes([0.025, 0.025, 0.95, 0.95], polar=True) 15 | 16 | N = 20 17 | theta = np.arange(0.0, 2*np.pi, 2*np.pi/N) 18 | radii = 10*np.random.rand(N) 19 | width = np.pi/4*np.random.rand(N) 20 | bars = plt.bar(theta, radii, width=width, bottom=0.0) 21 | 22 | for r, bar in zip(radii, bars): 23 | bar.set_facecolor(plt.cm.jet(r/10.)) 24 | bar.set_alpha(0.5) 25 | 26 | ax.set_xticklabels([]) 27 | ax.set_yticklabels([]) 28 | 29 | plt.show() 30 | -------------------------------------------------------------------------------- /bar/contour_ex.py: -------------------------------------------------------------------------------- 1 | """ 2 | 这是Python Matplotlib模板的一个示例: 等高线图 3 | 点击右键 ->【运行当前文件】查看效果 4 | 5 | 了解更多关于Matplotlib的使用方法, 点击这里查看官方文档: https://matplotlib.org/stable/users/index 6 | """ 7 | # ----------------------------------------------------------------------------- 8 | # Copyright (c) 2015, Nicolas P. Rougier. All Rights Reserved. 9 | # Distributed under the (new) BSD License. See LICENSE.txt for more info. 10 | # ----------------------------------------------------------------------------- 11 | import numpy as np 12 | import matplotlib.pyplot as plt 13 | 14 | 15 | def f(x, y): 16 | return (1-x/2+x**5+y**3)*np.exp(-x**2-y**2) 17 | 18 | 19 | n = 256 20 | x = np.linspace(-3, 3, n) 21 | y = np.linspace(-3, 3, n) 22 | X, Y = np.meshgrid(x, y) 23 | 24 | plt.axes([0.025, 0.025, 0.95, 0.95]) 25 | 26 | plt.contourf(X, Y, f(X, Y), 8, alpha=.75, cmap=plt.cm.hot) 27 | C = plt.contour(X, Y, f(X, Y), 8, colors='black', linewidth=.5) 28 | plt.clabel(C, inline=1, fontsize=10) 29 | 30 | plt.xticks([]), plt.yticks([]) 31 | 32 | plt.show() 33 | -------------------------------------------------------------------------------- /bar/plot_ex.py: -------------------------------------------------------------------------------- 1 | """ 2 | 这是Python Matplotlib模板的一个示例: 曲线图 3 | 点击右键 ->【运行当前文件】查看效果 4 | 5 | 了解更多关于Matplotlib的使用方法, 点击这里查看官方文档: https://matplotlib.org/stable/users/index 6 | """ 7 | # ----------------------------------------------------------------------------- 8 | # Copyright (c) 2015, Nicolas P. Rougier. All Rights Reserved. 9 | # Distributed under the (new) BSD License. See LICENSE.txt for more info. 10 | # ----------------------------------------------------------------------------- 11 | import numpy as np 12 | import matplotlib.pyplot as plt 13 | 14 | n = 256 15 | X = np.linspace(-np.pi, np.pi, n, endpoint=True) 16 | Y = np.sin(2*X) 17 | 18 | plt.axes([0.025, 0.025, 0.95, 0.95]) 19 | 20 | plt.plot(X, Y+1, color='blue', alpha=1.00) 21 | plt.fill_between(X, 1, Y+1, color='blue', alpha=.25) 22 | 23 | plt.plot(X, Y-1, color='blue', alpha=1.00) 24 | plt.fill_between(X, -1, Y-1, (Y-1) > -1, color='blue', alpha=.25) 25 | plt.fill_between(X, -1, Y-1, (Y-1) < -1, color='red', alpha=.25) 26 | 27 | plt.xlim(-np.pi, np.pi), plt.xticks([]) 28 | plt.ylim(-2.5, 2.5), plt.yticks([]) 29 | 30 | plt.show() 31 | -------------------------------------------------------------------------------- /bar/bar_ex.py: -------------------------------------------------------------------------------- 1 | """ 2 | 这是Python Matplotlib模板的一个示例:条形图 3 | 点击右键 ->【运行当前文件】查看效果 4 | 5 | 了解更多关于Matplotlib的使用方法, 点击这里查看官方文档: https://matplotlib.org/stable/users/index 6 | """ 7 | # ----------------------------------------------------------------------------- 8 | # Copyright (c) 2015, Nicolas P. Rougier. All Rights Reserved. 9 | # Distributed under the (new) BSD License. See LICENSE.txt for more info. 10 | # ----------------------------------------------------------------------------- 11 | import numpy as np 12 | import matplotlib.pyplot as plt 13 | 14 | n = 12 15 | X = np.arange(n) 16 | Y1 = (1-X/float(n)) * np.random.uniform(0.5, 1.0, n) 17 | Y2 = (1-X/float(n)) * np.random.uniform(0.5, 1.0, n) 18 | 19 | plt.axes([0.025, 0.025, 0.95, 0.95]) 20 | plt.bar(X, +Y1, facecolor='#9999ff', edgecolor='white') 21 | plt.bar(X, -Y2, facecolor='#ff9999', edgecolor='white') 22 | 23 | for x, y in zip(X, Y1): 24 | plt.text(x+0.4, y+0.05, '%.2f' % y, ha='center', va='bottom') 25 | 26 | for x, y in zip(X, Y2): 27 | plt.text(x+0.4, -y-0.05, '%.2f' % y, ha='center', va='top') 28 | 29 | plt.xlim(-.5, n), plt.xticks([]) 30 | plt.ylim(-1.25, +1.25), plt.yticks([]) 31 | 32 | plt.savefig('bar_ex.png') 33 | -------------------------------------------------------------------------------- /bar/grid_ex.py: -------------------------------------------------------------------------------- 1 | """ 2 | 这是Python Matplotlib模板的一个示例: 网格图 3 | 点击右键 ->【运行当前文件】查看效果 4 | 5 | 了解更多关于Matplotlib的使用方法, 点击这里查看官方文档: https://matplotlib.org/stable/users/index 6 | """ 7 | # ----------------------------------------------------------------------------- 8 | # Copyright (c) 2015, Nicolas P. Rougier. All Rights Reserved. 9 | # Distributed under the (new) BSD License. See LICENSE.txt for more info. 10 | # ----------------------------------------------------------------------------- 11 | import matplotlib.pyplot as plt 12 | 13 | ax = plt.axes([0.025, 0.025, 0.95, 0.95]) 14 | 15 | ax.set_xlim(0, 4) 16 | ax.set_ylim(0, 3) 17 | ax.xaxis.set_major_locator(plt.MultipleLocator(1.0)) 18 | ax.xaxis.set_minor_locator(plt.MultipleLocator(0.1)) 19 | ax.yaxis.set_major_locator(plt.MultipleLocator(1.0)) 20 | ax.yaxis.set_minor_locator(plt.MultipleLocator(0.1)) 21 | ax.grid(which='major', axis='x', linewidth=0.75, linestyle='-', color='0.75') 22 | ax.grid(which='minor', axis='x', linewidth=0.25, linestyle='-', color='0.75') 23 | ax.grid(which='major', axis='y', linewidth=0.75, linestyle='-', color='0.75') 24 | ax.grid(which='minor', axis='y', linewidth=0.25, linestyle='-', color='0.75') 25 | ax.set_xticklabels([]) 26 | ax.set_yticklabels([]) 27 | 28 | plt.show() 29 | -------------------------------------------------------------------------------- /bar/draw_compare_BiSCI.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | # color = ['blue', 'blue', 'blue', 'blue', 'green', 'red'] 5 | 6 | # LOL_v1_method = ['DeepUPE', 'RetinexNet', 'RUAS', 'KinD', 'SNR-Net', 'Retinexformer'] 7 | 8 | # LOL_v1_value = [14.38, 16.77, 18.23, 20.86, 24.61, 25.16] 9 | 10 | # color = ['blue', 'blue', 'blue', 'blue', 'blue', 'blue', 'blue', 'red'] 11 | 12 | # color = ['orange', 'orange', 'orange', 'orange', 'orange', 'orange', 'orange', 'blue'] 13 | 14 | color = ['cornflowerblue', 'cornflowerblue', 'cornflowerblue', 'cornflowerblue', 'cornflowerblue', 'cornflowerblue', 'cornflowerblue', 'lightcoral'] 15 | 16 | # color = ['royalblue', 'royalblue', 'royalblue', 'royalblue', 'royalblue', 'royalblue', 'royalblue', 'lightcoral'] 17 | 18 | bisci_method = ['BiConnect', 'BNN', 'Bi-Real', 'IRNet', 'ReActNet', 'BBCU', 'BTM', 'BiSRNet'] 19 | 20 | bisci_value = [22.19, 23.88, 26.26, 26.30, 26.48, 26.51, 27.21, 29.76] 21 | 22 | plt.figure(num=3,figsize=(20,5)) 23 | 24 | plt.bar(bisci_method, bisci_value, width = 0.4, color = color, linewidth = 1) 25 | 26 | # plt.yscale('log') 27 | plt.ylim(21,30.3) 28 | 29 | plt.xticks(fontsize=18) 30 | 31 | plt.yticks(fontsize=18) 32 | 33 | 34 | 35 | plt.savefig('BiSCI_teaser.png') 36 | 37 | plt.savefig('BiSCI_teaser.pdf') -------------------------------------------------------------------------------- /bar/draw_compare_xnerf_proj.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | # color = ['blue', 'blue', 'blue', 'blue', 'green', 'red'] 5 | 6 | # LOL_v1_method = ['DeepUPE', 'RetinexNet', 'RUAS', 'KinD', 'SNR-Net', 'Retinexformer'] 7 | 8 | # LOL_v1_value = [14.38, 16.77, 18.23, 20.86, 24.61, 25.16] 9 | 10 | # color = ['blue', 'blue', 'blue', 'blue', 'blue', 'blue', 'blue', 'red'] 11 | 12 | # color = ['orange', 'orange', 'orange', 'orange', 'orange', 'orange', 'orange', 'blue'] 13 | 14 | # color = ['royalblue', 'royalblue', 'royalblue', 'royalblue', 'royalblue', 'royalblue', 'royalblue', 'lightcoral'] 15 | 16 | category = ['medicine', 'biology', 'security', 'industry'] 17 | 18 | color = ['cornflowerblue', 'cornflowerblue', 'cornflowerblue', 'cornflowerblue', 'cornflowerblue', 'lightcoral'] 19 | 20 | method = ['Intratomo', 'NeRF', 'NeAT', 'TensoRF', 'NAF', 'SAX-NeRF'] 21 | 22 | medicine_proj_psnr = [31.10, 33.10, 36.06, 35.27, 39.87, 50.78] 23 | 24 | biology_proj_psnr = [31.65, 29.15, 39.14, 42.58, 39.31, 57.61] 25 | 26 | security_proj_psnr = [35.37, 27.88, 38.87, 39.30, 39.00, 43.43] 27 | 28 | industry_proj_psnr = [32.75, 37.71, 29.83, 41.95, 33.30, 55.71] 29 | 30 | plt.figure(num=3,figsize=(20,5)) 31 | 32 | plt.bar(bisci_method, bisci_value, width = 0.4, color = color, linewidth = 1) 33 | 34 | # plt.yscale('log') 35 | plt.ylim(21,30.3) 36 | 37 | plt.xticks(fontsize=18) 38 | 39 | plt.yticks(fontsize=18) 40 | 41 | 42 | 43 | plt.savefig('BiSCI_teaser.png') 44 | 45 | plt.savefig('BiSCI_teaser.pdf') -------------------------------------------------------------------------------- /3D_coordinate_compare/XGaussian_teaser_compare.py: -------------------------------------------------------------------------------- 1 | # This is a sample Python script. 2 | import matplotlib.pyplot as plt 3 | import math 4 | import numpy as np 5 | # Example data 6 | models = ['TensoRF', 'InTomo', 'NeRF', 'NeAT', 'NAF','X-Gaussians'] 7 | fps = [0.77, 0.62, 0.14, 1.78, 2.01, 148] # FLOPS (G) in logarithmic scale 8 | psnr = [30.447, 30.187, 30.289, 34.021, 36.942, 43.404] # PSNR (dB) 9 | params = [178 , 125, 313, 69, 63, 9] # Model parameters in millions 10 | bubble_sizes = [size * 45 for size in params] # Scale the bubble sizes 11 | bubble_sizes[0] = bubble_sizes[0]*0.6 12 | bubble_sizes[1] = bubble_sizes[1]*0.6 13 | bubble_sizes[2] = bubble_sizes[2]*0.82 14 | bubble_sizes[3] = bubble_sizes[3]*0.4 15 | bubble_sizes[4] = bubble_sizes[4]*0.4 16 | bubble_sizes[5] = bubble_sizes[5]*0.3 17 | # bubble_sizes[5] = bubble_sizes[5]*1 18 | color = ['cornflowerblue', 'moccasin', 'y', 'teal' , 'orange', 'r'] 19 | alphas = [0.3, 1., 0.4, 0.4, 0.5, 0.5] 20 | # Create scatter plot 21 | # fig, ax = plt.subplots() 22 | # Initialize figure 23 | #fig = plt.figure(num=None, figsize=(12, 12), facecolor='w', edgecolor='k') 24 | # fig.patch.set_facecolor('white') 25 | # fig.patch.set_alpha(1) 26 | # ax = plt.gca() 27 | 28 | fig, ax = plt.subplots(figsize=(12, 12)) 29 | scatter = ax.scatter(fps, psnr, s=bubble_sizes, alpha=alphas, c = color, edgecolor="none") 30 | 31 | 32 | 33 | # Logarithmic scale for the x-axis 34 | ax.set_yticks([25,30,35,40,45]) 35 | ax.set_xscale('log') 36 | ax.set_xticks([1e-2,1e-1,1,1e1,1e2]) 37 | plt.tick_params(axis="both", which="major", direction="in", width=3, length=5, pad=5) 38 | plt.yticks(fontsize=25) 39 | plt.xticks(fontsize=25) 40 | 41 | ax.set_xticklabels([]) 42 | ax.set_yticklabels([]) 43 | 44 | bwith = 2 #边框宽度设置为2 45 | ax.spines['bottom'].set_linewidth(bwith) 46 | ax.spines['left'].set_linewidth(bwith) 47 | ax.spines['top'].set_linewidth(bwith) 48 | ax.spines['right'].set_linewidth(bwith) 49 | # Labels and title 50 | # ax.set_xlabel('FPS (log)',fontsize=25) 51 | # ax.set_ylabel('PSNR (dB)',fontsize=25) 52 | 53 | # Grid 54 | ax.grid(True, which='both', linestyle='--', linewidth=0.5,alpha = 0.2) 55 | 56 | plt.savefig('plot.pdf') 57 | # Show the plot 58 | # plt.show() --------------------------------------------------------------------------------