Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Re: Decrease the decimal places in graph

$
0
0
"Don" wrote in message <k6u8hg$bm0$1@newscl01ah.mathworks.com>...
> "Idra" wrote in message <k6u270$g0s$1@newscl01ah.mathworks.com>...
> > I want to decrease the decimal places to 4 decimal places for x and y values. I have this:
> >
> > clear
> > figure
> >
> > x=3.6330;
> > y1=0.9787;
> > y2=0.9743;
> > y3=0.9577;
> > plot(x,y1,'.-','MarkerSize',15)
> > hold all
> > plot(x,y2,'*-','MarkerSize',10)
> > plot(x,y3,'+-', 'MarkerSize',10)
> >
> > title('Comparison of power, n=7, outlier=10{\sigma},{\alpha}=0.15')
> > hleg1 = legend('Lenth', 'Dong', 'Berk & Piacard',2);
> > set(hleg1,'FontSize',7)
> > set(hleg1,'FontAngle','italic')
> > strValues = strtrim(cellstr(num2str([x(:) y1(:)],'(%f,%f)')));
> > text(x,y1,strValues,'VerticalAlignment','bottom');
> > strValues = strtrim(cellstr(num2str([x(:) y2(:)],'(%f,%f)')));
> > text(x,y2,strValues,'VerticalAlignment','bottom');
> > strValues = strtrim(cellstr(num2str([x(:) y3(:)],'(%f,%f)')));
> > text(x,y3,strValues,'VerticalAlignment','bottom');
> > xlabel('Contrasts')
> > ylabel('Power')
> >
> > Is there any solutions?Thank you!
>
> (%1.4f,%1.4f) instead of (%f,%f)...
>
> don.
Thanks a lot!

Viewing all articles
Browse latest Browse all 19628

Trending Articles