雷达图和气泡图

 PR雷达图

import numpy as np
import matplotlib.pyplot as plt
# Updated data for the PR (Precision Rate) table
PR_feature = ['NO', 'PO', 'HO', 'LI', 'LR', 'TC', 'DEF', 'FM', 'SV', 'MB', 'CM', 'BC', 'ALL']
PR_MDNet = [81.2, 74.7, 63.3, 58.9, 66.0, 74.8, 66.4, 63.2, 73.9, 62.4, 61.3, 62.5, 71.0]
PR_C_COT = [88.8, 74.1, 60.9, 64.8, 73.1, 84.0, 63.4, 62.8, 76.2, 67.3, 65.9, 59.1, 71.4]
PR_DAPNet = [90.0, 82.1, 66.0, 77.5, 75.0, 76.8, 71.7, 67.0, 78.0, 65.3, 66.8, 71.7, 76.6]
PR_MANet = [91.4, 83.1, 66.5, 81.7, 78.5, 72.9, 72.3, 71.1, 77.8, 66.5, 69.9, 75.6, 77.8]
PR_FSRPN = [90.1, 76.9, 58.8, 76.4, 71.9, 69.9, 71.3, 64.0, 72.5, 62.3, 68.5, 67.2, 71.9]
PR_SGT = [87.7, 77.9, 59.2, 70.5, 75.1, 76.0, 68.5, 67.7, 69.2, 64.7, 66.7, 65.8, 72.0]
PR_mfDiMP = [73.6, 71.9, 53.0, 64.7, 63.4, 69.5, 60.7, 55.7, 68.3, 61.9, 61.4, 54.7, 64.6]
PR_Ours = [87.3, 80.7, 70.5, 80.4, 76.5, 72.6, 72.4, 66.8, 75.6, 69.8, 71.8, 74.6, 77.8]

# Convert to 0-1 scale for plotting
PR_MDNet = np.array(PR_MDNet) / 100
PR_C_COT = np.array(PR_C_COT) / 100
PR_DAPNet = np.array(PR_DAPNet) / 100
PR_MANet = np.array(PR_MANet) / 100
PR_FSRPN = np.array(PR_FSRPN) / 100
PR_SGT = np.array(PR_SGT) / 100
PR_mfDiMP = np.array(PR_mfDiMP) / 100
PR_Ours = np.array(PR_Ours) / 100

# Setup plot
angles_PR = np.linspace(0, 2 * np.pi, len(PR_feature), endpoint=False)
fig_PR = plt.figure(figsize=(10,10))
ax_PR = fig_PR.add_subplot(111, polar=True)

# Plotting data
ax_PR.plot(np.concatenate((angles_PR, [angles_PR[0]])), np.concatenate((PR_MDNet, [PR_MDNet[0]])), 'o-', linewidth=2, label='MDNet', color='orange')
ax_PR.plot(np.concatenate((angles_PR, [angles_PR[0]])), np.concatenate((PR_C_COT, [PR_C_COT[0]])), 'o-', linewidth=2, label='C-COT', color='blue')
ax_PR.plot(np.concatenate((angles_PR, [angles_PR[0]])), np.concatenate((PR_DAPNet, [PR_DAPNet[0]])), 'o-', linewidth=2, label='DAPNet', color='black')
ax_PR.plot(np.concatenate((angles_PR, [angles_PR[0]])), np.concatenate((PR_MANet, [PR_MANet[0]])), 'o-', linewidth=2, label='MANet', color='green')
ax_PR.plot(np.concatenate((angles_PR, [angles_PR[0]])), np.concatenate((PR_FSRPN, [PR_FSRPN[0]])), 'o-', linewidth=2, label='FSRPN', color='purple')
ax_PR.plot(np.concatenate((angles_PR, [angles_PR[0]])), np.concatenate((PR_SGT, [PR_SGT[0]])), 'o-', linewidth=2, label='SGT', color='brown')
ax_PR.plot(np.concatenate((angles_PR, [angles_PR[0]])), np.concatenate((PR_mfDiMP, [PR_mfDiMP[0]])), 'o-', linewidth=2, label='mfDiMP', color='pink')
ax_PR.plot(np.concatenate((angles_PR, [angles_PR[0]])), np.concatenate((PR_Ours, [PR_Ours[0]])), 'o-', linewidth=2, label='Ours', color='red')

# Labels and title
logo_PR = [str(x) + '\n' + '(' + str(round(PR_Ours[i]*100, 2)) + ')' for i, x in enumerate(PR_feature)]
ax_PR.set_thetagrids(angles_PR * 180 / np.pi, logo_PR)
ax_PR.set_ylim(0, 1)
ax_PR.set_yticks([0, 0.2, 0.4, 0.6, 0.8, 1.0])
plt.title('Precision Rate Comparison on RGBT234 Dataset', fontsize=12)

# Legend
plt.legend(loc='upper right', prop={'size': 10}, ncol=2, bbox_to_anchor=[1.2, 1])

# Show plot
plt.show()

# Save as high-resolution image
fig_PR.savefig('C:/Users/solid/Pictures/Precision_Rate_Comparison_RGBT234.png', dpi=400, bbox_inches='tight')

PR气泡图
 

import numpy as np
import matplotlib.pyplot as plt
# Updated data for the PR (Precision Rate) table
PR_feature = ['NO', 'PO', 'HO', 'LI', 'LR', 'TC', 'DEF', 'FM', 'SV', 'MB', 'CM', 'BC', 'ALL']
PR_MDNet = [81.2, 74.7, 63.3, 58.9, 66.0, 74.8, 66.4, 63.2, 73.9, 62.4, 61.3, 62.5, 71.0]
PR_C_COT = [88.8, 74.1, 60.9, 64.8, 73.1, 84.0, 63.4, 62.8, 76.2, 67.3, 65.9, 59.1, 71.4]
PR_DAPNet = [90.0, 82.1, 66.0, 77.5, 75.0, 76.8, 71.7, 67.0, 78.0, 65.3, 66.8, 71.7, 76.6]
PR_MANet = [91.4, 83.1, 66.5, 81.7, 78.5, 72.9, 72.3, 71.1, 77.8, 66.5, 69.9, 75.6, 77.8]
PR_FSRPN = [90.1, 76.9, 58.8, 76.4, 71.9, 69.9, 71.3, 64.0, 72.5, 62.3, 68.5, 67.2, 71.9]
PR_SGT = [87.7, 77.9, 59.2, 70.5, 75.1, 76.0, 68.5, 67.7, 69.2, 64.7, 66.7, 65.8, 72.0]
PR_mfDiMP = [73.6, 71.9, 53.0, 64.7, 63.4, 69.5, 60.7, 55.7, 68.3, 61.9, 61.4, 54.7, 64.6]
PR_Ours = [87.3, 80.7, 70.5, 80.4, 76.5, 72.6, 72.4, 66.8, 75.6, 69.8, 71.8, 74.6, 77.8]

# Convert to 0-1 scale for plotting
PR_MDNet = np.array(PR_MDNet) / 100
PR_C_COT = np.array(PR_C_COT) / 100
PR_DAPNet = np.array(PR_DAPNet) / 100
PR_MANet = np.array(PR_MANet) / 100
PR_FSRPN = np.array(PR_FSRPN) / 100
PR_SGT = np.array(PR_SGT) / 100
PR_mfDiMP = np.array(PR_mfDiMP) / 100
PR_Ours = np.array(PR_Ours) / 100

# Setup plot
angles_PR = np.linspace(0, 2 * np.pi, len(PR_feature), endpoint=False)
fig_PR = plt.figure(figsize=(10,10))
ax_PR = fig_PR.add_subplot(111, polar=True)

# Plotting data
ax_PR.plot(np.concatenate((angles_PR, [angles_PR[0]])), np.concatenate((PR_MDNet, [PR_MDNet[0]])), 'o-', linewidth=2, label='MDNet', color='orange')
ax_PR.plot(np.concatenate((angles_PR, [angles_PR[0]])), np.concatenate((PR_C_COT, [PR_C_COT[0]])), 'o-', linewidth=2, label='C-COT', color='blue')
ax_PR.plot(np.concatenate((angles_PR, [angles_PR[0]])), np.concatenate((PR_DAPNet, [PR_DAPNet[0]])), 'o-', linewidth=2, label='DAPNet', color='black')
ax_PR.plot(np.concatenate((angles_PR, [angles_PR[0]])), np.concatenate((PR_MANet, [PR_MANet[0]])), 'o-', linewidth=2, label='MANet', color='green')
ax_PR.plot(np.concatenate((angles_PR, [angles_PR[0]])), np.concatenate((PR_FSRPN, [PR_FSRPN[0]])), 'o-', linewidth=2, label='FSRPN', color='purple')
ax_PR.plot(np.concatenate((angles_PR, [angles_PR[0]])), np.concatenate((PR_SGT, [PR_SGT[0]])), 'o-', linewidth=2, label='SGT', color='brown')
ax_PR.plot(np.concatenate((angles_PR, [angles_PR[0]])), np.concatenate((PR_mfDiMP, [PR_mfDiMP[0]])), 'o-', linewidth=2, label='mfDiMP', color='pink')
ax_PR.plot(np.concatenate((angles_PR, [angles_PR[0]])), np.concatenate((PR_Ours, [PR_Ours[0]])), 'o-', linewidth=2, label='Ours', color='red')

# Labels and title
logo_PR = [str(x) + '\n' + '(' + str(round(PR_Ours[i]*100, 2)) + ')' for i, x in enumerate(PR_feature)]
ax_PR.set_thetagrids(angles_PR * 180 / np.pi, logo_PR)
ax_PR.set_ylim(0, 1)
ax_PR.set_yticks([0, 0.2, 0.4, 0.6, 0.8, 1.0])
plt.title('Precision Rate Comparison on RGBT234 Dataset', fontsize=12)

# Legend
plt.legend(loc='upper right', prop={'size': 10}, ncol=2, bbox_to_anchor=[1.2, 1])

# Show plot
plt.show()

# Save as high-resolution image
fig_PR.savefig('C:/Users/solid/Pictures/Precision_Rate_Comparison_RGBT234.png', dpi=400, bbox_inches='tight')

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值