Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6afba8d

Browse files
committed
Merge pull request #2504 from ianthomas23/qhull_delaunay
Using qhull for Delaunay triangulation
2 parents e293f6d + aaffef4 commit 6afba8d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+28244
-1515
lines changed

CHANGELOG

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1+
2013-11-28 Added qhull extension module to perform Delaunay triangulation more
2+
robustly than before. It is used by tri.Triangulation (and hence
3+
all pyplot.tri* methods) and mlab.griddata. Deprecated
4+
matplotlib.delaunay module. - IMT
5+
16
2013-10-27 Added get_rlabel_position and set_rlabel_position methods to
2-
PolarAxes to control angular position of radial tick labels.
3-
7+
PolarAxes to control angular position of radial tick labels.
8+
49
2013-10-06 Add stride-based functions to mlab for easy creation of 2D arrays
510
with less memory.
611

@@ -27,16 +32,16 @@
2732
and matplotlib.units.Registry.
2833

2934
2013-06-26 Refactored the axes module: the axes module is now a folder,
30-
containing the following submodule:
31-
- _subplots.py, containing all the subplots helper methods
32-
- _base.py, containing several private methods and a new
33-
_AxesBase class. This _AxesBase class contains all the methods
34-
that are not directly linked to plots of the "old" Axes
35-
- _axes.py contains the Axes class. This class now inherits from
36-
_AxesBase: it contains all "plotting" methods and labelling
37-
methods.
38-
This refactoring should not affect the API. Only private methods
39-
are not importable from the axes module anymore.
35+
containing the following submodule:
36+
- _subplots.py, containing all the subplots helper methods
37+
- _base.py, containing several private methods and a new
38+
_AxesBase class. This _AxesBase class contains all the methods
39+
that are not directly linked to plots of the "old" Axes
40+
- _axes.py contains the Axes class. This class now inherits from
41+
_AxesBase: it contains all "plotting" methods and labelling
42+
methods.
43+
This refactoring should not affect the API. Only private methods
44+
are not importable from the axes module anymore.
4045

4146
2013-05-18 Added support for arbitrary rasterization resolutions to the
4247
SVG backend. Previously the resolution was hard coded to 72
@@ -52,22 +57,21 @@
5257

5358
2013-04-25 Changed all instances of:
5459

55-
from matplotlib import MatplotlibDeprecationWarning as mplDeprecation
56-
to:
57-
58-
from cbook import mplDeprecation
60+
from matplotlib import MatplotlibDeprecationWarning as mplDeprecation
61+
to:
5962

60-
and removed the import into the matplotlib namespace in __init__.py
61-
Thomas Caswell
63+
from cbook import mplDeprecation
6264

65+
and removed the import into the matplotlib namespace in __init__.py
66+
Thomas Caswell
6367

6468
2013-04-15 Added 'axes.xmargin' and 'axes.ymargin' to rpParams to set default
65-
margins on auto-scaleing. - TAC
69+
margins on auto-scaleing. - TAC
6670

6771
2013-04-16 Added patheffect support for Line2D objects. -JJL
6872

6973
2013-03-19 Added support for passing `linestyle` kwarg to `step` so all `plot`
70-
kwargs are passed to the underlying `plot` call. -TAC
74+
kwargs are passed to the underlying `plot` call. -TAC
7175

7276
2013-02-25 Added classes CubicTriInterpolator, UniformTriRefiner, TriAnalyzer
7377
to matplotlib.tri module. - GBy

MANIFEST.in

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,5 @@ recursive-include LICENSE *
1414
recursive-include examples *
1515
recursive-include doc *
1616
recursive-include src *.cpp *.c *.h *.m
17-
recursive-include CXX *.cxx *.hxx *.c *.h
18-
recursive-include agg24 *
1917
recursive-include lib *
20-
recursive-include ttconv *.cpp *.h
18+
recursive-include extern *

examples/pylab_examples/griddata_demo.py

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,22 @@
66
#npts = int(raw_input('enter # of random points to plot:'))
77
seed(0)
88
npts = 200
9-
x = uniform(-2,2,npts)
10-
y = uniform(-2,2,npts)
11-
z = x*np.exp(-x**2-y**2)
9+
x = uniform(-2, 2, npts)
10+
y = uniform(-2, 2, npts)
11+
z = x*np.exp(-x**2 - y**2)
1212
# define grid.
13-
xi = np.linspace(-2.1,2.1,100)
14-
yi = np.linspace(-2.1,2.1,200)
13+
xi = np.linspace(-2.1, 2.1, 100)
14+
yi = np.linspace(-2.1, 2.1, 200)
1515
# grid the data.
16-
zi = griddata(x,y,z,xi,yi,interp='linear')
16+
zi = griddata(x, y, z, xi, yi, interp='linear')
1717
# contour the gridded data, plotting dots at the nonuniform data points.
18-
CS = plt.contour(xi,yi,zi,15,linewidths=0.5,colors='k')
19-
CS = plt.contourf(xi,yi,zi,15,cmap=plt.cm.rainbow,
18+
CS = plt.contour(xi, yi, zi, 15, linewidths=0.5, colors='k')
19+
CS = plt.contourf(xi, yi, zi, 15, cmap=plt.cm.rainbow,
2020
vmax=abs(zi).max(), vmin=-abs(zi).max())
21-
plt.colorbar() # draw colorbar
21+
plt.colorbar() # draw colorbar
2222
# plot data points.
23-
plt.scatter(x,y,marker='o',c='b',s=5,zorder=10)
24-
plt.xlim(-2,2)
25-
plt.ylim(-2,2)
23+
plt.scatter(x, y, marker='o', c='b', s=5, zorder=10)
24+
plt.xlim(-2, 2)
25+
plt.ylim(-2, 2)
2626
plt.title('griddata test (%d points)' % npts)
2727
plt.show()
28-
29-
# test case that scikits.delaunay fails on, but natgrid passes..
30-
#data = np.array([[-1, -1], [-1, 0], [-1, 1],
31-
# [ 0, -1], [ 0, 0], [ 0, 1],
32-
# [ 1, -1 - np.finfo(np.float_).eps], [ 1, 0], [ 1, 1],
33-
# ])
34-
#x = data[:,0]
35-
#y = data[:,1]
36-
#z = x*np.exp(-x**2-y**2)
37-
## define grid.
38-
#xi = np.linspace(-1.1,1.1,100)
39-
#yi = np.linspace(-1.1,1.1,100)
40-
## grid the data.
41-
#zi = griddata(x,y,z,xi,yi)

extern/qhull/COPYING.txt

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Qhull, Copyright (c) 1993-2012
2+
3+
C.B. Barber
4+
Arlington, MA
5+
6+
and
7+
8+
The National Science and Technology Research Center for
9+
Computation and Visualization of Geometric Structures
10+
(The Geometry Center)
11+
University of Minnesota
12+
13+
14+
15+
This software includes Qhull from C.B. Barber and The Geometry Center.
16+
Qhull is copyrighted as noted above. Qhull is free software and may
17+
be obtained via http from www.qhull.org. It may be freely copied, modified,
18+
and redistributed under the following conditions:
19+
20+
1. All copyright notices must remain intact in all files.
21+
22+
2. A copy of this text file must be distributed along with any copies
23+
of Qhull that you redistribute; this includes copies that you have
24+
modified, or copies of programs or other software products that
25+
include Qhull.
26+
27+
3. If you modify Qhull, you must include a notice giving the
28+
name of the person performing the modification, the date of
29+
modification, and the reason for such modification.
30+
31+
4. When distributing modified versions of Qhull, or other software
32+
products that include Qhull, you must provide notice that the original
33+
source code may be obtained as noted above.
34+
35+
5. There is no warranty or other guarantee of fitness for Qhull, it is
36+
provided solely "as is". Bug reports or fixes may be sent to
37+
[email protected]; the authors may or may not act on them as
38+
they desire.

0 commit comments

Comments
 (0)