The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: pass a figure as an argument to a function
Replies: 1   Last Post: Mar 27, 2012 6:56 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Bjorn Gustavsson

Posts: 430
Registered: 12/7/04
Re: pass a figure as an argument to a function
Posted: Mar 27, 2012 6:56 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Yu " <> wrote in message <jks1go$cfr$>...
> I need to save a plot as vector-graphic-based pdf-file. the following function serves the purpose to avoid big margins when saving pdf files. My question is, how to call this function withs a figure, e.g.
> figure(1)
> x = -pi:.1:pi;
> y = sin(x);
> plot(x,y)
> as the first argument.
> Here the function I stole somewhere from a blogg:
> saveTightFigure(h,outfilename)

Call figure with an output:

Hfigure2save = figure(1);

then call saveTightFigure with that figure handle:


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.