pep8ify examples/ part 3

``examples/pylab_examples``, ``examples/units`` and ``examples/use_interface`` remain to be done.
Yes, if there is only a single binary operator, then it is absolutely
appropriate to use white space. With some of the expressions that have
np.pi (or math.pi), I usually would group that with some other appropriate
constant like the 2 (so, 2 * np.pi * foobar would become 2*np.pi * foobar).

As for the complex notation, I would completely avoid it. It is not
immediately obvious to many that it is equivalent (I have only seen math
majors do that sort of notation). As for the difference between np.hypot
and the np.sqrt() of the sum of squares. I personally prefer np.hypot as it
is usually less typing for me. The other advantage of np.hypot() is that it
won't overflow when given large values (although it can underflow, but the
same is true with the sqrt of the sum of squares.



On Fri, Jul 4, 2014 at 12:13 PM, Thomas Hisch <notifications@github.com>
wrote:

> In examples/event_handling/poly_editor.py:
>
> >      r = 1.5
> >
> > -    xs = r*np.cos(theta)
> > -    ys = r*np.sin(theta)
> > +    xs = r * np.cos(theta)
> > +    ys = r * np.sin(theta)
>
> If there is only one binary operator in a line and the operator is either
> a multiplication or division op., I would keep the whitespace around the
> operator.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/matplotlib/matplotlib/pull/3183/files#r14564229>.
>