~ubuntu-branches/ubuntu/trusty/matplotlib/trusty-proposed

« back to all changes in this revision

Viewing changes to doc/mpl_examples/pylab_examples/dolphin.py

  • Committer: Bazaar Package Importer
  • Author(s): Sandro Tosi, Benjamin Drung, Sandro Tosi
  • Date: 2009-01-14 22:09:58 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090114220958-htuy3q5s2jdc4mvl
Tags: 0.98.5.2-1
[ Benjamin Drung ]
* debian/control
  - Added python-pkg-resources to build dependency for version detection of
    python-enthought-traits
  - merged python-tk into GUI Python packages alternative dependency list
  - add myself to uploaders
* Move content of debian/patches/setup.cfg.patch to
  debian/setup.cfg to set the default backend to TkAgg

[ Sandro Tosi ]
* New upstream release
  - Fixed histogram autoscaling bug when bins or range are given
    explicitly; Closes: #503148
  - fix a FTBFS if built with GCC 4.4; thanks to Martin Michlmayr for the
    report and the patch; Closes: #505618
* debian/control
  - switch Vcs-Browser field to viewsvn
  - removed python from Depends since introduced by python:Depends
  - depending on python-all-dbg for -dbg package (to install all dbg
    interpreters)
  - moved python-tk to the first position of multiple GUI bindings Depends
    line
  - moved 'dvipng' from Recommends to Suggests (to avoid texlive to be
    automatically taken in); Closes: #490992
  - bump build-depends in python-sphinx to at least 0.5.1 (upstream doc build
    system requires it)
* debian/NEWS
  - added to notify users about default backend (TkAgg)
  - added note about 'dvipng' not installed automatically anymore
* debian/README.debian
  - added information about changing backend
* debian/rules
  - merging all "rm" calls into "dh_clean" call
  - removed 'API_CHANGES' installation, since removed upstream
  - doc building with '--small' option, to reduce doc size (removing hi-res
    and pdf gallery images)
* debian/{control,rules,patches/*,README.source}
  - moved from quilt to dpatch
* debian/patches/{matplotlibrc.template-typo.patch,
           doc_graphviz_errors_fix.patch,bts-498229_axes3d_typo.patch}
  - removed since merged upstream
* debian/docs
  - removed since not needed (the same files were listed in debian/rules)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import matplotlib.cm as cm
1
2
import matplotlib.pyplot as plt
2
3
from matplotlib.patches import Circle, PathPatch
3
4
from matplotlib.path import Path
4
5
from matplotlib.transforms import Affine2D
5
6
import numpy as np
6
7
 
 
8
 
7
9
r = np.random.rand(50)
8
10
t = np.random.rand(50) * np.pi * 2.0
9
11
x = r * np.cos(t)
11
13
 
12
14
fig = plt.figure(figsize=(6,6))
13
15
ax = plt.subplot(111)
14
 
circle = Circle((0, 0), 1, facecolor=(0,0,0.8),
 
16
circle = Circle((0, 0), 1, facecolor='none',
15
17
                edgecolor=(0,0.8,0.8), linewidth=3, alpha=0.5)
16
18
ax.add_patch(circle)
17
19
 
 
20
im = plt.imshow(np.random.random((100, 100)),
 
21
                origin='lower', cmap=cm.winter,
 
22
                interpolation='spline36',
 
23
                extent=([-1, 1, -1, 1]), zorder=1000)
 
24
im.set_clip_path(circle)
 
25
 
18
26
plt.plot(x, y, 'o', color=(0.9, 0.9, 1.0), alpha=0.8)
19
27
 
20
28
# Dolphin from OpenClipart library by Andy Fitzsimon