Mathematica中文论坛-非官方

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 6550|回复: 0
打印 上一主题 下一主题

豆粑粑 matlab pareto plot show text

[复制链接]

532

主题

602

帖子

3031

积分

论坛元老

Rank: 8Rank: 8

积分
3031
跳转到指定楼层
楼主
发表于 2017-9-6 20:55:21 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
This is a new plot function. The outputs are two kinds of figure handles.
show the text.



  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好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-29 03:28 , Processed in 0.126011 second(s), 26 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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