Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #98937

Re: Help on savefig parameters

From Rob Gaddi <rgaddi@technologyhighland.invalid>
Newsgroups comp.lang.python
Subject Re: Help on savefig parameters
Date 2015-11-17 16:39 +0000
Organization A noiseless patient Spider
Message-ID <n2fl7j$bbq$1@dont-email.me> (permalink)
References <38fcc7ab-409d-4050-9058-634d987bcdd8@googlegroups.com>

Show all headers | View raw


On Tue, 17 Nov 2015 08:31:08 -0800, fl wrote:

> Hi,
> I find the parameters of savefig function has the similar format of that
> of main(*argc, **argv) in C. I have tried with savefig("temp.pdf",
> format='pdf'),
> and it works. I get the help content of savefig() as below.
> But I cannot understand why they also give:
> 
> savefig(fname, dpi=None, facecolor='w', edgecolor='w', ...
> 
> For me, it looks like the first item, i.e. 'args' is missing.
> Could you explain it to me?
> 
> Thanks,
> 
> ////////////////
> savefig(*args, **kwargs)
>     Save the current figure.
>     
>     Call signature::
>     
>       savefig(fname, dpi=None, facecolor='w', edgecolor='w',
>               orientation='portrait', papertype=None, format=None,
>               transparent=False, bbox_inches=None, pad_inches=0.1,
>               frameon=None)

Numpy/scipy/matplotlib are in large part autogenerated code from the 
underlying libraries; that's where the default *args, **kwargs arguments 
are coming from.  The signature given in the documentation is the one 
that actually matters.

Prefer the web documentation to the inline docs for that entire set of 
libraries; it'll make your life easier.

-- 
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order.  See above to fix.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Help on savefig parameters fl <rxjwg98@gmail.com> - 2015-11-17 08:31 -0800
  Re: Help on savefig parameters Rob Gaddi <rgaddi@technologyhighland.invalid> - 2015-11-17 16:39 +0000

csiph-web