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

Skip to content

Commit 275a497

Browse files
committed
Merged revisions 7395-7398,7400-7404 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_99_maint ........ r7395 | jdh2358 | 2009-08-05 12:49:43 -0700 (Wed, 05 Aug 2009) | 1 line fixed an alpha colormapping bug posted on sf 2832575 ........ r7396 | jdh2358 | 2009-08-06 04:53:23 -0700 (Thu, 06 Aug 2009) | 1 line removed pylab load and save ........ r7397 | jdh2358 | 2009-08-06 05:02:33 -0700 (Thu, 06 Aug 2009) | 1 line tagging for 0.99 release ........ r7398 | jdh2358 | 2009-08-06 05:17:45 -0700 (Thu, 06 Aug 2009) | 1 line final build of 0.99.0 ........ r7400 | jdh2358 | 2009-08-06 07:55:54 -0700 (Thu, 06 Aug 2009) | 1 line update whats new ........ r7401 | jdh2358 | 2009-08-06 07:58:37 -0700 (Thu, 06 Aug 2009) | 1 line update whats new ........ r7402 | jdh2358 | 2009-08-06 08:10:45 -0700 (Thu, 06 Aug 2009) | 1 line some updates for the release docs ........ r7403 | leejjoon | 2009-08-06 09:11:30 -0700 (Thu, 06 Aug 2009) | 1 line fix legend bug ignoring CircleCollection ........ r7404 | jdh2358 | 2009-08-06 09:41:18 -0700 (Thu, 06 Aug 2009) | 1 line some updates to site docs for release ........ svn path=/trunk/matplotlib/; revision=7405
2 parents 0b86208 + 6285c5e commit 275a497

17 files changed

Lines changed: 322 additions & 64 deletions

CHANGELOG

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,54 @@
1+
2009-08-06 Tagging the 0.99.0 release at svn r7397 - JDH
2+
3+
* fixed an alpha colormapping bug posted on sf 2832575
4+
5+
* fix typo in axes_divider.py. use nanmin, nanmax in angle_helper.py
6+
(patch by Christoph Gohlke)
7+
8+
* remove dup gui event in enter/leave events in gtk
9+
10+
* lots of fixes for os x binaries (Thanks Russell Owen)
11+
12+
* attach gtk events to mpl events -- fixes sf bug 2816580
13+
14+
* applied sf patch 2815064 (middle button events for wx) and
15+
patch 2818092 (resize events for wx)
16+
17+
* fixed boilerplate.py so it doesn't break the ReST docs.
18+
19+
* removed a couple of cases of mlab.load
20+
21+
* fixed rec2csv win32 file handle bug from sf patch 2831018
22+
23+
* added two examples from Josh Hemann: examples/pylab_examples/barchart_demo2.py
24+
and examples/pylab_examples/boxplot_demo2.py
25+
26+
* handled sf bugs 2831556 and 2830525; better bar error messages and
27+
backend driver configs
28+
29+
* added miktex win32 patch from sf patch 2820194
30+
31+
* apply sf patches 2830233 and 2823885 for osx setup and 64 bit; thanks Michiel
32+
133

234
2009-08-04 Made cbook.get_sample_data make use of the ETag and Last-Modified
335
headers of mod_dav_svn. - JKS
436

537
2009-08-03 Add PathCollection; modify contourf to use complex
638
paths instead of simple paths with cuts. - EF
739

40+
841
2009-08-03 Fixed boilerplate.py so it doesn't break the ReST docs. - JKS
942

43+
2009-08-03 pylab no longer provides a load and save function. These
44+
are available in matplotlib.mlab, or you can use
45+
numpy.loadtxt and numpy.savetxt for text files, or np.save
46+
and np.load for binary numpy arrays. - JDH
47+
1048
2009-07-31 Added cbook.get_sample_data for urllib enabled fetching and
1149
cacheing of data needed for examples. See
1250
examples/misc/sample_data_demo.py - JDH
1351

14-
======================================================================
15-
1652
2009-07-31 Tagging 0.99.0.rc1 at 7314 - MGD
1753

1854
2009-07-30 Add set_cmap and register_cmap, and improve get_cmap,

doc/_templates/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{% extends "layout.html" %}
22
{% set title = 'matplotlib: python plotting' %}
33

4-
4+
55
{% block body %}
6-
<h1>mpl</h1>
6+
<h1>intro</h1>
77

88
<p>matplotlib is a python 2D plotting library which produces
99
publication quality figures in a variety of hardcopy formats and
@@ -41,7 +41,7 @@ <h1>mpl</h1>
4141
<a href="http://scipy.org/Numpy_Example_List_With_Doc">numpy</a> and
4242
<a href="api/mlab_api.html">matplotlib.mlab</a>.</p>
4343

44-
<h3>Plotting commands</h3> <br/>
44+
<h3>plotting commands</h3> <br/>
4545

4646
<table border="1" cellpadding="3" cellspacing="2">
4747

doc/_templates/indexsidebar.html

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,26 @@ <h3>News</h3>
33

44
<p>Please <a href="http://sourceforge.net/project/project_donations.php?group_id=80706">donate</a>
55
to support matplotlib development.</p>
6-
7-
<p>A release candidate rc2 of matplotlib-0.99.0 is <a href="http://drop.io/xortel1#">available</a> for testing. Please post any bugs to the <a href="http://sourceforge.net/tracker2/?group_id=80706">tracker</a>
6+
7+
<p>matplotlib 0.99 is available for <a href="http://sourceforge.net/projects/matplotlib">download</a>. See <a href="{{ pathto('users/whats_new') }}">what's new</a> and tips on <a href="{{
8+
pathto('users/installing') }}">installing</a>
89
</p>
910

1011
<p>Watch a <a href="http://videolectures.net/mloss08_hunter_mat">video lecture</a> about matplotlib presented at <a href="http://videolectures.net/mloss08_whistler">NIPS 08 Workshop</a> <i>Machine Learning Open Source Software</i></a>.
1112
</p>
1213

13-
<h3>Download</h3>
14-
15-
<p>Current version: <b>{{ version }}</b></p>
16-
17-
18-
<p>Download matplotlib from the
19-
sourceforge <a href="http://sourceforge.net/projects/matplotlib">project</a>
20-
page (but first take a look at the <a href="{{
21-
pathto('users/installing') }}">installing</a> page). Here's a summary
22-
of <a href="{{ pathto('users/whats_new') }}">what's new</a>. </p>
23-
2414
<p>There are several matplotlib addon <a href="{{
2515
pathto('users/toolkits') }}">toolkits</a>, including the projection
2616
and mapping toolkit
27-
<a href="http://matplotlib.sf.net/basemap/doc/html">basemap</a>.</p>
17+
<a href="http://matplotlib.sf.net/basemap/doc/html">basemap</a>, 3d plotting with <a href="{{
18+
pathto('mpl_toolkits/mplot3d/index') }}">mplot3d</a>, wild and wonderful axes and axis helpers in <a href="{{
19+
pathto('mpl_toolkits/axes_grid/index') }}">axes_grid</a> and more.
20+
</p>
2821

2922

3023
<h3>Need help?</h3>
3124

32-
<p>Check the <a href="{{ pathto('users/index') }}">user</a> guide,
25+
<p>Check the <a href="{{ pathto('users/index') }}">user guide</a>,
3326
the <a href="{{ pathto('faq/index') }}">faq</a>, the <a href="{{
3427
pathto('api/index') }}">api</a> docs,
3528
<a href="http://www.nabble.com/matplotlib---users-f2906.html">archives</a>,

doc/api/api_changes.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,13 @@ list may help describe what changes may be necessary in your code.
1818
.. _configobj: http://www.voidspace.org.uk/python/configobj.html
1919
.. _`enthought.traits`: http://code.enthought.com/projects/traits
2020

21-
Changes beyond 0.98.x
22-
=====================
21+
Changes in 0.99
22+
======================
23+
24+
* pylab no longer provides a load and save function. These are
25+
available in matplotlib.mlab, or you can use numpy.loadtxt and
26+
numpy.savetxt for text files, or np.save and np.load for binary
27+
numpy arrays.
2328

2429
* User-generated colormaps can now be added to the set recognized
2530
by :func:`matplotlib.cm.get_cmap`. Colormaps can be made the

doc/faq/installing_faq.rst

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -293,22 +293,20 @@ Installing OSX binaries
293293
-----------------------
294294

295295
If you want to install matplotlib from one of the binary installers we
296-
build, you have two choices: a mpkg installer, which is a typical
296+
build, you have two choices: a dmg installer, which is a typical
297297
Installer.app, or an binary OSX egg, which you can install via
298298
setuptools easy_install.
299-
300-
The mkpg installer will have a "zip" extension, and will have a name
301-
like file:`matplotlib-0.99.0.rc1-py2.5-macosx10.5_mpkg.zip` depending on
302-
the python, matplotlib, and OSX versions. You need to unzip this file
303-
using either the "unzip" command on OSX, or simply double clicking on
304-
it to run StuffIt Expander. When you double click on the resultant
305-
mpkd directory, which will have a name like
306-
file:`matplotlib-0.99.0.rc1-py2.5-macosx10.5.mpkg`, it will run the
307-
Installer.app, prompt you for a password if you need system wide
308-
installation privileges, and install to a directory like
309-
file:`/Library/Python/2.5/site-packages/`, again depedending on your
310-
python version. This directory may not be in your python path, so you
311-
can test your installation with::
299+
300+
The mkpg installer will have a "dmg" extension, and will have a name
301+
like :file:`matplotlib-0.99.0-py2.5-macosx10.5.dmg` depending on the
302+
python, matplotlib, and OSX versions. Save this file and double
303+
click it, which will open up a folder with a file in it that has the
304+
mpkg extension. Double click this to run the Installer.app, which
305+
will prompt you for a password if you need system wide installation
306+
privileges, and install to a directory like
307+
:file:`/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages`,
308+
again depedending on your python version. This directory should be in
309+
your python path, so you can test your installation with::
312310

313311
> python -c 'import matplotlib; print matplotlib.__version__, matplotlib.__file__'
314312

@@ -320,9 +318,9 @@ If you get an error like::
320318

321319
then you will need to set your PYTHONPATH, eg::
322320

323-
export PYTHONPATH=/Library/Python/2.5/site-packages:$PYTHONPATH
321+
export PYTHONPATH=/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages:$PYTHONPATH
324322

325-
See also ref:`environment-variables`.
323+
See also :ref:`environment-variables`.
326324

327325
.. _easy-install-osx-egg:
328326

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import numpy as np
2+
import matplotlib.pyplot as plt
3+
from mpl_toolkits.axes_grid.axes_rgb import RGBAxes
4+
5+
def get_demo_image():
6+
# prepare image
7+
delta = 0.5
8+
9+
extent = (-3,4,-4,3)
10+
x = np.arange(-3.0, 4.001, delta)
11+
y = np.arange(-4.0, 3.001, delta)
12+
X, Y = np.meshgrid(x, y)
13+
import matplotlib.mlab as mlab
14+
Z1 = mlab.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
15+
Z2 = mlab.bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
16+
Z = (Z1 - Z2) * 10
17+
18+
return Z, extent
19+
20+
21+
22+
def get_rgb():
23+
Z, extent = get_demo_image()
24+
25+
Z[Z<0] = 0.
26+
Z = Z/Z.max()
27+
28+
R = Z[:13,:13]
29+
G = Z[2:,2:]
30+
B = Z[:13,2:]
31+
32+
return R, G, B
33+
34+
35+
fig = plt.figure(1)
36+
ax = RGBAxes(fig, [0.1, 0.1, 0.8, 0.8])
37+
38+
r, g, b = get_rgb()
39+
kwargs = dict(origin="lower", interpolation="nearest")
40+
ax.imshow_rgb(r, g, b, **kwargs)
41+
42+
ax.RGB.set_xlim(0., 9.5)
43+
ax.RGB.set_ylim(0.9, 10.6)
44+
45+
46+
plt.draw()
47+
plt.show()
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from mpl_toolkits.mplot3d import Axes3D
2+
from matplotlib import cm
3+
import pylab
4+
import random
5+
import numpy as np
6+
7+
fig = pylab.figure()
8+
ax = Axes3D(fig)
9+
X = np.arange(-5, 5, 0.25)
10+
Y = np.arange(-5, 5, 0.25)
11+
X, Y = np.meshgrid(X, Y)
12+
R = np.sqrt(X**2 + Y**2)
13+
Z = np.sin(R)
14+
ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.jet)
15+
16+
pylab.show()
17+

doc/pyplots/whats_new_99_spines.py

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import matplotlib.pyplot as plt
2+
import numpy as np
3+
from matplotlib.pyplot import show
4+
5+
6+
def adjust_spines(ax,spines):
7+
for loc, spine in ax.spines.iteritems():
8+
if loc in spines:
9+
spine.set_position(('outward',10)) # outward by 10 points
10+
else:
11+
spine.set_color('none') # don't draw spine
12+
13+
# turn off ticks where there is no spine
14+
if 'left' in spines:
15+
ax.yaxis.set_ticks_position('left')
16+
else:
17+
# no yaxis ticks
18+
ax.yaxis.set_ticks([])
19+
20+
if 'bottom' in spines:
21+
ax.xaxis.set_ticks_position('bottom')
22+
else:
23+
# no xaxis ticks
24+
ax.xaxis.set_ticks([])
25+
26+
fig = plt.figure()
27+
28+
x = np.linspace(0,2*np.pi,100)
29+
y = 2*np.sin(x)
30+
31+
ax = fig.add_subplot(2,2,1)
32+
ax.plot(x,y)
33+
adjust_spines(ax,['left'])
34+
35+
ax = fig.add_subplot(2,2,2)
36+
ax.plot(x,y)
37+
adjust_spines(ax,[])
38+
39+
ax = fig.add_subplot(2,2,3)
40+
ax.plot(x,y)
41+
adjust_spines(ax,['left','bottom'])
42+
43+
ax = fig.add_subplot(2,2,4)
44+
ax.plot(x,y)
45+
adjust_spines(ax,['bottom'])
46+
47+
show()

doc/users/annotations.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
Annotating text
44
===============
55

6+
For a more detailed introduction to annotations, see
7+
:ref:`plotting-guide-annotation`.
8+
69
The uses of the basic :func:`~matplotlib.pyplot.text` command above
710
place text at an arbitrary position on the Axes. A common use case of
811
text is to annotate some feature of the plot, and the

doc/users/plotting.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,5 +152,4 @@ Annotating plot
152152

153153
:ref:`plotting-guide-annotation`
154154

155-
TODO; see :ref:`how-to-contribute-docs`.
156155

0 commit comments

Comments
 (0)