Mathematica中文论坛-非官方
标题:
豆粑粑 matlab pareto plot show text
[打印本页]
作者:
meatball1982
时间:
2017-9-6 20:55
标题:
豆粑粑 matlab pareto plot show text
This is a new plot function. The outputs are two kinds of figure handles.
show the text.
fig_with_text.png
(48.84 KB, 下载次数: 1405)
下载附件
2017-9-6 20:54 上传
clear all
clc
clf
y = [90,75,30,60,52,43,3,1,2];
% figure
h = pareto(y);
h_bar = h(1);
h_lin = h(2);
y_bar = get(h_bar,'YData');
y_lin = get(h_lin,'YData');
y_plot = y_lin./y_lin(end);
n_plot = sum(y_plot < 0.95) + 1;
hold on
for i = 1:n_plot
text(i,y_lin(i),mat2str(floor(1000*y_plot(i))/1000))
end
h=gcf;
fi_na=['./fig_with_text'];
fun_work_li_035_myfig_out(h,fi_na,3);
复制代码
欢迎光临 Mathematica中文论坛-非官方 (http://ilovemathematica.com/)
Powered by Discuz! X3.2