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


Groups > comp.lang.python > #98935 > unrolled thread

Help on savefig parameters

Started byfl <rxjwg98@gmail.com>
First post2015-11-17 08:31 -0800
Last post2015-11-17 16:39 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.lang.python


Contents

  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

#98935 — Help on savefig parameters

Fromfl <rxjwg98@gmail.com>
Date2015-11-17 08:31 -0800
SubjectHelp on savefig parameters
Message-ID<38fcc7ab-409d-4050-9058-634d987bcdd8@googlegroups.com>
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)

[toc] | [next] | [standalone]


#98937

FromRob Gaddi <rgaddi@technologyhighland.invalid>
Date2015-11-17 16:39 +0000
Message-ID<n2fl7j$bbq$1@dont-email.me>
In reply to#98935
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.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web