原博客地址:https://blog.csdn.net/laizi_laizi/article/details/120935429
直接在pycharm里面就能运行

import numpy as np
import matplotlib.pyplot as plt
import matplotlib.axes._axes as axes
import matplotlib.figure as figure
from matplotlib.backends.backend_pdf import PdfPages
pdf = PdfPages('speed-eao2018.pdf')
plt.rc('font',family='Times New Roman')fig, ax = plt.subplots()  # type:figure.Figure, axes.Axes
ax.set_title('The Performance $vs.$ Speed on VOT-2018', fontsize=15)
ax.set_xlabel('Tracking Speed (FPS)', fontsize=15)
ax.set_ylabel('EAO', fontsize=15)trackers = ['C-RPN', 'SiamVGG', 'DaSiamRPN', 'ATOM', 'SiamRPN++', 'DiMP', 'Ours (offline-2)', 'Ours (offline-1)', 'Ours (online)']
speed = np.array([50, 75, 65, 35, 50, 45, 72, 58, 25])
speed_norm = np.array([50, 75, 65, 35, 50, 45, 72, 58, 25]) / 48
performance = np.array([0.273, 0.286, 0.380, 0.401, 0.414, 0.440, 0.438, 0.467, 0.490])circle_color = ['cornflowerblue', 'deepskyblue',  'turquoise', 'gold', 'yellowgreen', 'orange', 'r', 'r', 'r']
# Marker size in units of points^2
volume = (300 * speed_norm/5 * performance/0.6)  ** 2ax.scatter(speed, performance, c=circle_color, s=volume, alpha=0.4)
ax.scatter(speed, performance, c=circle_color, s=20, marker='o')
# text
ax.text(speed[0] - 2.37, performance[0] - 0.031, trackers[0], fontsize=10, color='k')
ax.text(speed[1] - 11.00, performance[1] - 0.005, trackers[1], fontsize=10, color='k')
ax.text(speed[2] - 3.5, performance[2] - 0.05, trackers[2], fontsize=10, color='k')
ax.text(speed[3] - 2.4, performance[3] - 0.032, trackers[3], fontsize=10, color='k')
ax.text(speed[4] - 2.9, performance[4] - 0.040, trackers[4], fontsize=10, color='k')
ax.text(speed[5] - 1.8, performance[5] - 0.042, trackers[5], fontsize=10, color='k')
ax.text(speed[6] - 6.0, performance[6] + 0.051, trackers[6], fontsize=14, color='k')
ax.text(speed[7] - 4.5, performance[7] -0.050, trackers[7], fontsize=12, color='k')
ax.text(speed[8] - 4, performance[8] -0.035, trackers[8], fontsize=12, color='k')ax.grid(which='major', axis='both', linestyle='-.') # color='r', linestyle='-', linewidth=2
ax.set_xlim(20, 80)
ax.set_ylim(0.20, 0.53)
ax.xaxis.set_tick_params(labelsize=15)
ax.yaxis.set_tick_params(labelsize=15)# plot lines
ystart, yend = ax.get_ylim()
ax.plot([25, 25], [ystart, yend], linestyle="--", color='k', linewidth=0.7)
ax.plot([25, 58], [0.490,  0.467], linestyle="--", color='r', linewidth=0.7)
ax.plot([58, 72], [0.467, 0.438], linestyle="--", color='r', linewidth=0.7)
ax.text(26, 0.230, 'Real-time line', fontsize=11, color='k')fig.savefig('speed-eao2018.svg')pdf.savefig()
pdf.close()
plt.show()

效果图

MATLAB代码

clear; close all; clc;
load('../data/attr_eao_vot2016.mat');tracker_names = fieldnames(result);
legend_names = fieldnames(result.(tracker_names{1}));
num_tracker = length(tracker_names);
num_attr = length(legend_names);
eao = zeros(num_tracker,num_attr);
for i = 1:num_trackerfor j = 1:num_attreao(i,j) = result.(tracker_names{i}).(legend_names{j});end
end
[eao_sorted,sorted_index] = sort(eao(:,1),'descend'); % rank by baseline eao
tracker_names = tracker_names(sorted_index);figure;
Maker_style = {'o','x','*','v','diamond','+','<','pentagram','>','square','^','hexagram'};
Color_style = hsv(7);
line([0,num_tracker],[0.255,0.255],'LineWidth',2,'Color',[0.7 0.7 0.7]); hold on;
recent_index = [1,2,4,5,7,10,13,15,17,22,28,31,36,39,50];for i = 1:num_trackerif i == 1 || i == 3m(i) = plot(i,eao_sorted(i),'Marker','.','Color',Color_style(i,:),...'LineStyle','none','LineWidth',2,'MarkerSize',35);hold on;elsem(i) = plot(i,eao_sorted(i),'Marker',Maker_style{mod(i-1,12)+1},'Color',Color_style(mod(i-1,7)+1,:),...'LineStyle','none','LineWidth',2,'MarkerSize',10);hold on;endplot([i,i],[0,eao_sorted(i)],'LineStyle',':','Color',[0.83 0.81 0.78]);hold on;if any(i == recent_index)plot(i+2, 0.05,'MarkerSize',6,'Marker','o','LineStyle','none',...'Color',[0.83 0.81 0.8],'LineWidth',2);hold on;end
endset(gca,'xdir','reverse')
ylim([0,(eao_sorted(1)+0.05)]);
xlim([1, num_tracker]);
set(gca,'XTick',1:5:70);
set(gca,'YTick',0:0.05:(eao_sorted(1)+0.05))
set(gca,'linewidth',2);
set(gca,'FontSize',12);
% annotation('textarrow',[0.76,0.8],[0.76,0.72],'String','SAECO','FontWeight','bold','FontSize',12);
annotation('textbox',[.15,.8,.1,.1],'String','$$\hat{\Phi}$$','FontWeight','bold','FontSize',30,'LineStyle','none','Interpreter','latex','FitBoxToText','off')
box onnum_tracker_show = 10; % only write top10
for i = 1:num_tracker_show %legend_names{i} = [strrep(tracker_names{i},'_','\_'),...num2str(eao_sorted(i),'~[%0.3f]')];
end
legend(m(1:num_tracker_show),legend_names(1:num_tracker_show),...'Location','eastoutside','Interpreter', 'latex','FontSize',16)
set(gcf, 'position', [500 300 800 250]);
saveas(gcf,'../img/eao_rank_vot2016','pdf');
saveas(gcf,'../img/eao_rank_vot2016','png');

clear; close all; clc;
load('../data/attr_eao_vot2016.mat');tracker_names = fieldnames(result);
legend_names = fieldnames(result.(tracker_names{1}));
num_tracker = length(tracker_names);
num_attr = length(legend_names);
eao = zeros(num_tracker,num_attr);
for i = 1:num_trackerfor j = 1:num_attreao(i,j) = result.(tracker_names{i}).(legend_names{j});end
end
[s,sorted_index] = sort(eao(:,1),'descend'); % rank by baseline eaonum_tracker_show = 10; % only write top10
tracker_names = tracker_names(sorted_index(1:num_tracker_show));
eao = eao(sorted_index(1:num_tracker_show),:);eao(:,num_attr+1) = eao(:,1);a_min = min(eao,[],1);
a_max = max(eao,[],1);t = (0:1/num_attr:1)*2*pi;
h = [];
masker_shape = {'x','.'};
masker_size = {10,40};
color_masker = hsv(num_tracker_show);
color_line = color_masker*0.4 +ones(num_tracker_show,3)*0.6;
ax = polaraxes;for i = 1:num_tracker_showh(i) = polarplot(t, (eao(i,:)-a_min)./(a_max-a_min)+0.2, 'MarkerSize',masker_size{mod(i,2)+1},...'Marker',masker_shape{mod(i,2)+1},'LineWidth',2,...'Color',color_line(i,:),'MarkerEdgeColor',color_masker(i,:)); hold on;
endpolarplot(t, 0.5, 'LineWidth',2, 'Color',[0,0,0]); hold on;grid off
legend_names = {'Overall','Occlusion','Camera~motion','Size~change',...'Illumination~change','Motion~change', 'Unassigned'};
for i = 1:num_attrlegend_names{i} = ['\begin{tabular}{c}', legend_names{i}, '\\',...[num2str(a_min(i),'(%.3f,') num2str(a_max(i),'%.3f)')], '\end{tabular}'];
end
ax.ThetaTickLabels = legend_names;
ThetaTick = (0:1/num_attr:1)*360;
ax.ThetaTick = ThetaTick(1:end-1);
ax.RTickLabels = [];
ax.TickLabelInterpreter = 'latex';for i = 1:num_tracker_show %tracker_names{i} = strrep(tracker_names{i},'_','\_');
end ah1 = gca;
legend1=legend(ah1,h(1:5),tracker_names(1:5),'Orientation','horizontal','Location','southoutside');
ah2=axes('position',get(gca,'position'), 'visible','off');
legend2=legend(ah2,h(6:10),tracker_names(6:10),'Orientation','horizontal','Location','southoutside');
set(legend1,'Box','off')
set(legend2,'Box','off')
legend1_pos = get(legend1,'Position');
set(legend2,'Position',legend1_pos-[0,legend1_pos(4)*1.2,0,0]);% set(gcf, 'position', [500 300 800 800]);
saveas(gcf,'../img/attr_eao_vot2016','pdf')
saveas(gcf,'../img/attr_eao_vot2016','png')

tracking里面的性能图怎么画,类似ocean论文中的相关推荐

  1. 使用canvas画类似excel表格

    思路 先把表格分成3个canvas来画, 因为 excel表的左边和上面都是跟随内容来移动 通过oniscroll 事件来进行联动 如果需要再进行导出excel ,可以使用JsonExportExce ...

  2. mfc如何删除lineto画的_见到过的最完整的CAD实例教程:如何画切割刀片

    大家不用猜测,为什么许久都不更新CAD的实例教程. 就是因为没素材,没有其他特别原因. 而前几天,终于有同学发来素材来咨询具体的画法,今天就给这位小伙伴一个满意的答复,也希望大家在画类似的图形时有所参 ...

  3. Excel画横坐标不均分的图表

    大家在用Excel的数据作图的时候,经常需要画类似下面这样的图 也就是横坐标的值并不是均匀的,小规模时可能会列出对应123456789各个具体的图表值,但到后面只需要列出对应20,30,...100, ...

  4. python画直方图代码-python plotly画柱状图代码实例

    这篇文章主要介绍了python plotly画柱状图代码实例,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下 代码 import pandas as ...

  5. python画柱状图代码-python plotly画柱状图代码实例

    这篇文章主要介绍了python plotly画柱状图代码实例,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下 代码 import pandas as ...

  6. python画柱状图-python plotly画柱状图代码实例

    这篇文章主要介绍了python plotly画柱状图代码实例,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下 代码 import pandas as ...

  7. python画花朵代码_python画花朵代码分享

    python画花朵代码分享 发布时间:2020-05-09 15:36:11 来源:亿速云 阅读:295 作者:小新 这篇文章主要为大家详细介绍了python画花朵代码,文中示例代码介绍的非常详细,具 ...

  8. 程序员之提升开发效率非常实用的十个工具网站分享

    一.regex101 强大的正则表达式工具,可以实时查看匹配信息,并且会用不同的颜色将 Group 标记出来,而且有 Quick Reference 来帮助记忆正则表达式的规则和 Explanatio ...

  9. 程序猿菜鸟打怪升级—一路火花带闪电

    文章目录 一. 昨夜西风凋碧树,独上高楼,望尽天涯路 二. 衣带渐宽终不悔,为伊消得人憔悴 三.众里寻他千百度,蓦然回首,那人却在,灯火阑珊处 [告别平庸的9个方法] 各位小伙伴,大家好!我是猿人谷, ...

最新文章

  1. 创业公司如何做数据分析(一)开篇
  2. 一个简单好用的Android Tab 设计与实现
  3. 群晖NAS百度云Docker客户端下载目录没有权限的问题解决
  4. idea改成c盘_解决IDEA占用C盘空间过大的问题
  5. ubuntu中由apt-get获得的文件包保存在哪里?
  6. oracle sql的正则表达式,Oracle SQL 语句中正则表达式的应用
  7. 中国凝胶密封高效空气过滤器行业市场供需与战略研究报告
  8. NUCLE0 STM32L476RGT6开发板的资料整理
  9. OpenRisc-6-wishbone实验
  10. 移动应用广告之商业变现的实现策略
  11. 与10.110.12.29mask255.255.255.224属于同一网段的主机ip地址是
  12. iOS - UILabel点击选中文字,部分高亮,YYLabel
  13. opencv 中x,y,height, width,rows,cols 的关系
  14. 已解决 阿里云盘 应用网络状况不佳,扫码,用账号登录,用手机号登录都不可以
  15. 系列之 H5+js 游戏 遍历象棋(待更新)
  16. python布尔类型(bool)
  17. C++课程设计-失物招领系统
  18. 不怕有错误,就怕没错误(1)
  19. PyG Cora图数据集可视化教程
  20. ICCV-2021:APR

热门文章

  1. 在Xml中加注释的方法
  2. 微信小程序如何申请开通流量主
  3. PMP-33项目质量管理
  4. poj1837 balance
  5. Dialogs 介绍
  6. Mysql连接1045错误解决
  7. 2017远景能源Java面试
  8. 计算机网络的企业分析,计算机网络系统在企业中的应用分析
  9. [4G5G专题-64]:RF层 - 无线电磁波的基本原理与传输特性
  10. Vue3前后端交互错误处理一致性