File Exchange Pick of the Week

Our best user submissions

Errorbar with Adjusted Tick Size

Jiro's pick this week isErrorbar with Adjusted TickbyArnaud Laurent.

Just this week, I got acommentfrom Felipe on a guest post ("Making Pretty Graphs") that I did on Loren's blog. He pointed out this function by Arnaud that helps adjust the size of the horizontal ticks at the top and bottom of theerrorbarsthat I had to fix manually in the post. Thanks Felipe for the tip!

Theerrorbar自动确定基于th蜱虫的大小e limits of the axes, and there is no simple option to change that. However, the function can return a handle toerrorbarseries, and you can modify the tick size by digging into its properties. That's what I did in my blog post. Now, it's even easier with Arnaud'serrorbar_tick. I echo Felipe's comment on the entry page that it's nice howerrorbar_tickworks on the handle returned by theerrorbarfunction, rather than recreating the functionality available inerrorbar.

Create a standarderrorbarplot:

x = 1:10; y = sin(x); e = std(y)*ones(size(x)); h = errorbar(x,y,e,'o-'); set(h,'MarkerSize', 10,'MarkerFaceColor', [.3 1 .3],...'MarkerEdgeColor', [0 .5 0]);

应用程序lyerrorbar_tickto increase tick size:

errorbar_tick(h, 30);

Comments

Let us know what you thinkhereor leave acommentfor Arnaud.




Published with MATLAB® 7.13

|
  • print
  • send email

Comments

To leave a comment, please clickhereto sign in to your MathWorks Account or create a new one.