Mathematica中文论坛-非官方

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 6405|回复: 0

豆粑粑 matlab pareto plot show text

[复制链接]

525

主题

594

帖子

2980

积分

金牌会员

Rank: 6Rank: 6

积分
2980
发表于 2017-9-6 20:55:21 | 显示全部楼层 |阅读模式
This is a new plot function. The outputs are two kinds of figure handles.
show the text.

fig_with_text.png

  1. clear all
  2. clc
  3. clf

  4. y = [90,75,30,60,52,43,3,1,2];
  5. % figure
  6. h = pareto(y);

  7. h_bar  = h(1);
  8. h_lin  = h(2);


  9. y_bar = get(h_bar,'YData');
  10. y_lin = get(h_lin,'YData');

  11. y_plot = y_lin./y_lin(end);

  12. n_plot = sum(y_plot < 0.95) + 1;

  13. hold on
  14. for i = 1:n_plot
  15.     text(i,y_lin(i),mat2str(floor(1000*y_plot(i))/1000))
  16. end

  17. h=gcf;
  18. fi_na=['./fig_with_text'];
  19. fun_work_li_035_myfig_out(h,fi_na,3);  
复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|Mathematica中文论坛-非官方 ( 辽ICP备16001491号-1

GMT+8, 2024-3-29 17:26 , Processed in 0.127167 second(s), 29 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表