You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(115) |
Aug
(120) |
Sep
(137) |
Oct
(170) |
Nov
(461) |
Dec
(263) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(120) |
Feb
(74) |
Mar
(35) |
Apr
(74) |
May
(245) |
Jun
(356) |
Jul
(240) |
Aug
(115) |
Sep
(78) |
Oct
(225) |
Nov
(98) |
Dec
(271) |
| 2009 |
Jan
(132) |
Feb
(84) |
Mar
(74) |
Apr
(56) |
May
(90) |
Jun
(79) |
Jul
(83) |
Aug
(296) |
Sep
(214) |
Oct
(76) |
Nov
(82) |
Dec
(66) |
| 2010 |
Jan
(46) |
Feb
(58) |
Mar
(51) |
Apr
(77) |
May
(58) |
Jun
(126) |
Jul
(128) |
Aug
(64) |
Sep
(50) |
Oct
(44) |
Nov
(48) |
Dec
(54) |
| 2011 |
Jan
(68) |
Feb
(52) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <md...@us...> - 2008-12-12 13:39:36
|
Revision: 6587
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6587&view=rev
Author: mdboom
Date: 2008-12-12 13:39:32 +0000 (Fri, 12 Dec 2008)
Log Message:
-----------
Fix cross-reference in docs
Modified Paths:
--------------
branches/v0_98_5_maint/doc/faq/installing_faq.rst
Modified: branches/v0_98_5_maint/doc/faq/installing_faq.rst
===================================================================
--- branches/v0_98_5_maint/doc/faq/installing_faq.rst 2008-12-12 13:38:57 UTC (rev 6586)
+++ branches/v0_98_5_maint/doc/faq/installing_faq.rst 2008-12-12 13:39:32 UTC (rev 6587)
@@ -106,7 +106,8 @@
> cd matplotlib
> python setup.py install
-For more information on Subversion usage, see :ref:`using-svn`.
+There is more information on :ref:`using Subversion <using-svn>` in
+the developer docs.
Install from git
================
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-12-12 13:39:02
|
Revision: 6586
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6586&view=rev
Author: mdboom
Date: 2008-12-12 13:38:57 +0000 (Fri, 12 Dec 2008)
Log Message:
-----------
Merged revisions 6585 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_98_5_maint
........
r6585 | mdboom | 2008-12-12 08:34:06 -0500 (Fri, 12 Dec 2008) | 1 line
Cleanup svnmerge docs; add Andrew's git docs
........
Modified Paths:
--------------
trunk/matplotlib/doc/devel/coding_guide.rst
trunk/matplotlib/doc/faq/installing_faq.rst
Property Changed:
----------------
trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6581
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6585
Modified: svn:mergeinfo
- /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581
+ /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585
Modified: trunk/matplotlib/doc/devel/coding_guide.rst
===================================================================
--- trunk/matplotlib/doc/devel/coding_guide.rst 2008-12-12 13:34:06 UTC (rev 6585)
+++ trunk/matplotlib/doc/devel/coding_guide.rst 2008-12-12 13:38:57 UTC (rev 6586)
@@ -9,6 +9,8 @@
Version control
===============
+.. _using-svn:
+
svn checkouts
-------------
@@ -52,7 +54,7 @@
* Can you pass :file:`examples/tests/backend_driver.py`? This is our
poor man's unit test.
-* Can you add a test to file:`unit/nose_tests.py` to test your changes?
+* Can you add a test to :file:`unit/nose_tests.py` to test your changes?
* If you have altered extension code, do you pass
:file:`unit/memleak_hawaii.py`?
@@ -68,6 +70,170 @@
<http://www.orcaware.com/svn/wiki/Svnmerge.py>`_ to keep them in
sync. See :ref:`svn-merge` below.
+.. _svn-merge:
+
+Using svnmerge
+--------------
+
+svnmerge is useful for making bugfixes to a maintenance branch, and
+then bringing those changes into the trunk.
+
+The basic procedure is:
+
+* install ``svnmerge.py`` in your PATH::
+
+ > wget http://svn.collab.net/repos/svn/trunk/contrib/client-side/\
+ svnmerge/svnmerge.py
+
+* get a svn checkout of the branch you'll be making bugfixes to and
+ the trunk (see above)
+
+* Create and commit the bugfix on the branch.
+
+* Then make sure you svn upped on the trunk and have no local
+ modifications, and then from your checkout of the svn trunk do::
+
+ svnmerge.py merge -S BRANCHNAME
+
+ Where BRANCHNAME is the name of the branch to merge *from*,
+ e.g. v0_98_5_maint.
+
+ If you wish to merge only specific revisions (in an unusual
+ situation), do::
+
+ > svnmerge.py merge -rNNN1-NNN2
+
+ where the ``NNN`` are the revision numbers. Ranges are also
+ acceptable.
+
+ The merge may have found some conflicts (code that must be manually
+ resolved). Correct those conflicts, build matplotlib and test your
+ choices. If you have resolved any conflicts, you can let svn clean
+ up the conflict files for you::
+
+ > svn -R resolved .
+
+ ``svnmerge.py`` automatically creates a file containing the commit
+ messages, so you are ready to make the commit::
+
+ > svn commit -F svnmerge-commit-message.txt
+
+Setting up svnmerge
+~~~~~~~~~~~~~~~~~~~
+
+.. note::
+ The following applies only to release managers when there is
+ a new release. Most developers will not have to concern themselves
+ with this.
+
+* Creating a new branch from the trunk (if the release version is
+ 0.98.5 at revision 6573)::
+
+ > svn copy \
+ https://matplotlib.svn.sf.net/svnroot/matplotlib/trunk/matplotlib@6573 \
+ https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_98_5_maint \
+ -m "Creating maintenance branch for 0.98.5"
+
+* You can add a new branch for the trunk to "track" using
+ "svnmerge.py init", e.g., from a working copy of the trunk::
+
+ > svnmerge.py init https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_98_5_maint
+ property 'svnmerge-integrated' set on '.'
+
+ After doing a "svn commit" on this, this merge tracking is available
+ to everyone, so there's no need for anyone else to do the "svnmerge
+ init".
+
+* Tracking can later be removed with the "svnmerge.py uninit" command,
+ e.g.::
+
+ > svnmerge.py -S v0_9_5_maint uninit
+
+.. _using-git:
+
+Using git
+---------
+
+Some matplotlib developers are experimenting with using git on top of
+the subversion repository. Developers are not required to use git, as
+subversion will remain the canonical central repository for the
+foreseeable future.
+
+Cloning the git mirror
+~~~~~~~~~~~~~~~~~~~~~~
+
+There is an experimental `matplotlib github mirror`_ of the subversion
+repository. To make a local clone of it in the directory ``mpl.git``,
+enter the following commands::
+
+ # This will create your copy in the mpl.git directory
+ git clone git://github.com/astraw/matplotlib.git mpl.git
+ cd mpl.git
+ git config --add remote.origin.fetch +refs/remotes/*:refs/remotes/*
+ git fetch
+ git svn init --trunk=trunk/matplotlib --tags=tags https://matplotlib.svn.sourceforge.net/svnroot/matplotlib
+
+ # Now just get the latest svn revisions from the SourceForge SVN repository
+ git svn fetch -r 6300:HEAD
+
+.. _matplotlib github mirror: http://github.com/astraw/matplotlib
+
+To install from this cloned repository, use the commands in the
+:ref:`svn installation <install-svn>` section::
+
+ > cd mpl.git
+ > python setup.py install
+
+Using git
+~~~~~~~~~
+
+The following is a suggested workflow for git/git-svn.
+
+Start with a virgin tree in sync with the svn trunk on the git branch
+"master"::
+
+ git checkout master
+ git svn rebase
+
+To create a new, local branch called "whizbang-branch"::
+
+ git checkout -b whizbang-branch
+
+Do make commits to the local branch::
+
+ # hack on a bunch of files
+ git add bunch of files
+ git commit -m "modified a bunch of files"
+ # repeat this as necessary
+
+Now, go back to the master branch and append the history of your branch
+to the master branch, which will end up as the svn trunk::
+
+ git checkout master
+ git svn rebase # Ensure we have most recent svn
+ git rebase whizbang-branch # Append whizbang changes to master branch
+ git svn dcommit -n # Check that this will apply to svn
+ git svn dcommit # Actually apply to svn
+
+Finally, you may want to continue working on your whizbang-branch, so
+rebase it to the new master::
+
+ git checkout whizbang-branch
+ git rebase master
+
+A note about git write access
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The matplotlib developers need to figure out if there should be write
+access to the git repository. This implies using the personal URL
+(``gi...@gi...:astraw/matplotlib.git``) rather than the public URL
+(``git://github.com/astraw/matplotlib.git``) for the
+repository. However, doing so may make life complicated in the sense
+that then there are two writeable matplotlib repositories, which must
+be synced to prevent divergence. This is probably not an
+insurmountable problem, but it is a problem that the developers should
+reach a consensus about. Watch this space...
+
.. _style-guide:
Style guide
@@ -352,84 +518,7 @@
> python simple_plot.py -d module://my_backend
-.. _svn-merge:
-Using svn-merge
-================
-
-The basic procedure is:
-
-* install ``svnmerge.py`` in your PATH::
-
- > wget http://svn.collab.net/repos/svn/trunk/contrib/client-side/\
- svnmerge/svnmerge.py
-
-* get a svn copy of the maintenance branch and the trunk (see above)
-
-* Michael advises making the change on the branch and committing it.
- Make sure you svn upped on the trunk and have no local
- modifications, and then from the svn trunk do::
-
- svnmerge.py merge
-
- If you wish to merge only specific revisions (in an unusual
- situation), do::
-
- > svnmerge.py merge -rNNN1-NNN2
-
- where the ``NNN`` are the revision numbers. Ranges are also
- acceptable.
-
- The merge may have found some conflicts (code that must be manually
- resolved). Correct those conflicts, build matplotlib and test your
- choices. If you have resolved any conflicts, you can let svn clean
- up the conflict files for you::
-
- > svn -R resolved .
-
- ``svnmerge.py`` automatically creates a file containing the commit
- messages, so you are ready to make the commit::
-
- > svn commit -F svnmerge-commit-message.txt
-
-
-* You can add a new branch for the trunk to "track" using
- "svnmerge.py init", e.g., from a working copy of the trunk::
-
- > svnmerge.py init https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_98_4_maint
- property 'svnmerge-integrated' set on '.'
-
- After doing a "svn commit" on this, this merge tracking is available
- to everyone, so there's no need for anyone else to do the "svnmerge
- init". I'll go ahead and commit this now.
-
- Now, the trunk is tracking two branches for merges, 0.91.x and
- 0.98.4. This means that when doing a merge, one must manually
- specify which branch to merge from using the "-S" parameter. You
- can see which branches are available for merge using "svnmerge.py
- avail"::
-
- > svnmerge.py avail
- svnmerge: multiple sources found. Explicit source argument (-S/--source) required.
- The merge sources available are:
- /branches/v0_91_maint
- /branches/v0_98_4_maint
-
- So to merge from 0.98.4, one would type::
-
- > svnmerge.py --source v0_98_4_maint merge
-
- (rather than the "svnmerge.py merge" we used to do).
-
-* The tracking for 0.98.4 can be removed with the "svnmerge.py
- uninit" command, e.g.::
-
- > svnmerge.py --source v0_9_4_maint uninit
-
- This will make merging slightly easier, (since the -S parameter is
- not required), and it is generally good practice in the long run to
- not keep extra branches lying around.
-
.. _license-discussion:
Licenses
Modified: trunk/matplotlib/doc/faq/installing_faq.rst
===================================================================
--- trunk/matplotlib/doc/faq/installing_faq.rst 2008-12-12 13:34:06 UTC (rev 6585)
+++ trunk/matplotlib/doc/faq/installing_faq.rst 2008-12-12 13:38:57 UTC (rev 6586)
@@ -95,7 +95,7 @@
.. _install-svn:
Install from svn
-========================
+================
Checking out the main source::
@@ -106,53 +106,13 @@
> cd matplotlib
> python setup.py install
+For more information on Subversion usage, see :ref:`using-svn`.
+
Install from git
================
-There is an experimental `matplotlib github mirror`_ of the subversion
-repository. To make a local clone of it in the directory ``mpl.git``,
-enter the following commands::
+See :ref:`using-git`.
- # This will create your copy in the mpl.git directory
- git clone git://github.com/astraw/matplotlib.git mpl.git
- cd mpl.git
- git config --add remote.origin.fetch +refs/remotes/*:refs/remotes/*
- git fetch
- git svn init --trunk=trunk/matplotlib --tags=tags https://matplotlib.svn.sourceforge.net/svnroot/matplotlib
-
- # Now just get the latest svn revisions from the SourceForge SVN repository
- git svn fetch -r 6300:HEAD
-
-.. _matplotlib github mirror: http://github.com/astraw/matplotlib
-
-To install from this cloned repository, use the commands in the
-:ref:`svn installation <install-svn>` section.
-
-To update your git repository with the latest svn updates from SourceForge::
-
- git svn rebase
-
-To list what changes will be committed to svn::
-
- git svn dcommit -n
-
-To commit your changes to svn::
-
- git svn dcommit
-
-A note about git write access
------------------------------
-
-The matplotlib developers need to figure out if there should be write
-access to the git repository. This implies using the personal URL
-(``gi...@gi...:astraw/matplotlib.git``) rather than the public URL
-(``git://github.com/astraw/matplotlib.git``) for the
-repository. However, doing so may make life complicated in the sense
-that then there are two writeable matplotlib repositories, which must
-be synced to prevent divergence. This is probably not an
-insurmountable problem, but it is a problem that the developers should
-reach a consensus about. Watch this space...
-
Backends
========
Property changes on: trunk/matplotlib/doc/pyplots/README
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_98_5_maint/doc/pyplots/README:6581
+ /branches/v0_98_5_maint/doc/pyplots/README:6581,6585
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-12-12 13:34:11
|
Revision: 6585
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6585&view=rev
Author: mdboom
Date: 2008-12-12 13:34:06 +0000 (Fri, 12 Dec 2008)
Log Message:
-----------
Cleanup svnmerge docs; add Andrew's git docs
Modified Paths:
--------------
branches/v0_98_5_maint/doc/devel/coding_guide.rst
branches/v0_98_5_maint/doc/faq/installing_faq.rst
Modified: branches/v0_98_5_maint/doc/devel/coding_guide.rst
===================================================================
--- branches/v0_98_5_maint/doc/devel/coding_guide.rst 2008-12-12 13:26:48 UTC (rev 6584)
+++ branches/v0_98_5_maint/doc/devel/coding_guide.rst 2008-12-12 13:34:06 UTC (rev 6585)
@@ -9,6 +9,8 @@
Version control
===============
+.. _using-svn:
+
svn checkouts
-------------
@@ -52,7 +54,7 @@
* Can you pass :file:`examples/tests/backend_driver.py`? This is our
poor man's unit test.
-* Can you add a test to file:`unit/nose_tests.py` to test your changes?
+* Can you add a test to :file:`unit/nose_tests.py` to test your changes?
* If you have altered extension code, do you pass
:file:`unit/memleak_hawaii.py`?
@@ -68,6 +70,170 @@
<http://www.orcaware.com/svn/wiki/Svnmerge.py>`_ to keep them in
sync. See :ref:`svn-merge` below.
+.. _svn-merge:
+
+Using svnmerge
+--------------
+
+svnmerge is useful for making bugfixes to a maintenance branch, and
+then bringing those changes into the trunk.
+
+The basic procedure is:
+
+* install ``svnmerge.py`` in your PATH::
+
+ > wget http://svn.collab.net/repos/svn/trunk/contrib/client-side/\
+ svnmerge/svnmerge.py
+
+* get a svn checkout of the branch you'll be making bugfixes to and
+ the trunk (see above)
+
+* Create and commit the bugfix on the branch.
+
+* Then make sure you svn upped on the trunk and have no local
+ modifications, and then from your checkout of the svn trunk do::
+
+ svnmerge.py merge -S BRANCHNAME
+
+ Where BRANCHNAME is the name of the branch to merge *from*,
+ e.g. v0_98_5_maint.
+
+ If you wish to merge only specific revisions (in an unusual
+ situation), do::
+
+ > svnmerge.py merge -rNNN1-NNN2
+
+ where the ``NNN`` are the revision numbers. Ranges are also
+ acceptable.
+
+ The merge may have found some conflicts (code that must be manually
+ resolved). Correct those conflicts, build matplotlib and test your
+ choices. If you have resolved any conflicts, you can let svn clean
+ up the conflict files for you::
+
+ > svn -R resolved .
+
+ ``svnmerge.py`` automatically creates a file containing the commit
+ messages, so you are ready to make the commit::
+
+ > svn commit -F svnmerge-commit-message.txt
+
+Setting up svnmerge
+~~~~~~~~~~~~~~~~~~~
+
+.. note::
+ The following applies only to release managers when there is
+ a new release. Most developers will not have to concern themselves
+ with this.
+
+* Creating a new branch from the trunk (if the release version is
+ 0.98.5 at revision 6573)::
+
+ > svn copy \
+ https://matplotlib.svn.sf.net/svnroot/matplotlib/trunk/matplotlib@6573 \
+ https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_98_5_maint \
+ -m "Creating maintenance branch for 0.98.5"
+
+* You can add a new branch for the trunk to "track" using
+ "svnmerge.py init", e.g., from a working copy of the trunk::
+
+ > svnmerge.py init https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_98_5_maint
+ property 'svnmerge-integrated' set on '.'
+
+ After doing a "svn commit" on this, this merge tracking is available
+ to everyone, so there's no need for anyone else to do the "svnmerge
+ init".
+
+* Tracking can later be removed with the "svnmerge.py uninit" command,
+ e.g.::
+
+ > svnmerge.py -S v0_9_5_maint uninit
+
+.. _using-git:
+
+Using git
+---------
+
+Some matplotlib developers are experimenting with using git on top of
+the subversion repository. Developers are not required to use git, as
+subversion will remain the canonical central repository for the
+foreseeable future.
+
+Cloning the git mirror
+~~~~~~~~~~~~~~~~~~~~~~
+
+There is an experimental `matplotlib github mirror`_ of the subversion
+repository. To make a local clone of it in the directory ``mpl.git``,
+enter the following commands::
+
+ # This will create your copy in the mpl.git directory
+ git clone git://github.com/astraw/matplotlib.git mpl.git
+ cd mpl.git
+ git config --add remote.origin.fetch +refs/remotes/*:refs/remotes/*
+ git fetch
+ git svn init --trunk=trunk/matplotlib --tags=tags https://matplotlib.svn.sourceforge.net/svnroot/matplotlib
+
+ # Now just get the latest svn revisions from the SourceForge SVN repository
+ git svn fetch -r 6300:HEAD
+
+.. _matplotlib github mirror: http://github.com/astraw/matplotlib
+
+To install from this cloned repository, use the commands in the
+:ref:`svn installation <install-svn>` section::
+
+ > cd mpl.git
+ > python setup.py install
+
+Using git
+~~~~~~~~~
+
+The following is a suggested workflow for git/git-svn.
+
+Start with a virgin tree in sync with the svn trunk on the git branch
+"master"::
+
+ git checkout master
+ git svn rebase
+
+To create a new, local branch called "whizbang-branch"::
+
+ git checkout -b whizbang-branch
+
+Do make commits to the local branch::
+
+ # hack on a bunch of files
+ git add bunch of files
+ git commit -m "modified a bunch of files"
+ # repeat this as necessary
+
+Now, go back to the master branch and append the history of your branch
+to the master branch, which will end up as the svn trunk::
+
+ git checkout master
+ git svn rebase # Ensure we have most recent svn
+ git rebase whizbang-branch # Append whizbang changes to master branch
+ git svn dcommit -n # Check that this will apply to svn
+ git svn dcommit # Actually apply to svn
+
+Finally, you may want to continue working on your whizbang-branch, so
+rebase it to the new master::
+
+ git checkout whizbang-branch
+ git rebase master
+
+A note about git write access
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The matplotlib developers need to figure out if there should be write
+access to the git repository. This implies using the personal URL
+(``gi...@gi...:astraw/matplotlib.git``) rather than the public URL
+(``git://github.com/astraw/matplotlib.git``) for the
+repository. However, doing so may make life complicated in the sense
+that then there are two writeable matplotlib repositories, which must
+be synced to prevent divergence. This is probably not an
+insurmountable problem, but it is a problem that the developers should
+reach a consensus about. Watch this space...
+
.. _style-guide:
Style guide
@@ -352,84 +518,7 @@
> python simple_plot.py -d module://my_backend
-.. _svn-merge:
-Using svn-merge
-================
-
-The basic procedure is:
-
-* install ``svnmerge.py`` in your PATH::
-
- > wget http://svn.collab.net/repos/svn/trunk/contrib/client-side/\
- svnmerge/svnmerge.py
-
-* get a svn copy of the maintenance branch and the trunk (see above)
-
-* Michael advises making the change on the branch and committing it.
- Make sure you svn upped on the trunk and have no local
- modifications, and then from the svn trunk do::
-
- svnmerge.py merge
-
- If you wish to merge only specific revisions (in an unusual
- situation), do::
-
- > svnmerge.py merge -rNNN1-NNN2
-
- where the ``NNN`` are the revision numbers. Ranges are also
- acceptable.
-
- The merge may have found some conflicts (code that must be manually
- resolved). Correct those conflicts, build matplotlib and test your
- choices. If you have resolved any conflicts, you can let svn clean
- up the conflict files for you::
-
- > svn -R resolved .
-
- ``svnmerge.py`` automatically creates a file containing the commit
- messages, so you are ready to make the commit::
-
- > svn commit -F svnmerge-commit-message.txt
-
-
-* You can add a new branch for the trunk to "track" using
- "svnmerge.py init", e.g., from a working copy of the trunk::
-
- > svnmerge.py init https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_98_4_maint
- property 'svnmerge-integrated' set on '.'
-
- After doing a "svn commit" on this, this merge tracking is available
- to everyone, so there's no need for anyone else to do the "svnmerge
- init". I'll go ahead and commit this now.
-
- Now, the trunk is tracking two branches for merges, 0.91.x and
- 0.98.4. This means that when doing a merge, one must manually
- specify which branch to merge from using the "-S" parameter. You
- can see which branches are available for merge using "svnmerge.py
- avail"::
-
- > svnmerge.py avail
- svnmerge: multiple sources found. Explicit source argument (-S/--source) required.
- The merge sources available are:
- /branches/v0_91_maint
- /branches/v0_98_4_maint
-
- So to merge from 0.98.4, one would type::
-
- > svnmerge.py --source v0_98_4_maint merge
-
- (rather than the "svnmerge.py merge" we used to do).
-
-* The tracking for 0.98.4 can be removed with the "svnmerge.py
- uninit" command, e.g.::
-
- > svnmerge.py --source v0_9_4_maint uninit
-
- This will make merging slightly easier, (since the -S parameter is
- not required), and it is generally good practice in the long run to
- not keep extra branches lying around.
-
.. _license-discussion:
Licenses
Modified: branches/v0_98_5_maint/doc/faq/installing_faq.rst
===================================================================
--- branches/v0_98_5_maint/doc/faq/installing_faq.rst 2008-12-12 13:26:48 UTC (rev 6584)
+++ branches/v0_98_5_maint/doc/faq/installing_faq.rst 2008-12-12 13:34:06 UTC (rev 6585)
@@ -95,7 +95,7 @@
.. _install-svn:
Install from svn
-========================
+================
Checking out the main source::
@@ -106,53 +106,13 @@
> cd matplotlib
> python setup.py install
+For more information on Subversion usage, see :ref:`using-svn`.
+
Install from git
================
-There is an experimental `matplotlib github mirror`_ of the subversion
-repository. To make a local clone of it in the directory ``mpl.git``,
-enter the following commands::
+See :ref:`using-git`.
- # This will create your copy in the mpl.git directory
- git clone git://github.com/astraw/matplotlib.git mpl.git
- cd mpl.git
- git config --add remote.origin.fetch +refs/remotes/*:refs/remotes/*
- git fetch
- git svn init --trunk=trunk/matplotlib --tags=tags https://matplotlib.svn.sourceforge.net/svnroot/matplotlib
-
- # Now just get the latest svn revisions from the SourceForge SVN repository
- git svn fetch -r 6300:HEAD
-
-.. _matplotlib github mirror: http://github.com/astraw/matplotlib
-
-To install from this cloned repository, use the commands in the
-:ref:`svn installation <install-svn>` section.
-
-To update your git repository with the latest svn updates from SourceForge::
-
- git svn rebase
-
-To list what changes will be committed to svn::
-
- git svn dcommit -n
-
-To commit your changes to svn::
-
- git svn dcommit
-
-A note about git write access
------------------------------
-
-The matplotlib developers need to figure out if there should be write
-access to the git repository. This implies using the personal URL
-(``gi...@gi...:astraw/matplotlib.git``) rather than the public URL
-(``git://github.com/astraw/matplotlib.git``) for the
-repository. However, doing so may make life complicated in the sense
-that then there are two writeable matplotlib repositories, which must
-be synced to prevent divergence. This is probably not an
-insurmountable problem, but it is a problem that the developers should
-reach a consensus about. Watch this space...
-
Backends
========
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ds...@us...> - 2008-12-12 13:26:54
|
Revision: 6584
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6584&view=rev
Author: dsdale
Date: 2008-12-12 13:26:48 +0000 (Fri, 12 Dec 2008)
Log Message:
-----------
removed configobj and enthought.traits
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/examples/misc/rc_traits.py
trunk/matplotlib/setup.cfg.template
trunk/matplotlib/setup.py
trunk/matplotlib/setupext.py
Removed Paths:
-------------
trunk/matplotlib/lib/configobj.py
trunk/matplotlib/lib/enthought/
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-12-12 13:03:04 UTC (rev 6583)
+++ trunk/matplotlib/CHANGELOG 2008-12-12 13:26:48 UTC (rev 6584)
@@ -1,3 +1,14 @@
+2008-12-12 Removed external packages: configobj and enthought.traits
+ which are only required by the experimental traited config
+ and are somewhat out of date. If needed, install them
+ independently, see:
+
+ http://code.enthought.com/projects/traits
+
+ and:
+
+ http://www.voidspace.org.uk/python/configobj.html
+
2008-12-12 Added support to asign labels to histograms of multiple
data. - MM
Modified: trunk/matplotlib/examples/misc/rc_traits.py
===================================================================
--- trunk/matplotlib/examples/misc/rc_traits.py 2008-12-12 13:03:04 UTC (rev 6583)
+++ trunk/matplotlib/examples/misc/rc_traits.py 2008-12-12 13:26:48 UTC (rev 6584)
@@ -1,10 +1,7 @@
# Here is some example code showing how to define some representative
# rc properties and construct a matplotlib artist using traits.
-# Because matplotlib ships with enthought traits already, you can run
-# this script with just matplotlib. Unfortunately, we do not ship the
-# ex UI component so you can't test that part. I'm a bit of a traits
-# newbie so there are probably better ways to do what I have done
-# below.
+# matplotlib does not ship with enthought.traits, so you will need to
+# install it separately.
import sys, os, re
import enthought.traits.api as traits
Deleted: trunk/matplotlib/lib/configobj.py
===================================================================
--- trunk/matplotlib/lib/configobj.py 2008-12-12 13:03:04 UTC (rev 6583)
+++ trunk/matplotlib/lib/configobj.py 2008-12-12 13:26:48 UTC (rev 6584)
@@ -1,2279 +0,0 @@
-# configobj.py
-# A config file reader/writer that supports nested sections in config files.
-# Copyright (C) 2005-2006 Michael Foord, Nicola Larosa
-# E-mail: fuzzyman AT voidspace DOT org DOT uk
-# nico AT tekNico DOT net
-
-# ConfigObj 4
-# http://www.voidspace.org.uk/python/configobj.html
-
-# Released subject to the BSD License
-# Please see http://www.voidspace.org.uk/python/license.shtml
-
-# Scripts maintained at http://www.voidspace.org.uk/python/index.shtml
-# For information about bugfixes, updates and support, please join the
-# ConfigObj mailing list:
-# http://lists.sourceforge.net/lists/listinfo/configobj-develop
-# Comments, suggestions and bug reports welcome.
-
-from __future__ import generators
-
-import sys
-INTP_VER = sys.version_info[:2]
-if INTP_VER < (2, 2):
- raise RuntimeError("Python v.2.2 or later needed")
-
-import os, re
-compiler = None
-try:
- import compiler
-except ImportError:
- # for IronPython
- pass
-from types import StringTypes
-from warnings import warn
-try:
- from codecs import BOM_UTF8, BOM_UTF16, BOM_UTF16_BE, BOM_UTF16_LE
-except ImportError:
- # Python 2.2 does not have these
- # UTF-8
- BOM_UTF8 = '\xef\xbb\xbf'
- # UTF-16, little endian
- BOM_UTF16_LE = '\xff\xfe'
- # UTF-16, big endian
- BOM_UTF16_BE = '\xfe\xff'
- if sys.byteorder == 'little':
- # UTF-16, native endianness
- BOM_UTF16 = BOM_UTF16_LE
- else:
- # UTF-16, native endianness
- BOM_UTF16 = BOM_UTF16_BE
-
-# A dictionary mapping BOM to
-# the encoding to decode with, and what to set the
-# encoding attribute to.
-BOMS = {
- BOM_UTF8: ('utf_8', None),
- BOM_UTF16_BE: ('utf16_be', 'utf_16'),
- BOM_UTF16_LE: ('utf16_le', 'utf_16'),
- BOM_UTF16: ('utf_16', 'utf_16'),
- }
-# All legal variants of the BOM codecs.
-# TODO: the list of aliases is not meant to be exhaustive, is there a
-# better way ?
-BOM_LIST = {
- 'utf_16': 'utf_16',
- 'u16': 'utf_16',
- 'utf16': 'utf_16',
- 'utf-16': 'utf_16',
- 'utf16_be': 'utf16_be',
- 'utf_16_be': 'utf16_be',
- 'utf-16be': 'utf16_be',
- 'utf16_le': 'utf16_le',
- 'utf_16_le': 'utf16_le',
- 'utf-16le': 'utf16_le',
- 'utf_8': 'utf_8',
- 'u8': 'utf_8',
- 'utf': 'utf_8',
- 'utf8': 'utf_8',
- 'utf-8': 'utf_8',
- }
-
-# Map of encodings to the BOM to write.
-BOM_SET = {
- 'utf_8': BOM_UTF8,
- 'utf_16': BOM_UTF16,
- 'utf16_be': BOM_UTF16_BE,
- 'utf16_le': BOM_UTF16_LE,
- None: BOM_UTF8
- }
-
-try:
- from validate import VdtMissingValue
-except ImportError:
- VdtMissingValue = None
-
-try:
- enumerate
-except NameError:
- def enumerate(obj):
- """enumerate for Python 2.2."""
- i = -1
- for item in obj:
- i += 1
- yield i, item
-
-try:
- True, False
-except NameError:
- True, False = 1, 0
-
-
-__version__ = '4.4.0-mpl'
-
-__revision__ = '$Id: configobj.py 156 2006-01-31 14:57:08Z fuzzyman $'
-
-__docformat__ = "restructuredtext en"
-
-__all__ = (
- '__version__',
- 'DEFAULT_INDENT_TYPE',
- 'DEFAULT_INTERPOLATION',
- 'ConfigObjError',
- 'NestingError',
- 'ParseError',
- 'DuplicateError',
- 'ConfigspecError',
- 'ConfigObj',
- 'SimpleVal',
- 'InterpolationError',
- 'InterpolationLoopError',
- 'MissingInterpolationOption',
- 'RepeatSectionError',
- 'UnreprError',
- 'UnknownType',
- '__docformat__',
- 'flatten_errors',
-)
-
-DEFAULT_INTERPOLATION = 'configparser'
-DEFAULT_INDENT_TYPE = ' '
-MAX_INTERPOL_DEPTH = 10
-
-OPTION_DEFAULTS = {
- 'interpolation': True,
- 'raise_errors': False,
- 'list_values': True,
- 'create_empty': False,
- 'file_error': False,
- 'configspec': None,
- 'stringify': True,
- # option may be set to one of ('', ' ', '\t')
- 'indent_type': None,
- 'encoding': None,
- 'default_encoding': None,
- 'unrepr': False,
- 'write_empty_values': False,
-}
-
-
-def getObj(s):
- s = "a=" + s
- if compiler is None:
- raise ImportError('compiler module not available')
- p = compiler.parse(s)
- return p.getChildren()[1].getChildren()[0].getChildren()[1]
-
-class UnknownType(Exception):
- pass
-
-class Builder:
-
- def build(self, o):
- m = getattr(self, 'build_' + o.__class__.__name__, None)
- if m is None:
- raise UnknownType(o.__class__.__name__)
- return m(o)
-
- def build_List(self, o):
- return map(self.build, o.getChildren())
-
- def build_Const(self, o):
- return o.value
-
- def build_Dict(self, o):
- d = {}
- i = iter(map(self.build, o.getChildren()))
- for el in i:
- d[el] = i.next()
- return d
-
- def build_Tuple(self, o):
- return tuple(self.build_List(o))
-
- def build_Name(self, o):
- if o.name == 'None':
- return None
- if o.name == 'True':
- return True
- if o.name == 'False':
- return False
-
- # An undefinted Name
- raise UnknownType('Undefined Name')
-
- def build_Add(self, o):
- real, imag = map(self.build_Const, o.getChildren())
- try:
- real = float(real)
- except TypeError:
- raise UnknownType('Add')
- if not isinstance(imag, complex) or imag.real != 0.0:
- raise UnknownType('Add')
- return real+imag
-
- def build_Getattr(self, o):
- parent = self.build(o.expr)
- return getattr(parent, o.attrname)
-
- def build_UnarySub(self, o):
- return -self.build_Const(o.getChildren()[0])
-
- def build_UnaryAdd(self, o):
- return self.build_Const(o.getChildren()[0])
-
-def unrepr(s):
- if not s:
- return s
- return Builder().build(getObj(s))
-
-def _splitlines(instring):
- """Split a string on lines, without losing line endings or truncating."""
-
-
-class ConfigObjError(SyntaxError):
- """
- This is the base class for all errors that ConfigObj raises.
- It is a subclass of SyntaxError.
- """
- def __init__(self, message='', line_number=None, line=''):
- self.line = line
- self.line_number = line_number
- self.message = message
- SyntaxError.__init__(self, message)
-
-class NestingError(ConfigObjError):
- """
- This error indicates a level of nesting that doesn't match.
- """
-
-class ParseError(ConfigObjError):
- """
- This error indicates that a line is badly written.
- It is neither a valid ``key = value`` line,
- nor a valid section marker line.
- """
-
-class DuplicateError(ConfigObjError):
- """
- The keyword or section specified already exists.
- """
-
-class ConfigspecError(ConfigObjError):
- """
- An error occured whilst parsing a configspec.
- """
-
-class InterpolationError(ConfigObjError):
- """Base class for the two interpolation errors."""
-
-class InterpolationLoopError(InterpolationError):
- """Maximum interpolation depth exceeded in string interpolation."""
-
- def __init__(self, option):
- InterpolationError.__init__(
- self,
- 'interpolation loop detected in value "%s".' % option)
-
-class RepeatSectionError(ConfigObjError):
- """
- This error indicates additional sections in a section with a
- ``__many__`` (repeated) section.
- """
-
-class MissingInterpolationOption(InterpolationError):
- """A value specified for interpolation was missing."""
-
- def __init__(self, option):
- InterpolationError.__init__(
- self,
- 'missing option "%s" in interpolation.' % option)
-
-class UnreprError(ConfigObjError):
- """An error parsing in unrepr mode."""
-
-
-class InterpolationEngine(object):
- """
- A helper class to help perform string interpolation.
-
- This class is an abstract base class; its descendants perform
- the actual work.
- """
-
- # compiled regexp to use in self.interpolate()
- _KEYCRE = re.compile(r"%\(([^)]*)\)s")
-
- def __init__(self, section):
- # the Section instance that "owns" this engine
- self.section = section
-
- def interpolate(self, key, value):
- def recursive_interpolate(key, value, section, backtrail):
- """The function that does the actual work.
-
- ``value``: the string we're trying to interpolate.
- ``section``: the section in which that string was found
- ``backtrail``: a dict to keep track of where we've been,
- to detect and prevent infinite recursion loops
-
- This is similar to a depth-first-search algorithm.
- """
- # Have we been here already?
- if backtrail.has_key((key, section.name)):
- # Yes - infinite loop detected
- raise InterpolationLoopError(key)
- # Place a marker on our backtrail so we won't come back here again
- backtrail[(key, section.name)] = 1
-
- # Now start the actual work
- match = self._KEYCRE.search(value)
- while match:
- # The actual parsing of the match is implementation-dependent,
- # so delegate to our helper function
- k, v, s = self._parse_match(match)
- if k is None:
- # That's the signal that no further interpolation is needed
- replacement = v
- else:
- # Further interpolation may be needed to obtain final value
- replacement = recursive_interpolate(k, v, s, backtrail)
- # Replace the matched string with its final value
- start, end = match.span()
- value = ''.join((value[:start], replacement, value[end:]))
- new_search_start = start + len(replacement)
- # Pick up the next interpolation key, if any, for next time
- # through the while loop
- match = self._KEYCRE.search(value, new_search_start)
-
- # Now safe to come back here again; remove marker from backtrail
- del backtrail[(key, section.name)]
-
- return value
-
- # Back in interpolate(), all we have to do is kick off the recursive
- # function with appropriate starting values
- value = recursive_interpolate(key, value, self.section, {})
- return value
-
- def _fetch(self, key):
- """Helper function to fetch values from owning section.
-
- Returns a 2-tuple: the value, and the section where it was found.
- """
- # switch off interpolation before we try and fetch anything !
- save_interp = self.section.main.interpolation
- self.section.main.interpolation = False
-
- # Start at section that "owns" this InterpolationEngine
- current_section = self.section
- while True:
- # try the current section first
- val = current_section.get(key)
- if val is not None:
- break
- # try "DEFAULT" next
- val = current_section.get('DEFAULT', {}).get(key)
- if val is not None:
- break
- # move up to parent and try again
- # top-level's parent is itself
- if current_section.parent is current_section:
- # reached top level, time to give up
- break
- current_section = current_section.parent
-
- # restore interpolation to previous value before returning
- self.section.main.interpolation = save_interp
- if val is None:
- raise MissingInterpolationOption(key)
- return val, current_section
-
- def _parse_match(self, match):
- """Implementation-dependent helper function.
-
- Will be passed a match object corresponding to the interpolation
- key we just found (e.g., "%(foo)s" or "$foo"). Should look up that
- key in the appropriate config file section (using the ``_fetch()``
- helper function) and return a 3-tuple: (key, value, section)
-
- ``key`` is the name of the key we're looking for
- ``value`` is the value found for that key
- ``section`` is a reference to the section where it was found
-
- ``key`` and ``section`` should be None if no further
- interpolation should be performed on the resulting value
- (e.g., if we interpolated "$$" and returned "$").
- """
- raise NotImplementedError
-
-
-class ConfigParserInterpolation(InterpolationEngine):
- """Behaves like ConfigParser."""
- _KEYCRE = re.compile(r"%\(([^)]*)\)s")
-
- def _parse_match(self, match):
- key = match.group(1)
- value, section = self._fetch(key)
- return key, value, section
-
-
-class TemplateInterpolation(InterpolationEngine):
- """Behaves like string.Template."""
- _delimiter = '$'
- _KEYCRE = re.compile(r"""
- \$(?:
- (?P<escaped>\$) | # Two $ signs
- (?P<named>[_a-z][_a-z0-9]*) | # $name format
- {(?P<braced>[^}]*)} # ${name} format
- )
- """, re.IGNORECASE | re.VERBOSE)
-
- def _parse_match(self, match):
- # Valid name (in or out of braces): fetch value from section
- key = match.group('named') or match.group('braced')
- if key is not None:
- value, section = self._fetch(key)
- return key, value, section
- # Escaped delimiter (e.g., $$): return single delimiter
- if match.group('escaped') is not None:
- # Return None for key and section to indicate it's time to stop
- return None, self._delimiter, None
- # Anything else: ignore completely, just return it unchanged
- return None, match.group(), None
-
-interpolation_engines = {
- 'configparser': ConfigParserInterpolation,
- 'template': TemplateInterpolation,
-}
-
-class Section(dict):
- """
- A dictionary-like object that represents a section in a config file.
-
- It does string interpolation if the 'interpolation' attribute
- of the 'main' object is set to True.
-
- Interpolation is tried first from this object, then from the 'DEFAULT'
- section of this object, next from the parent and its 'DEFAULT' section,
- and so on until the main object is reached.
-
- A Section will behave like an ordered dictionary - following the
- order of the ``scalars`` and ``sections`` attributes.
- You can use this to change the order of members.
-
- Iteration follows the order: scalars, then sections.
- """
-
- def __init__(self, parent, depth, main, indict=None, name=None):
- """
- * parent is the section above
- * depth is the depth level of this section
- * main is the main ConfigObj
- * indict is a dictionary to initialise the section with
- """
- if indict is None:
- indict = {}
- dict.__init__(self)
- # used for nesting level *and* interpolation
- self.parent = parent
- # used for the interpolation attribute
- self.main = main
- # level of nesting depth of this Section
- self.depth = depth
- # the sequence of scalar values in this Section
- self.scalars = []
- # the sequence of sections in this Section
- self.sections = []
- # purely for information
- self.name = name
- # for comments :-)
- self.comments = {}
- self.inline_comments = {}
- # for the configspec
- self.configspec = {}
- self._order = []
- self._configspec_comments = {}
- self._configspec_inline_comments = {}
- self._cs_section_comments = {}
- self._cs_section_inline_comments = {}
- # for defaults
- self.defaults = []
- #
- # we do this explicitly so that __setitem__ is used properly
- # (rather than just passing to ``dict.__init__``)
- for entry in indict:
- self[entry] = indict[entry]
-
- def _interpolate(self, key, value):
- try:
- # do we already have an interpolation engine?
- engine = self._interpolation_engine
- except AttributeError:
- # not yet: first time running _interpolate(), so pick the engine
- name = self.main.interpolation
- if name == True: # note that "if name:" would be incorrect here
- # backwards-compatibility: interpolation=True means use default
- name = DEFAULT_INTERPOLATION
- name = name.lower() # so that "Template", "template", etc. all work
- class_ = interpolation_engines.get(name, None)
- if class_ is None:
- # invalid value for self.main.interpolation
- self.main.interpolation = False
- return value
- else:
- # save reference to engine so we don't have to do this again
- engine = self._interpolation_engine = class_(self)
- # let the engine do the actual work
- return engine.interpolate(key, value)
-
- def __getitem__(self, key):
- """Fetch the item and do string interpolation."""
- val = dict.__getitem__(self, key)
- if self.main.interpolation and isinstance(val, StringTypes):
- return self._interpolate(key, val)
- return val
-
- def __setitem__(self, key, value, unrepr=False):
- """
- Correctly set a value.
-
- Making dictionary values Section instances.
- (We have to special case 'Section' instances - which are also dicts)
-
- Keys must be strings.
- Values need only be strings (or lists of strings) if
- ``main.stringify`` is set.
-
- `unrepr`` must be set when setting a value to a dictionary, without
- creating a new sub-section.
- """
- if not isinstance(key, StringTypes):
- raise ValueError, 'The key "%s" is not a string.' % key
- # add the comment
- if not self.comments.has_key(key):
- self.comments[key] = []
- self.inline_comments[key] = ''
- # remove the entry from defaults
- if key in self.defaults:
- self.defaults.remove(key)
- #
- if isinstance(value, Section):
- if not self.has_key(key):
- self.sections.append(key)
- dict.__setitem__(self, key, value)
- elif isinstance(value, dict) and not unrepr:
- # First create the new depth level,
- # then create the section
- if not self.has_key(key):
- self.sections.append(key)
- new_depth = self.depth + 1
- dict.__setitem__(
- self,
- key,
- Section(
- self,
- new_depth,
- self.main,
- indict=value,
- name=key))
- else:
- if not self.has_key(key):
- self.scalars.append(key)
- if not self.main.stringify:
- if isinstance(value, StringTypes):
- pass
- elif isinstance(value, (list, tuple)):
- for entry in value:
- if not isinstance(entry, StringTypes):
- raise TypeError, (
- 'Value is not a string "%s".' % entry)
- else:
- raise TypeError, 'Value is not a string "%s".' % value
- dict.__setitem__(self, key, value)
-
- def __delitem__(self, key):
- """Remove items from the sequence when deleting."""
- dict. __delitem__(self, key)
- if key in self.scalars:
- self.scalars.remove(key)
- else:
- self.sections.remove(key)
- del self.comments[key]
- del self.inline_comments[key]
-
- def get(self, key, default=None):
- """A version of ``get`` that doesn't bypass string interpolation."""
- try:
- return self[key]
- except KeyError:
- return default
-
- def update(self, indict):
- """
- A version of update that uses our ``__setitem__``.
- """
- for entry in indict:
- self[entry] = indict[entry]
-
- def pop(self, key, *args):
- """ """
- val = dict.pop(self, key, *args)
- if key in self.scalars:
- del self.comments[key]
- del self.inline_comments[key]
- self.scalars.remove(key)
- elif key in self.sections:
- del self.comments[key]
- del self.inline_comments[key]
- self.sections.remove(key)
- if self.main.interpolation and isinstance(val, StringTypes):
- return self._interpolate(key, val)
- return val
-
- def popitem(self):
- """Pops the first (key,val)"""
- sequence = (self.scalars + self.sections)
- if not sequence:
- raise KeyError, ": 'popitem(): dictionary is empty'"
- key = sequence[0]
- val = self[key]
- del self[key]
- return key, val
-
- def clear(self):
- """
- A version of clear that also affects scalars/sections
- Also clears comments and configspec.
-
- Leaves other attributes alone :
- depth/main/parent are not affected
- """
- dict.clear(self)
- self.scalars = []
- self.sections = []
- self.comments = {}
- self.inline_comments = {}
- self.configspec = {}
-
- def setdefault(self, key, default=None):
- """A version of setdefault that sets sequence if appropriate."""
- try:
- return self[key]
- except KeyError:
- self[key] = default
- return self[key]
-
- def items(self):
- """ """
- return zip((self.scalars + self.sections), self.values())
-
- def keys(self):
- """ """
- return (self.scalars + self.sections)
-
- def values(self):
- """ """
- return [self[key] for key in (self.scalars + self.sections)]
-
- def iteritems(self):
- """ """
- return iter(self.items())
-
- def iterkeys(self):
- """ """
- return iter((self.scalars + self.sections))
-
- __iter__ = iterkeys
-
- def itervalues(self):
- """ """
- return iter(self.values())
-
- def __repr__(self):
- return '{%s}' % ', '.join([('%s: %s' % (repr(key), repr(self[key])))
- for key in (self.scalars + self.sections)])
-
- __str__ = __repr__
-
- # Extra methods - not in a normal dictionary
-
- def dict(self):
- """
- Return a deepcopy of self as a dictionary.
-
- All members that are ``Section`` instances are recursively turned to
- ordinary dictionaries - by calling their ``dict`` method.
-
- >>> n = a.dict()
- >>> n == a
- 1
- >>> n is a
- 0
- """
- newdict = {}
- for entry in self:
- this_entry = self[entry]
- if isinstance(this_entry, Section):
- this_entry = this_entry.dict()
- elif isinstance(this_entry, list):
- # create a copy rather than a reference
- this_entry = list(this_entry)
- elif isinstance(this_entry, tuple):
- # create a copy rather than a reference
- this_entry = tuple(this_entry)
- newdict[entry] = this_entry
- return newdict
-
- def merge(self, indict):
- """
- A recursive update - useful for merging config files.
-
- >>> a = '''[section1]
- ... option1 = True
- ... [[subsection]]
- ... more_options = False
- ... # end of file'''.splitlines()
- >>> b = '''# File is user.ini
- ... [section1]
- ... option1 = False
- ... # end of file'''.splitlines()
- >>> c1 = ConfigObj(b)
- >>> c2 = ConfigObj(a)
- >>> c2.merge(c1)
- >>> c2
- {'section1': {'option1': 'False', 'subsection': {'more_options': 'False'}}}
- """
- for key, val in indict.items():
- if (key in self and isinstance(self[key], dict) and
- isinstance(val, dict)):
- self[key].merge(val)
- else:
- self[key] = val
-
- def rename(self, oldkey, newkey):
- """
- Change a keyname to another, without changing position in sequence.
-
- Implemented so that transformations can be made on keys,
- as well as on values. (used by encode and decode)
-
- Also renames comments.
- """
- if oldkey in self.scalars:
- the_list = self.scalars
- elif oldkey in self.sections:
- the_list = self.sections
- else:
- raise KeyError, 'Key "%s" not found.' % oldkey
- pos = the_list.index(oldkey)
- #
- val = self[oldkey]
- dict.__delitem__(self, oldkey)
- dict.__setitem__(self, newkey, val)
- the_list.remove(oldkey)
- the_list.insert(pos, newkey)
- comm = self.comments[oldkey]
- inline_comment = self.inline_comments[oldkey]
- del self.comments[oldkey]
- del self.inline_comments[oldkey]
- self.comments[newkey] = comm
- self.inline_comments[newkey] = inline_comment
-
- def walk(self, function, raise_errors=True,
- call_on_sections=False, **keywargs):
- """
- Walk every member and call a function on the keyword and value.
-
- Return a dictionary of the return values
-
- If the function raises an exception, raise the errror
- unless ``raise_errors=False``, in which case set the return value to
- ``False``.
-
- Any unrecognised keyword arguments you pass to walk, will be pased on
- to the function you pass in.
-
- Note: if ``call_on_sections`` is ``True`` then - on encountering a
- subsection, *first* the function is called for the *whole* subsection,
- and then recurses into it's members. This means your function must be
- able to handle strings, dictionaries and lists. This allows you
- to change the key of subsections as well as for ordinary members. The
- return value when called on the whole subsection has to be discarded.
-
- See the encode and decode methods for examples, including functions.
-
- .. caution::
-
- You can use ``walk`` to transform the names of members of a section
- but you mustn't add or delete members.
-
- >>> config = '''[XXXXsection]
- ... XXXXkey = XXXXvalue'''.splitlines()
- >>> cfg = ConfigObj(config)
- >>> cfg
- {'XXXXsection': {'XXXXkey': 'XXXXvalue'}}
- >>> def transform(section, key):
- ... val = section[key]
- ... newkey = key.replace('XXXX', 'CLIENT1')
- ... section.rename(key, newkey)
- ... if isinstance(val, (tuple, list, dict)):
- ... pass
- ... else:
- ... val = val.replace('XXXX', 'CLIENT1')
- ... section[newkey] = val
- >>> cfg.walk(transform, call_on_sections=True)
- {'CLIENT1section': {'CLIENT1key': None}}
- >>> cfg
- {'CLIENT1section': {'CLIENT1key': 'CLIENT1value'}}
- """
- out = {}
- # scalars first
- for i in range(len(self.scalars)):
- entry = self.scalars[i]
- try:
- val = function(self, entry, **keywargs)
- # bound again in case name has changed
- entry = self.scalars[i]
- out[entry] = val
- except Exception:
- if raise_errors:
- raise
- else:
- entry = self.scalars[i]
- out[entry] = False
- # then sections
- for i in range(len(self.sections)):
- entry = self.sections[i]
- if call_on_sections:
- try:
- function(self, entry, **keywargs)
- except Exception:
- if raise_errors:
- raise
- else:
- entry = self.sections[i]
- out[entry] = False
- # bound again in case name has changed
- entry = self.sections[i]
- # previous result is discarded
- out[entry] = self[entry].walk(
- function,
- raise_errors=raise_errors,
- call_on_sections=call_on_sections,
- **keywargs)
- return out
-
- def decode(self, encoding):
- """
- Decode all strings and values to unicode, using the specified encoding.
-
- Works with subsections and list values.
-
- Uses the ``walk`` method.
-
- Testing ``encode`` and ``decode``.
- >>> m = ConfigObj(a)
- >>> m.decode('ascii')
- >>> def testuni(val):
- ... for entry in val:
- ... if not isinstance(entry, unicode):
- ... print >> sys.stderr, type(entry)
- ... raise AssertionError, 'decode failed.'
- ... if isinstance(val[entry], dict):
- ... testuni(val[entry])
- ... elif not isinstance(val[entry], unicode):
- ... raise AssertionError, 'decode failed.'
- >>> testuni(m)
- >>> m.encode('ascii')
- >>> a == m
- 1
- """
- warn('use of ``decode`` is deprecated.', DeprecationWarning)
- def decode(section, key, encoding=encoding, warn=True):
- """ """
- val = section[key]
- if isinstance(val, (list, tuple)):
- newval = []
- for entry in val:
- newval.append(entry.decode(encoding))
- elif isinstance(val, dict):
- newval = val
- else:
- newval = val.decode(encoding)
- newkey = key.decode(encoding)
- section.rename(key, newkey)
- section[newkey] = newval
- # using ``call_on_sections`` allows us to modify section names
- self.walk(decode, call_on_sections=True)
-
- def encode(self, encoding):
- """
- Encode all strings and values from unicode,
- using the specified encoding.
-
- Works with subsections and list values.
- Uses the ``walk`` method.
- """
- warn('use of ``encode`` is deprecated.', DeprecationWarning)
- def encode(section, key, encoding=encoding):
- """ """
- val = section[key]
- if isinstance(val, (list, tuple)):
- newval = []
- for entry in val:
- newval.append(entry.encode(encoding))
- elif isinstance(val, dict):
- newval = val
- else:
- newval = val.encode(encoding)
- newkey = key.encode(encoding)
- section.rename(key, newkey)
- section[newkey] = newval
- self.walk(encode, call_on_sections=True)
-
- def istrue(self, key):
- """A deprecated version of ``as_bool``."""
- warn('use of ``istrue`` is deprecated. Use ``as_bool`` method '
- 'instead.', DeprecationWarning)
- return self.as_bool(key)
-
- def as_bool(self, key):
- """
- Accepts a key as input. The corresponding value must be a string or
- the objects (``True`` or 1) or (``False`` or 0). We allow 0 and 1 to
- retain compatibility with Python 2.2.
-
- If the string is one of ``True``, ``On``, ``Yes``, or ``1`` it returns
- ``True``.
-
- If the string is one of ``False``, ``Off``, ``No``, or ``0`` it returns
- ``False``.
-
- ``as_bool`` is not case sensitive.
-
- Any other input will raise a ``ValueError``.
-
- >>> a = ConfigObj()
- >>> a['a'] = 'fish'
- >>> a.as_bool('a')
- Traceback (most recent call last):
- ValueError: Value "fish" is neither True nor False
- >>> a['b'] = 'True'
- >>> a.as_bool('b')
- 1
- >>> a['b'] = 'off'
- >>> a.as_bool('b')
- 0
- """
- val = self[key]
- if val == True:
- return True
- elif val == False:
- return False
- else:
- try:
- if not isinstance(val, StringTypes):
- raise KeyError
- else:
- return self.main._bools[val.lower()]
- except KeyError:
- raise ValueError('Value "%s" is neither True nor False' % val)
-
- def as_int(self, key):
- """
- A convenience method which coerces the specified value to an integer.
-
- If the value is an invalid literal for ``int``, a ``ValueError`` will
- be raised.
-
- >>> a = ConfigObj()
- >>> a['a'] = 'fish'
- >>> a.as_int('a')
- Traceback (most recent call last):
- ValueError: invalid literal for int(): fish
- >>> a['b'] = '1'
- >>> a.as_int('b')
- 1
- >>> a['b'] = '3.2'
- >>> a.as_int('b')
- Traceback (most recent call last):
- ValueError: invalid literal for int(): 3.2
- """
- return int(self[key])
-
- def as_float(self, key):
- """
- A convenience method which coerces the specified value to a float.
-
- If the value is an invalid literal for ``float``, a ``ValueError`` will
- be raised.
-
- >>> a = ConfigObj()
- >>> a['a'] = 'fish'
- >>> a.as_float('a')
- Traceback (most recent call last):
- ValueError: invalid literal for float(): fish
- >>> a['b'] = '1'
- >>> a.as_float('b')
- 1.0
- >>> a['b'] = '3.2'
- >>> a.as_float('b')
- 3.2000000000000002
- """
- return float(self[key])
-
-
-class ConfigObj(Section):
- """An object to read, create, and write config files."""
-
- _keyword = re.compile(r'''^ # line start
- (\s*) # indentation
- ( # keyword
- (?:".*?")| # double quotes
- (?:'.*?')| # single quotes
- (?:[^'"=].*?) # no quotes
- )
- \s*=\s* # divider
- (.*) # value (including list values and comments)
- $ # line end
- ''',
- re.VERBOSE)
-
- _sectionmarker = re.compile(r'''^
- (\s*) # 1: indentation
- ((?:\[\s*)+) # 2: section marker open
- ( # 3: section name open
- (?:"\s*\S.*?\s*")| # at least one non-space with double quotes
- (?:'\s*\S.*?\s*')| # at least one non-space with single quotes
- (?:[^'"\s].*?) # at least one non-space unquoted
- ) # section name close
- ((?:\s*\])+) # 4: section marker close
- \s*(\#.*)? # 5: optional comment
- $''',
- re.VERBOSE)
-
- # this regexp pulls list values out as a single string
- # or single values and comments
- # FIXME: this regex adds a '' to the end of comma terminated lists
- # workaround in ``_handle_value``
- _valueexp = re.compile(r'''^
- (?:
- (?:
- (
- (?:
- (?:
- (?:".*?")| # double quotes
- (?:'.*?')| # single quotes
- (?:[^'",\#][^,\#]*?) # unquoted
- )
- \s*,\s* # comma
- )* # match all list items ending in a comma (if any)
- )
- (
- (?:".*?")| # double quotes
- (?:'.*?')| # single quotes
- (?:[^'",\#\s][^,]*?)| # unquoted
- (?:(?<!,)) # Empty value
- )? # last item in a list - or string value
- )|
- (,) # alternatively a single comma - empty list
- )
- \s*(\#.*)? # optional comment
- $''',
- re.VERBOSE)
-
- # use findall to get the members of a list value
- _listvalueexp = re.compile(r'''
- (
- (?:".*?")| # double quotes
- (?:'.*?')| # single quotes
- (?:[^'",\#].*?) # unquoted
- )
- \s*,\s* # comma
- ''',
- re.VERBOSE)
-
- # this regexp is used for the value
- # when lists are switched off
- _nolistvalue = re.compile(r'''^
- (
- (?:".*?")| # double quotes
- (?:'.*?')| # single quotes
- (?:[^'"\#].*?)| # unquoted
- (?:) # Empty value
- )
- \s*(\#.*)? # optional comment
- $''',
- re.VERBOSE)
-
- # regexes for finding triple quoted values on one line
- _single_line_single = re.compile(r"^'''(.*?)'''\s*(#.*)?$")
- _single_line_double = re.compile(r'^"""(.*?)"""\s*(#.*)?$')
- _multi_line_single = re.compile(r"^(.*?)'''\s*(#.*)?$")
- _multi_line_double = re.compile(r'^(.*?)"""\s*(#.*)?$')
-
- _triple_quote = {
- "'''": (_single_line_single, _multi_line_single),
- '"""': (_single_line_double, _multi_line_double),
- }
-
- # Used by the ``istrue`` Section method
- _bools = {
- 'yes': True, 'no': False,
- 'on': True, 'off': False,
- '1': True, '0': False,
- 'true': True, 'false': False,
- }
-
- def __init__(self, infile=None, options=None, **kwargs):
- """
- Parse or create a config file object.
-
- ``ConfigObj(infile=None, options=None, **kwargs)``
- """
- if infile is None:
- infile = []
- if options is None:
- options = {}
- else:
- options = dict(options)
- # keyword arguments take precedence over an options dictionary
- options.update(kwargs)
- # init the superclass
- Section.__init__(self, self, 0, self)
- #
- defaults = OPTION_DEFAULTS.copy()
- for entry in options.keys():
- if entry not in defaults.keys():
- raise TypeError, 'Unrecognised option "%s".' % entry
- # TODO: check the values too.
- #
- # Add any explicit options to the defaults
- defaults.update(options)
- #
- # initialise a few variables
- self.filename = None
- self._errors = []
- self.raise_errors = defaults['raise_errors']
- self.interpolation = defaults['interpolation']
- self.list_values = defaults['list_values']
- self.create_empty = defaults['create_empty']
- self.file_error = defaults['file_error']
- self.stringify = defaults['stringify']
- self.indent_type = defaults['indent_type']
- self.encoding = defaults['encoding']
- self.default_encoding = defaults['default_encoding']
- self.BOM = False
- self.newlines = None
- self.write_empty_values = defaults['write_empty_values']
- self.unrepr = defaults['unrepr']
- #
- self.initial_comment = []
- self.final_comment = []
- #
- self._terminated = False
- #
- if isinstance(infile, StringTypes):
- self.filename = infile
- if os.path.isfile(infile):
- infile = open(infile).read() or []
- elif self.file_error:
- # raise an error if the file doesn't exist
- raise IOError, 'Config file not found: "%s".' % self.filename
- else:
- # file doesn't already exist
- if self.create_empty:
- # this is a good test that the filename specified
- # isn't impossible - like on a non existent device
- h = open(infile, 'w')
- h.write('')
- h.close()
- infile = []
- elif isinstance(infile, (list, tuple)):
- infile = list(infile)
- elif isinstance(infile, dict):
- # initialise self
- # the Section class handles creating subsections
- if isinstance(infile, ConfigObj):
- # get a copy of our ConfigObj
- infile = infile.dict()
- for entry in infile:
- self[entry] = infile[entry]
- del self._errors
- if defaults['configspec'] is not None:
- self._handle_configspec(defaults['configspec'])
- else:
- self.configspec = None
- return
- elif hasattr(infile, 'read'):
- # This supports file like objects
- infile = infile.read() or []
- # needs splitting into lines - but needs doing *after* decoding
- # in case it's not an 8 bit encoding
- else:
- raise TypeError, ('infile must be a filename,'
- ' file like object, or list of lines.')
- #
- if infile:
- # don't do it for the empty ConfigObj
- infile = self._handle_bom(infile)
- # infile is now *always* a list
- #
- # Set the newlines attribute (first line ending it finds)
- # and strip trailing '\n' or '\r' from lines
- for line in infile:
- if (not line) or (line[-1] not in ('\r', '\n', '\r\n')):
- continue
- for end in ('\r\n', '\n', '\r'):
- if line.endswith(end):
- self.newlines = end
- break
- break
- if infile[-1] and infile[-1] in ('\r', '\n', '\r\n'):
- self._terminated = True
- infile = [line.rstrip('\r\n') for line in infile]
- #
- self._parse(infile)
- # if we had any errors, now is the time to raise them
- if self._errors:
- info = "at line %s." % self._errors[0].line_number
- if len(self._errors) > 1:
- msg = ("Parsing failed with several errors.\nFirst error %s" %
- info)
- error = ConfigObjError(msg)
- else:
- error = self._errors[0]
- # set the errors attribute; it's a list of tuples:
- # (error_type, message, line_number)
- error.errors = self._errors
- # set the config attribute
- error.config = self
- raise error
- # delete private attributes
- del self._errors
- #
- if defaults['configspec'] is None:
- self.configspec = None
- else:
- self._handle_configspec(defaults['configspec'])
-
- def __repr__(self):
- return 'ConfigObj({%s})' % ', '.join(
- [('%s: %s' % (repr(key), repr(self[key]))) for key in
- (self.scalars + self.sections)])
-
- def _handle_bom(self, infile):
- """
- Handle any BOM, and decode if necessary.
-
- If an encoding is specified, that *must* be used - but the BOM should
- still be removed (and the BOM attribute set).
-
- (If the encoding is wrongly specified, then a BOM for an alternative
- encoding won't be discovered or removed.)
-
- If an encoding is not specified, UTF8 or UTF16 BOM will be detected and
- removed. The BOM attribute will be set. UTF16 will be decoded to
- unicode.
-
- NOTE: This method must not be called with an empty ``infile``.
-
- Specifying the *wrong* encoding is likely to cause a
- ``UnicodeDecodeError``.
-
- ``infile`` must always be returned as a list of lines, but may be
- passed in as a single string.
- """
- if ((self.encoding is not None) and
- (self.encoding.lower() not in BOM_LIST)):
- # No need to check for a BOM
- # the encoding specified doesn't have one
- # just decode
- return self._decode(infile, self.encoding)
- #
- if isinstance(infile, (list, tuple)):
- line = infile[0]
- else:
- line = infile
- if self.encoding is not None:
- # encoding explicitly supplied
- # And it could have an associated BOM
- # TODO: if encoding is just UTF16 - we ought to check for both
- # TODO: big endian and little endian versions.
- enc = BOM_LIST[self.encoding.lower()]
- if enc == 'utf_16':
- # For UTF16 we try big endian and little endian
- for BOM, (encoding, final_encoding) in BOMS.items():
- if not final_encoding:
- # skip UTF8
- continue
- if infile.startswith(BOM):
- ### BOM discovered
- ##self.BOM = True
- # Don't need to remove BOM
- return self._decode(infile, encoding)
- #
- # If we get this far, will *probably* raise a DecodeError
- # As it doesn't appear to start with a BOM
- return self._decode(infile, self.encoding)
- #
- # Must be UTF8
- BOM = BOM_SET[enc]
- if not line.startswith(BOM):
- return self._decode(infile, self.encoding)
- #
- newline = line[len(BOM):]
- #
- # BOM removed
- if isinstance(infile, (list, tuple)):
- infile[0] = newline
- else:
- infile = newline
- self.BOM = True
- return self._decode(infile, self.encoding)
- #
- # No encoding specified - so we need to check for UTF8/UTF16
- for BOM, (encoding, final_encoding) in BOMS.items():
- if not line.startswith(BOM):
- continue
- else:
- # BOM discovered
- self.encoding = final_encoding
- if not final_encoding:
- self.BOM = True
- # UTF8
- # remove BOM
- newline = line[len(BOM):]
- if isinstance(infile, (list, tuple)):
- infile[0] = newline
- else:
- infile = newline
- # UTF8 - don't decode
- if isinstance(infile, StringTypes):
- return infile.splitlines(True)
- else:
- return infile
- # UTF16 - have to decode
- return self._decode(infile, encoding)
- #
- # No BOM discovered and no encoding specified, just return
- if isinstance(infile, StringTypes):
- # infile read from a file will be a single string
- return infile.splitlines(True)
- else:
- return infile
-
- def _a_to_u(self, aString):
- """Decode ASCII strings to unicode if a self.encoding is specified."""
- if self.encoding:
- return aString.decode('ascii')
- else:
- return aString
-
- def _decode(self, infile, encoding):
- """
- Decode infile to unicode. Using the specified encoding.
-
- if is a string, it also needs converting to a list.
- """
- if isinstance(infile, StringTypes):
- # can't be unicode
- # NOTE: Could raise a ``UnicodeDecodeError``
- return infile.decode(encoding).splitlines(True)
- for i, line in enumerate(infile):
- if not isinstance(line, unicode):
- # NOTE: The isinstance test here handles mixed lists of unicode/string
- # NOTE: But the decode will break on any non-string values
- # NOTE: Or could raise a ``UnicodeDecodeError``
- infile[i] = line.decode(encoding)
- return infile
-
- def _decode_element(self, line):
- """Decode element to unicode if necessary."""
- if not self.encoding:
- return line
- if isinstance(line, str) and self.default_encoding:
- return line.decode(self.default_encoding)
- return line
-
- def _str(self, value):
- """
- Used by ``stringify`` within validate, to turn non-string values
- into strings.
- """
- if not isinstance(value, StringTypes):
- return str(value)
- else:
- return value
-
- def _parse(self, infile):
- """Actually parse the config file."""
- temp_list_values = self.list_values
- if self.unrepr:
- self.list_values = False
- comment_list = []
- done_start = False
- this_section = self
- maxline = len(infile) - 1
- cur_index = -1
- reset_comment = False
- while cur_index < maxline:
- if reset_comment:
- comment_list = []
- cur_index += 1
- line = infile[cur_index]
- sline = line.strip()
- # do we have anything on the line ?
- if not sline or sline.startswith('#'):
- reset_comment = False
- comment_list.append(line)
- continue
- if not done_start:
- # preserve initial comment
- self.initial_comment = comment_list
- comment_list = []
- done_start = True
- reset_comment = True
- # first we check if it's a section marker
- mat = self._sectionmarker.match(line)
- if mat is not None:
- # is a section line
- (indent, sect_open, sect_name, sect_close, comment) = (
- mat.groups())
- if indent and (self.indent_type is None):
- self.indent_type = indent
- cur_depth = sect_open.count('[')
- if cur_depth != sect_close.count(']'):
- self._handle_error(
- "Cannot compute the section depth at line %s.",
- NestingError, infile, cur_index)
- continue
- #
- if cur_depth < this_section.depth:
- # the new section is dropping back to a previous level
- try:
- parent = self._match_depth(
- this_section,
- cur_depth).parent
- except SyntaxError:
- self._handle_error(
- "Cannot compute nesting level at line %s.",
- NestingError, infile, cur_index)
- continue
- elif cur_depth == this_section.depth:
- # the new section is a sibling of the current section
- parent = this_section.parent
- elif cur_depth == this_section.depth + 1:
- # the new section is a child the current section
- parent = this_section
- else:
- self._handle_error(
- "Section too nested at line %s.",
- NestingError, infile, cur_index)
- #
- sect_name = self._unquote(sect_name)
- if parent.has_key(sect_name):
- self._handle_error(
- 'Duplicate section name at line %s.',
- DuplicateError, infile, cur_index)
- continue
- # create the new section
- this_section = Section(
- parent,
- cur_depth,
- self,
- name=sect_name)
- parent[sect_name] = this_section
- parent.inline_comments[sect_name] = comment
- parent.comments[sect_name] = comment_list
- continue
- #
- # it's not a section marker,
- # so it should be a valid ``key = value`` line
- mat = self._keyword.match(line)
- if mat is None:
- # it neither matched as a keyword
- # or a section marker
- self._handle_error(
- 'Invalid line at line "%s".',
- ParseError, infile, cur_index)
- else:
- # is a keyword value
- # value will include any inline comment
- (indent, key, value) = mat.groups()
- if indent and (self.indent_type is None):
- self.indent_type = indent
- # check for a multiline value
- if value[:3] in ['"""', "'''"]:
- try:
- (value, comment, cur_index) = self._multiline(
- value, infile, cur_index, maxline)
- except SyntaxError:
- self._handle_error(
- 'Parse error in value at line %s.',
- ParseError, infile, cur_index)
- continue
- else:
- if self.unrepr:
- comment = ''
- try:
- value = unrepr(value)
- except Exception, e:
- if type(e) == UnknownType:
- msg = 'Unknown name or type in value at line %s.'
- else:
- msg = 'Parse error in value at line %s.'
- self._handle_error(msg, UnreprError, infile,
- cur_index)
- continue
- else:
- if self.unrepr:
- comment = ''
- try:
- value = unrepr(value)
- except Exception, e:
- if isinstance(e, UnknownType):
- msg = 'Unknown name or type in value at line %s.'
- else:
- msg = 'Parse error in value at line %s.'
- self._handle_error(msg, UnreprError, infile,
- cur_index)
- continue
- else:
- # extract comment and lists
- try:
- (value, comment) = self._handle_value(value)
- except SyntaxError:
- self._handle_error(
- 'Parse error in value at line %s.',
- ParseError, infile, cur_index)
- continue
- #
- key = self._unquote(key)
- if this_section.has_key(key):
- self._handle_error(
- 'Duplicate keyword name at line %s.',
- DuplicateError, infile, cur_index)
- continue
- # add the key.
- # we set unrepr because if we have got this far we will never
- # be creating a new section
- this_section.__setitem__(key, value, unrepr=True)
- this_section.inline_comments[key] = comment
- this_section.comments[key] = comment_list
- continue
- #
- if self.indent_type is None:
- # no indentation used, set the type accordingly
- self.indent_type = ''
- #
- if self._terminated:
- comment_list.append('')
- # preserve the final comment
- if not self and not self.initial_comment:
- self.initial_comment = comment_list
- elif not reset_comment:
- self.final_comment = comment_list
- self.list_values = temp_list_values
-
- def _match_depth(self, sect, depth):
- """
- Given a section and a depth level, walk back through the sections
- parents to see if the depth level matches a previous section.
-
- Return a reference to the right section,
- or raise a SyntaxError.
- """
- while depth < sect.depth:
- if sect is sect.parent:
- # we've reached the top level already
- raise SyntaxError
- sect = sect.parent
- if sect.depth == depth:
- return sect
- # shouldn't get here
- raise SyntaxError
-
- def _handle_error(self, text, ErrorClass, infile, cur_index):
- """
- Handle an error according to the error settings.
-
- Either raise the error or store it.
- The e...
[truncated message content] |
|
From: <mme...@us...> - 2008-12-12 13:03:10
|
Revision: 6583
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6583&view=rev
Author: mmetz_bn
Date: 2008-12-12 13:03:04 +0000 (Fri, 12 Dec 2008)
Log Message:
-----------
labels for multiple data histograms
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-12-12 12:58:46 UTC (rev 6582)
+++ trunk/matplotlib/CHANGELOG 2008-12-12 13:03:04 UTC (rev 6583)
@@ -1,3 +1,6 @@
+2008-12-12 Added support to asign labels to histograms of multiple
+ data. - MM
+
=================================================================
2008-12-11 Released 0.98.5 at svn r6573
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-12-12 12:58:46 UTC (rev 6582)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-12-12 13:03:04 UTC (rev 6583)
@@ -29,6 +29,7 @@
iterable = cbook.iterable
is_string_like = cbook.is_string_like
+is_sequence_of_strings = cbook.is_sequence_of_strings
def _process_plot_format(fmt):
@@ -6531,6 +6532,10 @@
ax.hist(12+3*np.random.randn(1000), label='women', alpha=0.5)
ax.legend()
+ label can also be a sequence of strings. If multiple data is
+ provided in *x*, the labels are asigned sequentially to the
+ histograms.
+
**Example:**
.. plot:: mpl_examples/pylab_examples/histogram_demo.py
@@ -6711,11 +6716,18 @@
label = kwargs.pop('label', '')
- for patch in patches:
+ if is_string_like(label):
+ labels = [label] + ['_nolegend_']*(len(patches)-1)
+ elif is_sequence_of_strings:
+ labels = list(label) + ['_nolegend_']*(len(patches)-1)
+ else:
+ raise ValueError, 'invalid label: must be string or sequence of strings'
+
+ for (patch, lbl) in zip(patches, labels):
for p in patch:
p.update(kwargs)
- p.set_label(label)
- label = '_nolegend_'
+ p.set_label(lbl)
+ lbl = '_nolegend_'
if binsgiven:
self.set_autoscale_on(False)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-12-12 12:58:51
|
Revision: 6582
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6582&view=rev
Author: mdboom
Date: 2008-12-12 12:58:46 +0000 (Fri, 12 Dec 2008)
Log Message:
-----------
Merged revisions 6581 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_98_5_maint
........
r6581 | mdboom | 2008-12-12 07:57:47 -0500 (Fri, 12 Dec 2008) | 1 line
Trivial change to test merging
........
Modified Paths:
--------------
trunk/matplotlib/TODO
Property Changed:
----------------
trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6578
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6581
Modified: svn:mergeinfo
- /branches/v0_91_maint:5753-5771
+ /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581
Modified: trunk/matplotlib/TODO
===================================================================
--- trunk/matplotlib/TODO 2008-12-12 12:57:47 UTC (rev 6581)
+++ trunk/matplotlib/TODO 2008-12-12 12:58:46 UTC (rev 6582)
@@ -1,3 +1,5 @@
+-- Test merging from multiple branches.
+
-- ALMOST DONE : add print/save functionality. Currently you can save by right
clicking on the fig window, but you must have nothing in front of
the window. I suppose I need to first draw to a pixbuf. I would
@@ -739,4 +741,4 @@
-- support zoom to rect in x or y only
--- add Ryan's patch
\ No newline at end of file
+-- add Ryan's patch
Property changes on: trunk/matplotlib/doc/pyplots/README
___________________________________________________________________
Modified: svn:mergeinfo
-
+ /branches/v0_98_5_maint/doc/pyplots/README:6581
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-12-12 12:57:52
|
Revision: 6581
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6581&view=rev
Author: mdboom
Date: 2008-12-12 12:57:47 +0000 (Fri, 12 Dec 2008)
Log Message:
-----------
Trivial change to test merging
Modified Paths:
--------------
branches/v0_98_5_maint/TODO
Modified: branches/v0_98_5_maint/TODO
===================================================================
--- branches/v0_98_5_maint/TODO 2008-12-12 12:49:37 UTC (rev 6580)
+++ branches/v0_98_5_maint/TODO 2008-12-12 12:57:47 UTC (rev 6581)
@@ -1,3 +1,5 @@
+-- Test merging from multiple branches.
+
-- ALMOST DONE : add print/save functionality. Currently you can save by right
clicking on the fig window, but you must have nothing in front of
the window. I suppose I need to first draw to a pixbuf. I would
@@ -739,4 +741,4 @@
-- support zoom to rect in x or y only
--- add Ryan's patch
\ No newline at end of file
+-- add Ryan's patch
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-12-12 12:49:44
|
Revision: 6580
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6580&view=rev
Author: mdboom
Date: 2008-12-12 12:49:37 +0000 (Fri, 12 Dec 2008)
Log Message:
-----------
Deleting broken and obsolete 0.98.4 branch
Removed Paths:
-------------
branches/v0_98_4_maint/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-12-12 12:49:04
|
Revision: 6579
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6579&view=rev
Author: mdboom
Date: 2008-12-12 12:49:00 +0000 (Fri, 12 Dec 2008)
Log Message:
-----------
Initialized merge tracking via "svnmerge" with revisions "1-6578" from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_98_5_maint
Property Changed:
----------------
trunk/matplotlib/
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6578
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-12-12 12:48:12
|
Revision: 6578
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6578&view=rev
Author: mdboom
Date: 2008-12-12 12:48:07 +0000 (Fri, 12 Dec 2008)
Log Message:
-----------
Creating maintenance branch for 0.98.5
Added Paths:
-----------
branches/v0_98_5_maint/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2008-12-12 12:45:33
|
Revision: 6577
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6577&view=rev
Author: jswhit
Date: 2008-12-12 12:45:28 +0000 (Fri, 12 Dec 2008)
Log Message:
-----------
remove tabs
Modified Paths:
--------------
trunk/toolkits/basemap/examples/embedding_map_in_wx.py
Modified: trunk/toolkits/basemap/examples/embedding_map_in_wx.py
===================================================================
--- trunk/toolkits/basemap/examples/embedding_map_in_wx.py 2008-12-12 12:22:15 UTC (rev 6576)
+++ trunk/toolkits/basemap/examples/embedding_map_in_wx.py 2008-12-12 12:45:28 UTC (rev 6577)
@@ -13,63 +13,63 @@
class CanvasFrame(Frame):
- def __init__(self):
- Frame.__init__(self,None,-1,
- 'CanvasFrame',size=(550,350))
+ def __init__(self):
+ Frame.__init__(self,None,-1,
+ 'CanvasFrame',size=(550,350))
- self.SetBackgroundColour(NamedColor("WHITE"))
+ self.SetBackgroundColour(NamedColor("WHITE"))
- self.figure = Figure()
-
- self.canvas = FigureCanvas(self, -1, self.figure)
- self.ax = self.figure.add_subplot(111)
+ self.figure = Figure()
+
+ self.canvas = FigureCanvas(self, -1, self.figure)
+ self.ax = self.figure.add_subplot(111)
- self.sizer = BoxSizer(VERTICAL)
- self.sizer.Add(self.canvas, 1, LEFT | TOP | GROW)
- self.SetSizer(self.sizer)
- self.Fit()
+ self.sizer = BoxSizer(VERTICAL)
+ self.sizer.Add(self.canvas, 1, LEFT | TOP | GROW)
+ self.SetSizer(self.sizer)
+ self.Fit()
- self.add_toolbar() # comment this out for no toolbar
-
- self.plot_map()
-
- def add_toolbar(self):
- self.toolbar = NavigationToolbar2Wx(self.canvas)
- self.toolbar.Realize()
- if Platform == '__WXMAC__':
- # Mac platform (OSX 10.3, MacPython) does not seem to cope with
- # having a toolbar in a sizer. This work-around gets the buttons
- # back, but at the expense of having the toolbar at the top
- self.SetToolBar(self.toolbar)
- else:
- # On Windows platform, default window size is incorrect, so set
- # toolbar width to figure width.
- tw, th = self.toolbar.GetSizeTuple()
- fw, fh = self.canvas.GetSizeTuple()
- # By adding toolbar in sizer, we are able to put it at the bottom
- # of the frame - so appearance is closer to GTK version.
- # As noted above, doesn't work for Mac.
- self.toolbar.SetSize(Size(fw, th))
- self.sizer.Add(self.toolbar, 0, LEFT | EXPAND)
- # update the axes menu on the toolbar
- self.toolbar.update()
-
- def plot_map(self):
- map = Basemap(ax=self.ax)
- map.drawcoastlines()
- map.drawcountries()
- map.drawmapboundary()
- map.fillcontinents(color='lime', lake_color='aqua')
- map.drawmapboundary(fill_color='aqua')
- self.figure.canvas.draw()
+ self.add_toolbar() # comment this out for no toolbar
+
+ self.plot_map()
+
+ def add_toolbar(self):
+ self.toolbar = NavigationToolbar2Wx(self.canvas)
+ self.toolbar.Realize()
+ if Platform == '__WXMAC__':
+ # Mac platform (OSX 10.3, MacPython) does not seem to cope with
+ # having a toolbar in a sizer. This work-around gets the buttons
+ # back, but at the expense of having the toolbar at the top
+ self.SetToolBar(self.toolbar)
+ else:
+ # On Windows platform, default window size is incorrect, so set
+ # toolbar width to figure width.
+ tw, th = self.toolbar.GetSizeTuple()
+ fw, fh = self.canvas.GetSizeTuple()
+ # By adding toolbar in sizer, we are able to put it at the bottom
+ # of the frame - so appearance is closer to GTK version.
+ # As noted above, doesn't work for Mac.
+ self.toolbar.SetSize(Size(fw, th))
+ self.sizer.Add(self.toolbar, 0, LEFT | EXPAND)
+ # update the axes menu on the toolbar
+ self.toolbar.update()
+
+ def plot_map(self):
+ map = Basemap(ax=self.ax)
+ map.drawcoastlines()
+ map.drawcountries()
+ map.drawmapboundary()
+ map.fillcontinents(color='coral', lake_color='aqua')
+ map.drawmapboundary(fill_color='aqua')
+ self.figure.canvas.draw()
class App(App):
- def OnInit(self):
- 'Create the main window and insert the custom frame'
- frame = CanvasFrame()
- frame.Show(True)
- return True
+ def OnInit(self):
+ 'Create the main window and insert the custom frame'
+ frame = CanvasFrame()
+ frame.Show(True)
+ return True
app = App(0)
app.MainLoop()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2008-12-12 12:22:20
|
Revision: 6576
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6576&view=rev
Author: jswhit
Date: 2008-12-12 12:22:15 +0000 (Fri, 12 Dec 2008)
Log Message:
-----------
bump version number, have bluemarble pass kwargs to imshow, return
Image instance.
Modified Paths:
--------------
trunk/toolkits/basemap/Changelog
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
trunk/toolkits/basemap/setup.py
Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog 2008-12-12 03:33:51 UTC (rev 6575)
+++ trunk/toolkits/basemap/Changelog 2008-12-12 12:22:15 UTC (rev 6576)
@@ -1,3 +1,5 @@
+version 0.99.3 (not yet released)
+ * bluemarble: pass kwargs to imshow, return Image instance.
version 0.99.2 (svn revision 6541)
* fix drawlsmask method so that it works for cylindrical
projections with limits outside (-180,180).
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008-12-12 03:33:51 UTC (rev 6575)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008-12-12 12:22:15 UTC (rev 6576)
@@ -41,7 +41,7 @@
# basemap data files now installed in lib/matplotlib/toolkits/basemap/data
basemap_datadir = os.sep.join([os.path.dirname(__file__), 'data'])
-__version__ = '0.99.2'
+__version__ = '0.99.3'
# supported map projections.
_projnames = {'cyl' : 'Cylindrical Equidistant',
@@ -3148,7 +3148,7 @@
im = self.imshow(rgba,interpolation='nearest',ax=ax,**kwargs)
return im
- def bluemarble(self,ax=None,scale=None):
+ def bluemarble(self,ax=None,scale=None,**kwargs):
"""
display blue marble image (from http://visibleearth.nasa.gov)
as map background.
@@ -3157,9 +3157,9 @@
to downsample the image (``scale=0.5`` downsamples to 2700x1350).
"""
if ax is not None:
- self.warpimage(image='bluemarble',ax=ax,scale=scale)
+ return self.warpimage(image='bluemarble',ax=ax,scale=scale,**kwargs)
else:
- self.warpimage(image='bluemarble',scale=scale)
+ return self.warpimage(image='bluemarble',scale=scale,**kwargs)
def warpimage(self,image="bluemarble",scale=None,**kwargs):
"""
@@ -3312,10 +3312,10 @@
# make points outside projection limb transparent.
self._bm_rgba_warped = self._bm_rgba_warped.filled(0.)
# plot warped rgba image.
- im = self.imshow(self._bm_rgba_warped,ax=ax)
+ im = self.imshow(self._bm_rgba_warped,ax=ax,**kwargs)
else:
# bmproj True, no interpolation necessary.
- im = self.imshow(self._bm_rgba,ax=ax)
+ im = self.imshow(self._bm_rgba,ax=ax,**kwargs)
return im
def drawmapscale(self,lon,lat,lon0,lat0,length,barstyle='simple',\
Modified: trunk/toolkits/basemap/setup.py
===================================================================
--- trunk/toolkits/basemap/setup.py 2008-12-12 03:33:51 UTC (rev 6575)
+++ trunk/toolkits/basemap/setup.py 2008-12-12 12:22:15 UTC (rev 6576)
@@ -182,7 +182,7 @@
print 'will not install httplib2'
# Specify all the required mpl data
-pyproj_datafiles = ['data/epsg', 'data/esri', 'data/esri.extra', 'data/GL27', 'data/nad.lst', 'data/nad27', 'data/nad83', 'data/ntv2_out.dist', 'data/other.extra', 'data/pj_out27.dist', 'data/pj_out83.dist', 'data/proj_def.dat', 'data/README', 'data/td_out.dist', 'data/test27', 'data/test83', 'data/testntv2', 'data/testvarious', 'data/world','data/bmng.jpg']
+pyproj_datafiles = ['data/epsg', 'data/esri', 'data/esri.extra', 'data/GL27', 'data/nad.lst', 'data/nad27', 'data/nad83', 'data/ntv2_out.dist', 'data/other.extra', 'data/pj_out27.dist', 'data/pj_out83.dist', 'data/proj_def.dat', 'data/README', 'data/td_out.dist', 'data/test27', 'data/test83', 'data/testntv2', 'data/testvarious', 'data/world','data/bmng.jpg','data/bmng_low.jpg']
boundaryfiles = []
for resolution in ['c','l','i','h','f']:
boundaryfiles = boundaryfiles + glob.glob("lib/mpl_toolkits/basemap/data/*_"+resolution+".dat")
@@ -191,7 +191,7 @@
package_data = {'mpl_toolkits.basemap':pyproj_datafiles+basemap_datafiles}
setup(
name = "basemap",
- version = "0.99.2",
+ version = "0.99.3",
description = "Plot data on map projections with matplotlib",
long_description = """
An add-on toolkit for matplotlib that lets you plot data
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cm...@us...> - 2008-12-12 03:33:57
|
Revision: 6575
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6575&view=rev
Author: cmoad
Date: 2008-12-12 03:33:51 +0000 (Fri, 12 Dec 2008)
Log Message:
-----------
tagging new release
Added Paths:
-----------
tags/v0_98_5/
tags/v0_98_5/CHANGELOG
tags/v0_98_5/lib/matplotlib/__init__.py
Removed Paths:
-------------
tags/v0_98_5/CHANGELOG
tags/v0_98_5/lib/matplotlib/__init__.py
Deleted: tags/v0_98_5/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-12-11 20:45:23 UTC (rev 6572)
+++ tags/v0_98_5/CHANGELOG 2008-12-12 03:33:51 UTC (rev 6575)
@@ -1,3979 +0,0 @@
-2008-12-11 Use subprocess.Popen instead of os.popen in dviread
- (Windows problem reported by Jorgen Stenarson) - JKS
-
-2008-12-10 Added Michael's font_manager fix and Jae-Joon's
- figure/subplot fix. Bumped version number to 0.98.5 - JDH
-
-================================================================= 2008-12-09 Released 0.98.4 at svn r6536
-
-2008-12-08 Added mdehoon's native macosx backend from sf patch 2179017 - JDH
-
-2008-12-08 Removed the prints in the set_*style commands. Return the
- list of pprinted strings instead - JDH
-
-2008-12-08 Some of the changes Michael made to improve the output of
- the property tables in the rest docs broke of made
- difficult to use some of the interactive doc helpers, eg
- setp and getp. Having all the rest markup in the ipython
- shell also confused the docstrings. I added a new rc param
- docstring.harcopy, to format the docstrings differently for
- hardcopy and other use. Ther ArtistInspector could use a
- little refactoring now since there is duplication of effort
- between the rest out put and the non-rest output - JDH
-
-2008-12-08 Updated spectral methods (psd, csd, etc.) to scale one-sided
- densities by a factor of 2 and, optionally, scale all densities
- by the sampling frequency. This gives better MatLab
- compatibility. -RM
-
-2008-12-08 Fixed alignment of ticks in colorbars. -MGD
-
-2008-12-07 drop the deprecated "new" keyword of np.histogram() for
- numpy 1.2 or later. -JJL
-
-2008-12-06 Fixed a bug in svg backend that new_figure_manager()
- ignores keywords arguments such as figsize, etc. -JJL
-
-2008-12-05 Fixed a bug that the handlelength of the new legend class
- set too short when numpoints=1 -JJL
-
-2008-12-04 Added support for data with units (e.g. dates) to
- Axes.fill_between. -RM
-
-2008-12-04 Added fancybox keyword to legend. Also applied some changes
- for better look, including baseline adjustment of the
- multiline texts so that it is center aligned. -JJL
-
-2008-12-02 The transmuter classes in the patches.py are reorganized as
- subclasses of the Style classes. A few more box and arrow
- styles are added. -JJL
-
-2008-12-02 Fixed a bug in the new legend class that didn't allowed
- a tuple of coordinate vlaues as loc. -JJL
-
-2008-12-02 Improve checks for external dependencies, using subprocess
- (instead of deprecated popen*) and distutils (for version
- checking) - DSD
-
-2008-11-30 Reimplementaion of the legend which supports baseline alignement,
- multi-column, and expand mode. - JJL
-
-2008-12-01 Fixed histogram autoscaling bug when bins or range are given
- explicitly (fixes Debian bug 503148) - MM
-
-2008-11-25 Added rcParam axes.unicode_minus which allows plain hypen
- for minus when False - JDH
-
-2008-11-25 Added scatterpoints support in Legend. patch by Erik
- Tollerud - JJL
-
-2008-11-24 Fix crash in log ticking. - MGD
-
-2008-11-20 Added static helper method BrokenHBarCollection.span_where
- and Axes/pyplot method fill_between. See
- examples/pylab/fill_between.py - JDH
-
-2008-11-12 Add x_isdata and y_isdata attributes to Artist instances,
- and use them to determine whether either or both
- coordinates are used when updating dataLim. This is
- used to fix autoscaling problems that had been triggered
- by axhline, axhspan, axvline, axvspan. - EF
-
-2008-11-11 Update the psd(), csd(), cohere(), and specgram() methods
- of Axes and the csd() cohere(), and specgram() functions
- in mlab to be in sync with the changes to psd().
- In fact, under the hood, these all call the same core
- to do computations. - RM
-
-2008-11-11 Add 'pad_to' and 'sides' parameters to mlab.psd() to
- allow controlling of zero padding and returning of
- negative frequency components, respecitively. These are
- added in a way that does not change the API. - RM
-
-2008-11-10 Fix handling of c kwarg by scatter; generalize
- is_string_like to accept numpy and numpy.ma string
- array scalars. - RM and EF
-
-2008-11-09 Fix a possible EINTR problem in dviread, which might help
- when saving pdf files from the qt backend. - JKS
-
-2008-11-05 Fix bug with zoom to rectangle and twin axes - MGD
-
-2008-10-24 Added Jae Joon's fancy arrow, box and annotation
- enhancements -- see
- examples/pylab_examples/annotation_demo2.py
-
-2008-10-23 Autoscaling is now supported with shared axes - EF
-
-2008-10-23 Fixed exception in dviread that happened with Minion - JKS
-
-2008-10-21 set_xlim, ylim now return a copy of the viewlim array to
- avoid modify inplace surprises
-
-2008-10-20 Added image thumbnail generating function
- matplotlib.image.thumbnail. See
- examples/misc/image_thumbnail.py - JDH
-
-2008-10-20 Applied scatleg patch based on ideas and work by Erik
- Tollerud and Jae-Joon Lee. - MM
-
-2008-10-11 Fixed bug in pdf backend: if you pass a file object for
- output instead of a filename, e.g. in a wep app, we now
- flush the object at the end. - JKS
-
-2008-10-08 Add path simplification support to paths with gaps. - EF
-
-2008-10-05 Fix problem with AFM files that don't specify the font's
- full name or family name. - JKS
-
-2008-10-04 Added 'scilimits' kwarg to Axes.ticklabel_format() method,
- for easy access to the set_powerlimits method of the
- major ScalarFormatter. - EF
-
-2008-10-04 Experimental new kwarg borderpad to replace pad in legend,
- based on suggestion by Jae-Joon Lee. - EF
-
-2008-09-27 Allow spy to ignore zero values in sparse arrays, based
- on patch by Tony Yu. Also fixed plot to handle empty
- data arrays, and fixed handling of markers in figlegend. - EF
-
-2008-09-24 Introduce drawstyles for lines. Transparently split linestyles
- like 'steps--' into drawstyle 'steps' and linestyle '--'.
- Legends always use drawstyle 'default'. - MM
-
-2008-09-18 Fixed quiver and quiverkey bugs (failure to scale properly
- when resizing) and added additional methods for determining
- the arrow angles - EF
-
-2008-09-18 Fix polar interpolation to handle negative values of theta - MGD
-
-2008-09-14 Reorganized cbook and mlab methods related to numerical
- calculations that have little to do with the goals of those two
- modules into a separate module numerical_methods.py
- Also, added ability to select points and stop point selection
- with keyboard in ginput and manual contour labeling code.
- Finally, fixed contour labeling bug. - DMK
-
-2008-09-11 Fix backtick in Postscript output. - MGD
-
-2008-09-10 [ 2089958 ] Path simplification for vector output backends
- Leverage the simplification code exposed through
- path_to_polygons to simplify certain well-behaved paths in
- the vector backends (PDF, PS and SVG). "path.simplify"
- must be set to True in matplotlibrc for this to work. -
- MGD
-
-2008-09-10 Add "filled" kwarg to Path.intersects_path and
- Path.intersects_bbox. - MGD
-
-2008-09-07 Changed full arrows slightly to avoid an xpdf rendering
- problem reported by Friedrich Hagedorn. - JKS
-
-2008-09-07 Fix conversion of quadratic to cubic Bezier curves in PDF
- and PS backends. Patch by Jae-Joon Lee. - JKS
-
-2008-09-06 Added 5-point star marker to plot command - EF
-
-2008-09-05 Fix hatching in PS backend - MGD
-
-2008-09-03 Fix log with base 2 - MGD
-
-2008-09-01 Added support for bilinear interpolation in
- NonUniformImage; patch by Gregory Lielens. - EF
-
-2008-08-28 Added support for multiple histograms with data of
- different length - MM
-
-2008-08-28 Fix step plots with log scale - MGD
-
-2008-08-28 Fix masked arrays with markers in non-Agg backends - MGD
-
-2008-08-28 Fix clip_on kwarg so it actually works correctly - MGD
-
-2008-08-25 Fix locale problems in SVG backend - MGD
-
-2008-08-22 fix quiver so masked values are not plotted - JSW
-
-2008-08-18 improve interactive pan/zoom in qt4 backend on windows - DSD
-
-2008-08-11 Fix more bugs in NaN/inf handling. In particular, path simplification
- (which does not handle NaNs or infs) will be turned off automatically
- when infs or NaNs are present. Also masked arrays are now converted
- to arrays with NaNs for consistent handling of masks and NaNs
- - MGD and EF
-
-=================================================================
-2008-08-03 Released 0.98.3 at svn r5947
-
-2008-08-01 Backported memory leak fixes in _ttconv.cpp - MGD
-
-2008-07-31 Added masked array support to griddata. - JSW
-
-2008-07-26 Added optional C and reduce_C_function arguments to
- axes.hexbin(). This allows hexbin to accumulate the values
- of C based on the x,y coordinates and display in hexagonal
- bins. - ADS
-
-2008-07-24 Deprecated (raise NotImplementedError) all the mlab2
- functions from matplotlib.mlab out of concern that some of
- them were not clean room implementations. JDH
-
-2008-07-24 Rewrite of a significant portion of the clabel code (class
- ContourLabeler) to improve inlining. - DMK
-
-2008-07-22 Added Barbs polygon collection (similar to Quiver) for plotting
- wind barbs. Added corresponding helpers to Axes and pyplot as
- well. (examples/pylab_examples/barb_demo.py shows it off.) - RMM
-
-2008-07-21 Added scikits.delaunay as matplotlib.delaunay. Added griddata
- function in matplotlib.mlab, with example (griddata_demo.py) in
- pylab_examples. griddata function will use mpl_toolkits._natgrid
- if installed. - JSW
-
-2008-07-21 Re-introduced offset_copy that works in the context of the
- new transforms. - MGD
-
-2008-07-21 Committed patch by Ryan May to add get_offsets and
- set_offsets to Collections base class - EF
-
-2008-07-21 Changed the "asarray" strategy in image.py so that
- colormapping of masked input should work for all
- image types (thanks Klaus Zimmerman) - EF
-
-2008-07-20 Rewrote cbook.delete_masked_points and corresponding
- unit test to support rgb color array inputs, datetime
- inputs, etc. - EF
-
-2008-07-20 Renamed unit/axes_unit.py to cbook_unit.py and modified
- in accord with Ryan's move of delete_masked_points from
- axes to cbook. - EF
-
-2008-07-18 Check for nan and inf in axes.delete_masked_points().
- This should help hexbin and scatter deal with nans. - ADS
-
-2008-07-17 Added ability to manually select contour label locations.
- Also added a waitforbuttonpress function. - DMK
-
-2008-07-17 Fix bug with NaNs at end of path (thanks, Andrew Straw for
- the report) - MGD
-
-2008-07-16 Improve error handling in texmanager, thanks to Ian Henry
- for reporting - DSD
-
-2008-07-12 Added support for external backends with the
- "module://my_backend" syntax - JDH
-
-2008-07-11 Fix memory leak related to shared axes. Grouper should
- store weak references. - MGD
-
-2008-07-10 Bugfix: crash displaying fontconfig pattern - MGD
-
-2008-07-10 Bugfix: [ 2013963 ] update_datalim_bounds in Axes not works - MGD
-
-2008-07-10 Bugfix: [ 2014183 ] multiple imshow() causes gray edges - MGD
-
-2008-07-09 Fix rectangular axes patch on polar plots bug - MGD
-
-2008-07-09 Improve mathtext radical rendering - MGD
-
-2008-07-08 Improve mathtext superscript placement - MGD
-
-2008-07-07 Fix custom scales in pcolormesh (thanks Matthew Turk) - MGD
-
-2008-07-03 Implemented findobj method for artist and pyplot - see
- examples/pylab_examples/findobj_demo.py - JDH
-
-2008-06-30 Another attempt to fix TextWithDash - DSD
-
-2008-06-30 Removed Qt4 NavigationToolbar2.destroy -- it appears to
- have been unnecessary and caused a bug reported by P.
- Raybaut - DSD
-
-2008-06-27 Fixed tick positioning bug - MM
-
-2008-06-27 Fix dashed text bug where text was at the wrong end of the
- dash - MGD
-
-2008-06-26 Fix mathtext bug for expressions like $x_{\leftarrow}$ - MGD
-
-2008-06-26 Fix direction of horizontal/vertical hatches - MGD
-
-2008-06-25 Figure.figurePatch renamed Figure.patch, Axes.axesPatch
- renamed Axes.patch, Axes.axesFrame renamed Axes.frame,
- Axes.get_frame, which returns Axes.patch, is deprecated.
- Examples and users guide updated - JDH
-
-2008-06-25 Fix rendering quality of pcolor - MGD
-
-=================================================================
-2008-06-24 Released 0.98.2 at svn r5667 - (source only for debian) JDH
-
-2008-06-24 Added "transparent" kwarg to savefig. - MGD
-
-2008-06-24 Applied Stefan's patch to draw a single centered marker over
- a line with numpoints==1 - JDH
-
-2008-06-23 Use splines to render circles in scatter plots - MGD
-
-===============================================================
-2008-06-22 Released 0.98.1 at revision 5637
-
-2008-06-22 Removed axes3d support and replaced it with a
- NotImplementedError for one release cycle
-
-2008-06-21 fix marker placement bug in backend_ps - DSD
-
-2008-06-20 [ 1978629 ] scale documentation missing/incorrect for log - MGD
-
-2008-06-20 Added closed kwarg to PolyCollection. Fixes bug [ 1994535
- ] still missing lines on graph with svn (r 5548). - MGD
-
-2008-06-20 Added set/get_closed method to Polygon; fixes error
- in hist - MM
-
-2008-06-19 Use relative font sizes (e.g. 'medium' and 'large') in
- rcsetup.py and matplotlibrc.template so that text will
- be scaled by default when changing rcParams['font.size'] -
- EF
-
-2008-06-17 Add a generic PatchCollection class that can contain any
- kind of patch. - MGD
-
-2008-06-13 Change pie chart label alignment to avoid having labels
- overwrite the pie - MGD
-
-2008-06-12 Added some helper functions to the mathtext parser to
- return bitmap arrays or write pngs to make it easier to use
- mathtext outside the context of an mpl figure. modified
- the mathpng sphinxext to use the mathtext png save
- functionality - see examples/api/mathtext_asarray.py - JDH
-
-2008-06-11 Use matplotlib.mathtext to render math expressions in
- online docs - MGD
-
-2008-06-11 Move PNG loading/saving to its own extension module, and
- remove duplicate code in _backend_agg.cpp and _image.cpp
- that does the same thing - MGD
-
-2008-06-11 Numerous mathtext bugfixes, primarily related to
- dpi-independence - MGD
-
-2008-06-10 Bar now applies the label only to the first patch only, and
- sets '_nolegend_' for the other patch labels. This lets
- autolegend work as expected for hist and bar - see
- https://sourceforge.net/tracker/index.php?func=detail&aid=1986597&group_id=80706&atid=560720
- JDH
-
-2008-06-10 Fix text baseline alignment bug. [ 1985420 ] Repair of
- baseline alignment in Text._get_layout. Thanks Stan West -
- MGD
-
-2008-06-09 Committed Gregor's image resample patch to downsampling
- images with new rcparam image.resample - JDH
-
-2008-06-09 Don't install Enthought.Traits along with matplotlib. For
- matplotlib developers convenience, it can still be
- installed by setting an option in setup.cfg while we figure
- decide if there is a future for the traited config - DSD
-
-2008-06-09 Added range keyword arg to hist() - MM
-
-2008-06-07 Moved list of backends to rcsetup.py; made use of lower
- case for backend names consistent; use validate_backend
- when importing backends subpackage - EF
-
-2008-06-06 hist() revision, applied ideas proposed by Erik Tollerud and
- Olle Engdegard: make histtype='step' unfilled by default
- and introduce histtype='stepfilled'; use default color
- cycle; introduce reverse cumulative histogram; new align
- keyword - MM
-
-2008-06-06 Fix closed polygon patch and also provide the option to
- not close the polygon - MGD
-
-2008-06-05 Fix some dpi-changing-related problems with PolyCollection,
- as called by Axes.scatter() - MGD
-
-2008-06-05 Fix image drawing so there is no extra space to the right
- or bottom - MGD
-
-2006-06-04 Added a figure title command subtitle as a Figure method
- and pyplot command -- see examples/figure_title.py - JDH
-
-2008-06-02 Added support for log to hist with histtype='step' and fixed
- a bug for log-scale stacked histograms - MM
-
-===============================================================
-2008-05-29 Released 0.98.0 at revision 5314
-
-2008-05-29 matplotlib.image.imread now no longer always returns RGBA
- -- if the image is luminance or RGB, it will return a MxN
- or MxNx3 array if possible. Also uint8 is no longer always
- forced to float.
-
-2008-05-29 Implement path clipping in PS backend - JDH
-
-2008-05-29 Fixed two bugs in texmanager.py:
- improved comparison of dvipng versions
- fixed a bug introduced when get_grey method was added
- - DSD
-
-2008-05-28 Fix crashing of PDFs in xpdf and ghostscript when two-byte
- characters are used with Type 3 fonts - MGD
-
-2008-05-28 Allow keyword args to configure widget properties as
- requested in
- http://sourceforge.net/tracker/index.php?func=detail&aid=1866207&group_id=80706&atid=560722
- - JDH
-
-2008-05-28 Replaced '-' with u'\u2212' for minus sign as requested in
- http://sourceforge.net/tracker/index.php?func=detail&aid=1962574&group_id=80706&atid=560720
-
-2008-05-28 zero width/height Rectangles no longer influence the
- autoscaler. Useful for log histograms with empty bins -
- JDH
-
-2008-05-28 Fix rendering of composite glyphs in Type 3 conversion
- (particularly as evidenced in the Eunjin.ttf Korean font)
- Thanks Jae-Joon Lee for finding this!
-
-2008-05-27 Rewrote the cm.ScalarMappable callback infrastructure to
- use cbook.CallbackRegistry rather than custom callback
- handling. Amy users of add_observer/notify of the
- cm.ScalarMappable should uae the
- cm.ScalarMappable.callbacksSM CallbackRegistry instead. JDH
-
-2008-05-27 Fix TkAgg build on Ubuntu 8.04 (and hopefully a more
- general solution for other platforms, too.)
-
-2008-05-24 Added PIL support for loading images to imread (if PIL is
- available) - JDH
-
-2008-05-23 Provided a function and a method for controlling the
- plot color cycle. - EF
-
-2008-05-23 Major revision of hist(). Can handle 2D arrays and create
- stacked histogram plots; keyword 'width' deprecated and
- rwidth (relative width) introduced; align='edge' changed
- to center of bin - MM
-
-2008-05-22 Added support for ReST-based doumentation using Sphinx.
- Documents are located in doc/, and are broken up into
- a users guide and an API reference. To build, run the
- make.py files. Sphinx-0.4 is needed to build generate xml,
- which will be useful for rendering equations with mathml,
- use sphinx from svn until 0.4 is released - DSD
-
-2008-05-21 Fix segfault in TkAgg backend - MGD
-
-2008-05-21 Fix a "local variable unreferenced" bug in plotfile - MM
-
-2008-05-19 Fix crash when Windows can not access the registry to
- determine font path [Bug 1966974, thanks Patrik Simons] - MGD
-
-2008-05-16 removed some unneeded code w/ the python 2.4 requirement.
- cbook no longer provides compatibility for reversed,
- enumerate, set or izip. removed lib/subprocess, mpl1,
- sandbox/units, and the swig code. This stuff should remain
- on the maintenance branch for archival purposes. JDH
-
-2008-05-16 Reorganized examples dir - JDH
-
-2008-05-16 Added 'elinewidth' keyword arg to errorbar, based on patch
- by Christopher Brown - MM
-
-2008-05-16 Added 'cumulative' keyword arg to hist to plot cumulative
- histograms. For normed hists, this is normalized to one - MM
-
-2008-05-15 Fix Tk backend segfault on some machines - MGD
-
-2008-05-14 Don't use stat on Windows (fixes font embedding problem) - MGD
-
-2008-05-09 Fix /singlequote (') in Postscript backend - MGD
-
-2008-05-08 Fix kerning in SVG when embedding character outlines - MGD
-
-2008-05-07 Switched to future numpy histogram semantic in hist - MM
-
-2008-05-06 Fix strange colors when blitting in QtAgg and Qt4Agg - MGD
-
-2008-05-05 pass notify_axes_change to the figure's add_axobserver
- in the qt backends, like we do for the other backends.
- Thanks Glenn Jones for the report - DSD
-
-2008-05-02 Added step histograms, based on patch by Erik Tollerud. - MM
-
-2008-05-02 On PyQt <= 3.14 there is no way to determine the underlying
- Qt version. [1851364] - MGD
-
-2008-05-02 Don't call sys.exit() when pyemf is not found [1924199] -
- MGD
-
-2008-05-02 Update _subprocess.c from upstream Python 2.5.2 to get a
- few memory and reference-counting-related bugfixes. See
- bug 1949978. - MGD
-
-2008-04-30 Added some record array editing widgets for gtk -- see
- examples/rec_edit*.py - JDH
-
-2008-04-29 Fix bug in mlab.sqrtm - MM
-
-2008-04-28 Fix bug in SVG text with Mozilla-based viewers (the symbol
- tag is not supported) - MGD
-
-2008-04-27 Applied patch by Michiel de Hoon to add hexbin
- axes method and pyplot function - EF
-
-2008-04-25 Enforce python >= 2.4; remove subprocess build - EF
-
-2008-04-25 Enforce the numpy requirement at build time - JDH
-
-2008-04-24 Make numpy 1.1 and python 2.3 required when importing
- matplotlib - EF
-
-2008-04-24 Fix compilation issues on VS2003 (Thanks Martin Spacek for
- all the help) - MGD
-
-2008-04-24 Fix sub/superscripts when the size of the font has been
- changed - MGD
-
-2008-04-22 Use "svg.embed_char_paths" consistently everywhere - MGD
-
-2008-04-20 Add support to MaxNLocator for symmetric axis autoscaling. - EF
-
-2008-04-20 Fix double-zoom bug. - MM
-
-2008-04-15 Speed up color mapping. - EF
-
-2008-04-12 Speed up zooming and panning of dense images. - EF
-
-2008-04-11 Fix global font rcParam setting after initialization
- time. - MGD
-
-2008-04-11 Revert commits 5002 and 5031, which were intended to
- avoid an unnecessary call to draw(). 5002 broke saving
- figures before show(). 5031 fixed the problem created in
- 5002, but broke interactive plotting. Unnecessary call to
- draw still needs resolution - DSD
-
-2008-04-07 Improve color validation in rc handling, suggested
- by Lev Givon - EF
-
-2008-04-02 Allow to use both linestyle definition arguments, '-' and
- 'solid' etc. in plots/collections - MM
-
-2008-03-27 Fix saving to Unicode filenames with Agg backend
- (other backends appear to already work...)
- (Thanks, Christopher Barker) - MGD
-
-2008-03-26 Fix SVG backend bug that prevents copying and pasting in
- Inkscape (thanks Kaushik Ghose) - MGD
-
-2008-03-24 Removed an unnecessary call to draw() in the backend_qt*
- mouseReleaseEvent. Thanks to Ted Drain - DSD
-
-2008-03-23 Fix a pdf backend bug which sometimes caused the outermost
- gsave to not be balanced with a grestore. - JKS
-
-2008-03-20 Fixed a minor bug in ContourSet._process_linestyles when
- len(linestyles)==Nlev - MM
-
-2008-03-19 Changed ma import statements to "from numpy import ma";
- this should work with past and future versions of
- numpy, whereas "import numpy.ma as ma" will work only
- with numpy >= 1.05, and "import numerix.npyma as ma"
- is obsolete now that maskedarray is replacing the
- earlier implementation, as of numpy 1.05.
-
-2008-03-14 Removed an apparently unnecessary call to
- FigureCanvasAgg.draw in backend_qt*agg. Thanks to Ted
- Drain - DSD
-
-2008-03-10 Workaround a bug in backend_qt4agg's blitting due to a
- buffer width/bbox width mismatch in _backend_agg's
- copy_from_bbox - DSD
-
-2008-02-29 Fix class Wx toolbar pan and zoom functions (Thanks Jeff
- Peery) - MGD
-
-2008-02-16 Added some new rec array functionality to mlab
- (rec_summarize, rec2txt and rec_groupby). See
- examples/rec_groupby_demo.py. Thanks to Tim M for rec2txt.
-
-2008-02-12 Applied Erik Tollerud's span selector patch - JDH
-
-2008-02-11 Update plotting() doc string to refer to getp/setp. - JKS
-
-2008-02-10 Fixed a problem with square roots in the pdf backend with
- usetex. - JKS
-
-2008-02-08 Fixed minor __str__ bugs so getp(gca()) works. - JKS
-
-2008-02-05 Added getters for title, xlabel, ylabel, as requested
- by Brandon Kieth - EF
-
-2008-02-05 Applied Gael's ginput patch and created
- examples/ginput_demo.py - JDH
-
-2008-02-03 Expose interpnames, a list of valid interpolation
- methods, as an AxesImage class attribute. - EF
-
-2008-02-03 Added BoundaryNorm, with examples in colorbar_only.py
- and image_masked.py. - EF
-
-2008-02-03 Force dpi=72 in pdf backend to fix picture size bug. - JKS
-
-2008-02-01 Fix doubly-included font problem in Postscript backend - MGD
-
-2008-02-01 Fix reference leak in ft2font Glyph objects. - MGD
-
-2008-01-31 Don't use unicode strings with usetex by default - DSD
-
-2008-01-31 Fix text spacing problems in PDF backend with *some* fonts,
- such as STIXGeneral.
-
-2008-01-31 Fix \sqrt with radical number (broken by making [ and ]
- work below) - MGD
-
-2008-01-27 Applied Martin Teichmann's patch to improve the Qt4
- backend. Uses Qt's builtin toolbars and statusbars.
- See bug 1828848 - DSD
-
-2008-01-10 Moved toolkits to mpl_toolkits, made mpl_toolkits
- a namespace package - JSWHIT
-
-2008-01-10 Use setup.cfg to set the default parameters (tkagg,
- numpy) when building windows installers - DSD
-
-2008-01-10 Fix bug displaying [ and ] in mathtext - MGD
-
-2008-01-10 Fix bug when displaying a tick value offset with scientific
- notation. (Manifests itself as a warning that the \times
- symbol can not be found). - MGD
-
-2008-01-10 Use setup.cfg to set the default parameters (tkagg,
- numpy) when building windows installers - DSD
-
-===============================================================
-2008-01-06 Released 0.91.2 at revision 4802
-
-2007-12-26 Reduce too-late use of matplotlib.use() to a warning
- instead of an exception, for backwards compatibility - EF
-
-2007-12-25 Fix bug in errorbar, identified by Noriko Minakawa - EF
-
-2007-12-25 Changed masked array importing to work with the upcoming
- numpy 1.05 (now the maskedarray branch) as well as with
- earlier versions. - EF
-
-2007-12-16 rec2csv saves doubles without losing precision. Also, it
- does not close filehandles passed in open. - JDH,ADS
-
-2007-12-13 Moved rec2gtk to matplotlib.toolkits.gtktools and rec2excel
- to matplotlib.toolkits.exceltools - JDH
-
-2007-12-12 Support alpha-blended text in the Agg and Svg backends -
- MGD
-
-2007-12-10 Fix SVG text rendering bug. - MGD
-
-2007-12-10 Increase accuracy of circle and ellipse drawing by using an
- 8-piece bezier approximation, rather than a 4-piece one.
- Fix PDF, SVG and Cairo backends so they can draw paths
- (meaning ellipses as well). - MGD
-
-2007-12-07 Issue a warning when drawing an image on a non-linear axis. - MGD
-
-2007-12-06 let widgets.Cursor initialize to the lower x and y bounds
- rather than 0,0, which can cause havoc for dates and other
- transforms - DSD
-
-2007-12-06 updated references to mpl data directories for py2exe - DSD
-
-2007-12-06 fixed a bug in rcsetup, see bug 1845057 - DSD
-
-2007-12-05 Fix how fonts are cached to avoid loading the same one multiple times.
- (This was a regression since 0.90 caused by the refactoring of
- font_manager.py) - MGD
-
-2007-12-05 Support arbitrary rotation of usetex text in Agg backend. - MGD
-
-2007-12-04 Support '|' as a character in mathtext - MGD
-
-===============================================================
-2007-11-27 Released 0.91.1 at revision 4517
-
-===============================================================
-2007-11-27 Released 0.91.0 at revision 4478
-
-2007-11-13 All backends now support writing to a file-like object, not
- just a regular file. savefig() can be passed a file-like
- object in place of a file path. - MGD
-
-2007-11-13 Improved the default backend selection at build time:
- SVG -> Agg -> TkAgg -> WXAgg -> GTK -> GTKAgg. The last usable
- backend in this progression will be chosen in the default
- config file. If a backend is defined in setup.cfg, that will
- be the default backend - DSD
-
-2007-11-13 Improved creation of default config files at build time for
- traited config package - DSD
-
-2007-11-12 Exposed all the build options in setup.cfg. These options are
- read into a dict called "options" by setupext.py. Also, added
- "-mpl" tags to the version strings for packages provided by
- matplotlib. Versions provided by mpl will be identified and
- updated on subsequent installs - DSD
-
-2007-11-12 Added support for STIX fonts. A new rcParam,
- mathtext.fontset, can be used to choose between:
-
- 'cm':
- The TeX/LaTeX Computer Modern fonts
-
- 'stix':
- The STIX fonts (see stixfonts.org)
-
- 'stixsans':
- The STIX fonts, using sans-serif glyphs by default
-
- 'custom':
- A generic Unicode font, in which case the mathtext font
- must be specified using mathtext.bf, mathtext.it,
- mathtext.sf etc.
-
- Added a new example, stix_fonts_demo.py to show how to access
- different fonts and unusual symbols.
-
- - MGD
-
-2007-11-12 Options to disable building backend extension modules moved
- from setup.py to setup.cfg - DSD
-
-2007-11-09 Applied Martin Teichmann's patch 1828813: a QPainter is used in
- paintEvent, which has to be destroyed using the method end(). If
- matplotlib raises an exception before the call to end - and it
- does if you feed it with bad data - this method end() is never
- called and Qt4 will start spitting error messages
-
-2007-11-09 Moved pyparsing back into matplotlib namespace. Don't use
- system pyparsing, API is too variable from one release
- to the next - DSD
-
-2007-11-08 Made pylab use straight numpy instead of oldnumeric
- by default - EF
-
-2007-11-08 Added additional record array utilites to mlab (rec2excel,
- rec2gtk, rec_join, rec_append_field, rec_drop_field) - JDH
-
-2007-11-08 Updated pytz to version 2007g - DSD
-
-2007-11-08 Updated pyparsing to version 1.4.8 - DSD
-
-2007-11-08 Moved csv2rec to recutils and added other record array
- utilities - JDH
-
-2007-11-08 If available, use existing pyparsing installation - DSD
-
-2007-11-07 Removed old enthought.traits from lib/matplotlib, added
- Gael Varoquaux's enthought.traits-2.6b1, which is stripped
- of setuptools. The package is installed to site-packages
- if not already available - DSD
-
-2007-11-05 Added easy access to minor tick properties; slight mod
- of patch by Pierre G-M - EF
-
-2007-11-02 Commited Phil Thompson's patch 1599876, fixes to Qt4Agg
- backend and qt4 blitting demo - DSD
-
-2007-11-02 Commited Phil Thompson's patch 1599876, fixes to Qt4Agg
- backend and qt4 blitting demo - DSD
-
-2007-10-31 Made log color scale easier to use with contourf;
- automatic level generation now works. - EF
-
-2007-10-29 TRANSFORMS REFACTORING
-
- The primary goal of this refactoring was to make it easier
- to extend matplotlib to support new kinds of projections.
- This is primarily an internal improvement, and the possible
- user-visible changes it allows are yet to come.
-
- The transformation framework was completely rewritten in
- Python (with Numpy). This will make it easier to add news
- kinds of transformations without writing C/C++ code.
-
- Transforms are composed into a 'transform tree', made of
- transforms whose value depends on other transforms (their
- children). When the contents of children change, their
- parents are automatically updated to reflect those changes.
- To do this an "invalidation" method is used: when children
- change, all of their ancestors are marked as "invalid".
- When the value of a transform is accessed at a later time,
- its value is recomputed only if it is invalid, otherwise a
- cached value may be used. This prevents unnecessary
- recomputations of transforms, and contributes to better
- interactive performance.
-
- The framework can be used for both affine and non-affine
- transformations. However, for speed, we want use the
- backend renderers to perform affine transformations
- whenever possible. Therefore, it is possible to perform
- just the affine or non-affine part of a transformation on a
- set of data. The affine is always assumed to occur after
- the non-affine. For any transform:
-
- full transform == non-affine + affine
-
- Much of the drawing has been refactored in terms of
- compound paths. Therefore, many methods have been removed
- from the backend interface and replaced with a a handful to
- draw compound paths. This will make updating the backends
- easier, since there is less to update. It also should make
- the backends more consistent in terms of functionality.
-
- User visible changes:
-
- - POLAR PLOTS: Polar plots are now interactively zoomable,
- and the r-axis labels can be interactively rotated.
- Straight line segments are now interpolated to follow the
- curve of the r-axis.
-
- - Non-rectangular clipping works in more backends and with
- more types of objects.
-
- - Sharing an axis across figures is now done in exactly
- the same way as sharing an axis between two axes in the
- same figure:
-
- fig1 = figure()
- fig2 = figure()
-
- ax1 = fig1.add_subplot(111)
- ax2 = fig2.add_subplot(111, sharex=ax1, sharey=ax1)
-
- - linestyles now include steps-pre, steps-post and
- steps-mid. The old step still works and is equivalent to
- step-pre.
-
- - Multiple line styles may be provided to a collection.
-
- See API_CHANGES for more low-level information about this
- refactoring.
-
-2007-10-24 Added ax kwarg to Figure.colorbar and pyplot.colorbar - EF
-
-2007-10-19 Removed a gsave/grestore pair surrounding _draw_ps, which
- was causing a loss graphics state info (see "EPS output
- problem - scatter & edgecolors" on mpl-dev, 2007-10-29)
- - DSD
-
-2007-10-15 Fixed a bug in patches.Ellipse that was broken for
- aspect='auto'. Scale free ellipses now work properly for
- equal and auto on Agg and PS, and they fall back on a
- polygonal approximation for nonlinear transformations until
- we convince oursleves that the spline approximation holds
- for nonlinear transformations. Added
- unit/ellipse_compare.py to compare spline with vertex
- approx for both aspects. JDH
-
-2007-10-05 remove generator expressions from texmanager and mpltraits.
- generator expressions are not supported by python-2.3 - DSD
-
-2007-10-01 Made matplotlib.use() raise an exception if called after
- backends has been imported. - EF
-
-2007-09-30 Modified update* methods of Bbox and Interval so they
- work with reversed axes. Prior to this, trying to
- set the ticks on a reversed axis failed with an
- uninformative error message. - EF
-
-2007-09-30 Applied patches to axes3d to fix index error problem - EF
-
-2007-09-24 Applied Eike Welk's patch reported on mpl-dev on 2007-09-22
- Fixes a bug with multiple plot windows in the qt backend,
- ported the changes to backend_qt4 as well - DSD
-
-2007-09-21 Changed cbook.reversed to yield the same result as the
- python reversed builtin - DSD
-
-2007-09-13 The usetex support in the pdf backend is more usable now,
- so I am enabling it. - JKS
-
-2007-09-12 Fixed a Axes.bar unit bug - JDH
-
-2007-09-10 Made skiprows=1 the default on csv2rec - JDH
-
-2007-09-09 Split out the plotting part of pylab and put it in
- pyplot.py; removed numerix from the remaining pylab.py,
- which imports everything from pyplot.py. The intention
- is that apart from cleanups, the result of importing
- from pylab is nearly unchanged, but there is the
- new alternative of importing from pyplot to get
- the state-engine graphics without all the numeric
- functions.
- Numpified examples; deleted two that were obsolete;
- modified some to use pyplot. - EF
-
-2007-09-08 Eliminated gd and paint backends - EF
-
-2007-09-06 .bmp file format is now longer an alias for .raw
-
-2007-09-07 Added clip path support to pdf backend. - JKS
-
-2007-09-06 Fixed a bug in the embedding of Type 1 fonts in PDF.
- Now it doesn't crash Preview.app. - JKS
-
-2007-09-06 Refactored image saving code so that all GUI backends can
- save most image types. See FILETYPES for a matrix of
- backends and their supported file types.
- Backend canvases should no longer write their own print_figure()
- method -- instead they should write a print_xxx method for
- each filetype they can output and add an entry to their
- class-scoped filetypes dictionary. - MGD
-
-2007-09-05 Fixed Qt version reporting in setupext.py - DSD
-
-2007-09-04 Embedding Type 1 fonts in PDF, and thus usetex support
- via dviread, sort of works. To test, enable it by
- renaming _draw_tex to draw_tex. - JKS
-
-2007-09-03 Added ability of errorbar show limits via caret or
- arrowhead ends on the bars; patch by Manual Metz. - EF
-
-2007-09-03 Created type1font.py, added features to AFM and FT2Font
- (see API_CHANGES), started work on embedding Type 1 fonts
- in pdf files. - JKS
-
-2007-09-02 Continued work on dviread.py. - JKS
-
-2007-08-16 Added a set_extent method to AxesImage, allow data extent
- to be modified after initial call to imshow - DSD
-
-2007-08-14 Fixed a bug in pyqt4 subplots-adjust. Thanks to
- Xavier Gnata for the report and suggested fix - DSD
-
-2007-08-13 Use pickle to cache entire fontManager; change to using
- font_manager module-level function findfont wrapper for
- the fontManager.findfont method - EF
-
-2007-08-11 Numpification and cleanup of mlab.py and some examples - EF
-
-2007-08-06 Removed mathtext2
-
-2007-07-31 Refactoring of distutils scripts.
- - Will not fail on the entire build if an optional Python
- package (e.g. Tkinter) is installed but its development
- headers are not (e.g. tk-devel). Instead, it will
- continue to build all other extensions.
- - Provide an overview at the top of the output to display
- what dependencies and their versions were found, and (by
- extension) what will be built.
- - Use pkg-config, when available, to find freetype2, since
- this was broken on Mac OS-X when using MacPorts in a non-
- standard location.
-
-2007-07-30 Reorganized configuration code to work with traited config
- objects. The new config system is located in the
- matplotlib.config package, but it is disabled by default.
- To enable it, set NEWCONFIG=True in matplotlib.__init__.py.
- The new configuration system will still use the old
- matplotlibrc files by default. To switch to the experimental,
- traited configuration, set USE_TRAITED_CONFIG=True in
- config.__init__.py.
-
-2007-07-29 Changed default pcolor shading to flat; added aliases
- to make collection kwargs agree with setter names, so
- updating works; related minor cleanups.
- Removed quiver_classic, scatter_classic, pcolor_classic. - EF
-
-2007-07-26 Major rewrite of mathtext.py, using the TeX box layout model.
-
- There is one (known) backward incompatible change. The
- font commands (\cal, \rm, \it, \tt) now behave as TeX does:
- they are in effect until the next font change command or
- the end of the grouping. Therefore uses of $\cal{R}$
- should be changed to ${\cal R}$. Alternatively, you may
- use the new LaTeX-style font commands (\mathcal, \mathrm,
- \mathit, \mathtt) which do affect the following group,
- eg. $\mathcal{R}$.
-
- Other new features include:
-
- - Math may be interspersed with non-math text. Any text
- with an even number of $'s (non-escaped) will be sent to
- the mathtext parser for layout.
-
- - Sub/superscripts are less likely to accidentally overlap.
-
- - Support for sub/superscripts in either order, eg. $x^i_j$
- and $x_j^i$ are equivalent.
-
- - Double sub/superscripts (eg. $x_i_j$) are considered
- ambiguous and raise an exception. Use braces to disambiguate.
-
- - $\frac{x}{y}$ can be used for displaying fractions.
-
- - $\sqrt[3]{x}$ can be used to display the radical symbol
- with a root number and body.
-
- - $\left(\frac{x}{y}\right)$ may be used to create
- parentheses and other delimiters that automatically
- resize to the height of their contents.
-
- - Spacing around operators etc. is now generally more like
- TeX.
-
- - Added support (and fonts) for boldface (\bf) and
- sans-serif (\sf) symbols.
-
- - Log-like function name shortcuts are supported. For
- example, $\sin(x)$ may be used instead of ${\rm sin}(x)$
-
- - Limited use of kerning for the easy case (same font)
-
- Behind the scenes, the pyparsing.py module used for doing
- the math parsing was updated to the latest stable version
- (1.4.6). A lot of duplicate code was refactored out of the
- Font classes.
-
- - MGD
-
-2007-07-19 completed numpification of most trivial cases - NN
-
-2007-07-19 converted non-numpy relicts throughout the code - NN
-
-2007-07-19 replaced the Python code in numerix/ by a minimal wrapper around
- numpy that explicitly mentions all symbols that need to be
- addressed for further numpification - NN
-
-2007-07-18 make usetex respect changes to rcParams. texmanager used to
- only configure itself when it was created, now it
- reconfigures when rcParams are changed. Thank you Alexander
- Schmolck for contributing a patch - DSD
-
-2007-07-17 added validation to setting and changing rcParams - DSD
-
-2007-07-17 bugfix segfault in transforms module. Thanks Ben North for
- the patch. - ADS
-
-2007-07-16 clean up some code in ticker.ScalarFormatter, use unicode to
- render multiplication sign in offset ticklabel - DSD
-
-2007-07-16 fixed a formatting bug in ticker.ScalarFormatter's scientific
- notation (10^0 was being rendered as 10 in some cases) - DSD
-
-2007-07-13 Add MPL_isfinite64() and MPL_isinf64() for testing
- doubles in (the now misnamed) MPL_isnan.h. - ADS
-
-2007-07-13 The matplotlib._isnan module removed (use numpy.isnan) - ADS
-
-2007-07-13 Some minor cleanups in _transforms.cpp - ADS
-
-2007-07-13 Removed the rest of the numerix extension code detritus,
- numpified axes.py, and cleaned up the imports in axes.py
- - JDH
-
-2007-07-13 Added legend.loc as configurable option that could in
- future default to 'best'. - NN
-
-2007-07-12 Bugfixes in mlab.py to coerce inputs into numpy arrays. -ADS
-
-2007-07-11 Added linespacing kwarg to text.Text - EF
-
-2007-07-11 Added code to store font paths in SVG files. - MGD
-
-2007-07-10 Store subset of TTF font as a Type 3 font in PDF files. - MGD
-
-2007-07-09 Store subset of TTF font as a Type 3 font in PS files. - MGD
-
-2007-07-09 Applied Paul's pick restructure pick and add pickers,
- sourceforge patch 1749829 - JDH
-
-
-2007-07-09 Applied Allan's draw_lines agg optimization. JDH
-
-
-2007-07-08 Applied Carl Worth's patch to fix cairo draw_arc - SC
-
-2007-07-07 fixed bug 1712099: xpdf distiller on windows - DSD
-
-2007-06-30 Applied patches to tkagg, gtk, and wx backends to reduce
- memory leakage. Patches supplied by Mike Droettboom;
- see tracker numbers 1745400, 1745406, 1745408.
- Also made unit/memleak_gui.py more flexible with
- command-line options. - EF
-
-2007-06-30 Split defaultParams into separate file rcdefaults (together with
- validation code). Some heavy refactoring was necessary to do so,
- but the overall behavior should be the same as before. - NN
-
-2007-06-27 Added MPLCONFIGDIR for the default location for mpl data
- and configuration. useful for some apache installs where
- HOME is not writable. Tried to clean up the logic in
- _get_config_dir to support non-writable HOME where are
- writable HOME/.matplotlib already exists - JDH
-
-2007-06-27 Fixed locale bug reported at
- http://sourceforge.net/tracker/index.php?func=detail&aid=1744154&group_id=80706&atid=560720
- by adding a cbook.unicode_safe function - JDH
-
-2007-06-27 Applied Micheal's tk savefig bugfix described at
- http://sourceforge.net/tracker/index.php?func=detail&aid=1716732&group_id=80706&atid=560720
- Thanks Michael!
-
-
-2007-06-27 Patch for get_py2exe_datafiles() to work with new directory
- layout. (Thanks Tocer and also Werner Bruhin.) -ADS
-
-
-2007-06-27 Added a scroll event to the mpl event handling system and
- implemented it for backends GTK* -- other backend
- users/developers/maintainers, please add support for your
- backend. - JDH
-
-2007-06-25 Changed default to clip=False in colors.Normalize;
- modified ColorbarBase for easier colormap display - EF
-
-2007-06-13 Added maskedarray option to rc, numerix - EF
-
-2007-06-11 Python 2.5 compatibility fix for mlab.py - EF
-
-2007-06-10 In matplotlibrc file, use 'dashed' | 'solid' instead
- of a pair of floats for contour.negative_linestyle - EF
-
-2007-06-08 Allow plot and fill fmt string to be any mpl string
- colorspec - EF
-
-2007-06-08 Added gnuplot file plotfile function to pylab -- see
- examples/plotfile_demo.py - JDH
-
-2007-06-07 Disable build of numarray and Numeric extensions for
- internal MPL use and the numerix layer. - ADS
-
-2007-06-07 Added csv2rec to matplotlib.mlab to support automatically
- converting csv files to record arrays using type
- introspection, and turned on native datetime support using
- the new units support in matplotlib.dates. See
- examples/loadrec.py ! JDH
-
-2007-06-07 Simplified internal code of _auto_legend_data - NN
-
-2007-06-04 Added labeldistance arg to Axes.pie to control the raidal
- distance of the wedge labels - JDH
-
-2007-06-03 Turned mathtext in SVG into single <text> with multiple <tspan>
- objects (easier to edit in inkscape). - NN
-
-===============================================================
-2007-06-02 Released 0.90.1 at revision 3352
-
-2007-06-02 Display only meaningful labels when calling legend()
- without args. - NN
-
-2007-06-02 Have errorbar follow the color cycle even if line is not plotted.
- Suppress plotting of errorbar caps for capsize=0. - NN
-
-2007-06-02 Set markers to same alpha value as line. - NN
-
-2007-06-02 Fix mathtext position in svg backend. - NN
-
-2007-06-01 Deprecate Numeric and numarray for use as numerix. Props to
- Travis -- job well done. - ADS
-
-2007-05-18 Added LaTeX unicode support. Enable with the
- 'text.latex.unicode' rcParam. This requires the ucs and
- inputenc LaTeX packages. - ADS
-
-2007-04-23 Fixed some problems with polar -- added general polygon
- clipping to clip the lines a nd grids to the polar axes.
- Added support for set_rmax to easily change the maximum
- radial grid. Added support for polar legend - JDH
-
-2007-04-16 Added Figure.autofmt_xdate to handle adjusting the bottom
- and rotating the tick labels for date plots when the ticks
- often overlap - JDH
-
-2007-04-09 Beginnings of usetex support for pdf backend. -JKS
-
-2007-04-07 Fixed legend/LineCollection bug. Added label support
- to collections. - EF
-
-2007-04-06 Removed deprecated support for a float value as a gray-scale;
- now it must be a string, like '0.5'. Added alpha kwarg to
- ColorConverter.to_rgba_list. - EF
-
-2007-04-06 Fixed rotation of ellipses in pdf backend
- (sf bug #1690559) -JKS
-
-2007-04-04 More matshow tweaks; documentation updates; new method
- set_bounds() for formatters and locators. - EF
-
-2007-04-02 Fixed problem with imshow and matshow of integer arrays;
- fixed problems with changes to color autoscaling. - EF
-
-2007-04-01 Made image color autoscaling work correctly with
- a tracking colorbar; norm.autoscale now scales
- unconditionally, while norm.autoscale_None changes
- only None-valued vmin, vmax. - EF
-
-2007-03-31 Added a qt-based subplot-adjustment dialog - DSD
-
-2007-03-30 Fixed a bug in backend_qt4, reported on mpl-dev - DSD
-
-2007-03-26 Removed colorbar_classic from figure.py; fixed bug in
- Figure.clf() in which _axobservers was not getting
- cleared. Modernization and cleanups. - EF
-
-2007-03-26 Refactored some of the units support -- units now live in
- the respective x and y Axis instances. See also
- API_CHANGES for some alterations to the conversion
- interface. JDH
-
-2007-03-25 Fix masked array handling in quiver.py for numpy. (Numeric
- and numarray support for masked arrays is broken in other
- ways when using quiver. I didn't pursue that.) - ADS
-
-2007-03-23 Made font_manager.py close opened files. - JKS
-
-2007-03-22 Made imshow default extent match matshow - EF
-
-2007-03-22 Some more niceties for xcorr -- a maxlags option, normed
- now works for xcorr as well as axorr, usevlines is
- supported, and a zero correlation hline is added. See
- examples/xcorr_demo.py. Thanks Sameer for the patch. -
- JDH
-
-2007-03-21 Axes.vlines and Axes.hlines now create and returns a
- LineCollection, not a list of lines. This is much faster.
- The kwarg signature has changed, so consult the docs.
- Modified Axes.errorbar which uses vlines and hlines. See
- API_CHANGES; the return signature for these three functions
- is now different
-
-2007-03-20 Refactored units support and added new examples - JDH
-
-2007-03-19 Added Mike's units patch - JDH
-
-2007-03-18 Matshow as an Axes method; test version matshow1() in
- pylab; added 'integer' Boolean kwarg to MaxNLocator
- initializer to force ticks at integer locations. - EF
-
-2007-03-17 Preliminary support for clipping to paths agg - JDH
-
-2007-03-17 Text.set_text() accepts anything convertible with '%s' - EF
-
-2007-03-14 Add masked-array support to hist. - EF
-
-2007-03-03 Change barh to take a kwargs dict and pass it to bar.
- Fixes sf bug #1669506.
-
-2007-03-02 Add rc parameter pdf.inheritcolor, which disables all
- color-setting operations in the pdf backend. The idea is
- that you include the resulting file in another program and
- set the colors (both stroke and fill color) there, so you
- can use the same pdf file for e.g. a paper and a
- presentation and have them in the surrounding color. You
- will probably not want to draw figure and axis frames in
- that case, since they would be filled in the same color. - JKS
-
-2007-02-26 Prevent building _wxagg.so with broken Mac OS X wxPython. - ADS
-
-2007-02-23 Require setuptools for Python 2.3 - ADS
-
-2007-02-22 WXAgg accelerator updates - KM
- WXAgg's C++ accelerator has been fixed to use the correct wxBitmap
- constructor.
-
- The backend has been updated to use new wxPython functionality to
- provide fast blit() animation without the C++ accelerator. This
- requires wxPython 2.8 or later. Previous versions of wxPython can
- use the C++ acclerator or the old pure Python routines.
-
- setup.py no longer builds the C++ accelerator when wxPython >= 2.8
- is present.
-
- The blit() method is now faster regardless of which agg/wxPython
- conversion routines are used.
-
-2007-02-21 Applied the PDF backend patch by Nicolas Grilly.
- This impacts several files and directories in matplotlib:
-
- - Created the directory lib/matplotlib/mpl-data/fonts/pdfcorefonts,
- holding AFM files for the 14 PDF core fonts. These fonts are
- embedded in every PDF viewing application.
-
- - setup.py: Added the directory pdfcorefonts to package_data.
-
- - lib/matplotlib/__init__.py: Added the default parameter
- 'pdf.use14corefonts'. When True, the PDF backend uses
- only the 14 PDF core fonts.
-
- - lib/matplotlib/afm.py: Added some keywords found in
- recent AFM files. Added a little workaround to handle
- Euro symbol.
-
- - lib/matplotlib/fontmanager.py: Added support for the 14
- PDF core fonts. These fonts have a dedicated cache (file
- pdfcorefont.cache), not the same as for other AFM files
- (file .afmfont.cache). Also cleaned comments to conform
- to CODING_GUIDE.
-
- - lib/matplotlib/backends/backend_pdf.py:
- Added support for 14 PDF core fonts.
- Fixed some issues with incorrect character widths and
- encodings (works only for the most common encoding,
- WinAnsiEncoding, defined by the official PDF Reference).
- Removed parameter 'dpi' because it causes alignment issues.
-
- -JKS (patch by Nicolas Grilly)
-
-2007-02-17 Changed ft2font.get_charmap, and updated all the files where
- get_charmap is mentioned - ES
-
-2007-02-13 Added barcode demo- JDH
-
-2007-02-13 Added binary colormap to cm - JDH
-
-2007-02-13 Added twiny to pylab - JDH
-
-2007-02-12 Moved data files into lib/matplotlib so that setuptools'
- develop mode works. Re-organized the mpl-data layout so
- that this source structure is maintained in the
- installation. (I.e. the 'fonts' and 'images'
- sub-directories are maintained in site-packages.) Suggest
- removing site-packages/matplotlib/mpl-data and
- ~/.matplotlib/ttffont.cache before installing - ADS
-
-2007-02-07 Committed Rob Hetland's patch for qt4: remove
- references to text()/latin1(), plus some improvements
- to the toolbar layout - DSD
-
-===============================================================
-2007-02-06 Released 0.90.0 at revision 3003
-
-2007-01-22 Extended the new picker API to text, patches and patch
- collections. Added support for user customizable pick hit
- testing and attribute tagging of the PickEvent - Details
- and examples in examples/pick_event_demo.py - JDH
-
-2007-01-16 Begun work on a new pick API using the mpl event handling
- frameowrk. Artists will define their own pick method with
- a configurable epsilon tolerance and return pick attrs.
- All artists that meet the tolerance threshold will fire a
- PickEvent with artist dependent attrs; eg, a Line2D can set
- the indices attribute that shows the indices into the line
- that are within epsilon of the pick point. See
- examples/pick_event_demo.py. The implementation of pick
- for the remaining Artists remains to be done, but the core
- infrastructure at the level of event handling is in place
- with a proof-of-concept implementation for Line2D - JDH
-
-2007-01-16 src/_image.cpp: update to use Py_ssize_t (for 64-bit systems).
- Use return value of fread() to prevent warning messages - SC.
-
-2007-01-15 src/_image.cpp: combine buffer_argb32() and buffer_bgra32() into
- a new method color_conv(format) - SC
-
-2007-01-14 backend_cairo.py: update draw_arc() so that
- examples/arctest.py looks correct - SC
-
-2007-01-12 backend_cairo.py: enable clipping. Update draw_image() so that
- examples/contour_demo.py looks correct - SC
-
-2007-01-12 backend_cairo.py: fix draw_image() so that examples/image_demo.py
- now looks correct - SC
-
-2007-01-11 Added Axes.xcorr and Axes.acorr to plot the cross
- correlation of x vs y or the autocorrelation of x. pylab
- wrappers also provided. See examples/xcorr_demo.py - JDH
-
-2007-01-10 Added "Subplot.label_outer" method. It will set the
- visibility of the ticklabels so that yticklabels are only
- visible in the first column and xticklabels are only
- visible in the last row - JDH
-
-2007-01-02 Added additional kwarg documentation - JDH
-
-2006-12-28 Improved error message for nonpositive input to log
- transform; added log kwarg to bar, barh, and hist,
- and modified bar method to behave sensibly by default
- when the ordinate has a log scale. (This only works
- if the log scale is set befo...
[truncated message content] |
|
From: <cm...@us...> - 2008-12-12 03:33:33
|
Revision: 6574
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6574&view=rev
Author: cmoad
Date: 2008-12-12 03:33:28 +0000 (Fri, 12 Dec 2008)
Log Message:
-----------
fixed release date for 0.98.5
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-12-12 03:04:53 UTC (rev 6573)
+++ trunk/matplotlib/CHANGELOG 2008-12-12 03:33:28 UTC (rev 6574)
@@ -1,5 +1,5 @@
=================================================================
-2008-12-09 Released 0.98.5 at svn r6573
+2008-12-11 Released 0.98.5 at svn r6573
2008-12-11 Use subprocess.Popen instead of os.popen in dviread
(Windows problem reported by Jorgen Stenarson) - JKS
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cm...@us...> - 2008-12-12 03:05:03
|
Revision: 6573
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6573&view=rev
Author: cmoad
Date: 2008-12-12 03:04:53 +0000 (Fri, 12 Dec 2008)
Log Message:
-----------
minor rev bump to 0.98.5
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/__init__.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-12-11 20:45:23 UTC (rev 6572)
+++ trunk/matplotlib/CHANGELOG 2008-12-12 03:04:53 UTC (rev 6573)
@@ -1,3 +1,6 @@
+=================================================================
+2008-12-09 Released 0.98.5 at svn r6573
+
2008-12-11 Use subprocess.Popen instead of os.popen in dviread
(Windows problem reported by Jorgen Stenarson) - JKS
@@ -4,7 +7,8 @@
2008-12-10 Added Michael's font_manager fix and Jae-Joon's
figure/subplot fix. Bumped version number to 0.98.5 - JDH
-================================================================= 2008-12-09 Released 0.98.4 at svn r6536
+=================================================================
+2008-12-09 Released 0.98.4 at svn r6536
2008-12-08 Added mdehoon's native macosx backend from sf patch 2179017 - JDH
Modified: trunk/matplotlib/lib/matplotlib/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/__init__.py 2008-12-11 20:45:23 UTC (rev 6572)
+++ trunk/matplotlib/lib/matplotlib/__init__.py 2008-12-12 03:04:53 UTC (rev 6573)
@@ -89,7 +89,7 @@
"""
from __future__ import generators
-__version__ = '0.98.5rc'
+__version__ = '0.98.5'
__revision__ = '$Revision$'
__date__ = '$Date$'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-12-11 20:45:27
|
Revision: 6572
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6572&view=rev
Author: mdboom
Date: 2008-12-11 20:45:23 +0000 (Thu, 11 Dec 2008)
Log Message:
-----------
Add docstring clarification.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/artist.py
Modified: trunk/matplotlib/lib/matplotlib/artist.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/artist.py 2008-12-11 20:45:12 UTC (rev 6571)
+++ trunk/matplotlib/lib/matplotlib/artist.py 2008-12-11 20:45:23 UTC (rev 6572)
@@ -340,6 +340,8 @@
* None: (auto) If the path contains only rectilinear line
segments, round to the nearest pixel center
+
+ Only supported by the Agg backends.
"""
return self._snap
@@ -353,6 +355,8 @@
* None: (auto) If the path contains only rectilinear line
segments, round to the nearest pixel center
+
+ Only supported by the Agg backends.
"""
self._snap = snap
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-12-11 20:45:16
|
Revision: 6571
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6571&view=rev
Author: mdboom
Date: 2008-12-11 20:45:12 +0000 (Thu, 11 Dec 2008)
Log Message:
-----------
More progress on programmatic snapping. Applied to markers (to prevent them from disappearing), and legend boxes.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/artist.py
trunk/matplotlib/lib/matplotlib/legend.py
trunk/matplotlib/lib/matplotlib/lines.py
trunk/matplotlib/lib/matplotlib/patches.py
trunk/matplotlib/src/_backend_agg.cpp
Modified: trunk/matplotlib/lib/matplotlib/artist.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/artist.py 2008-12-11 20:44:51 UTC (rev 6570)
+++ trunk/matplotlib/lib/matplotlib/artist.py 2008-12-11 20:45:12 UTC (rev 6571)
@@ -54,6 +54,7 @@
self._url = None
self.x_isdata = True # False to avoid updating Axes.dataLim with x
self.y_isdata = True # with y
+ self._snap = None
def remove(self):
"""
@@ -329,6 +330,32 @@
"""
self._url = url
+ def get_snap(self):
+ """
+ Returns the snap setting which may be:
+
+ * True: snap vertices to the nearest pixel center
+
+ * False: leave vertices as-is
+
+ * None: (auto) If the path contains only rectilinear line
+ segments, round to the nearest pixel center
+ """
+ return self._snap
+
+ def set_snap(self, snap):
+ """
+ Sets the snap setting which may be:
+
+ * True: snap vertices to the nearest pixel center
+
+ * False: leave vertices as-is
+
+ * None: (auto) If the path contains only rectilinear line
+ segments, round to the nearest pixel center
+ """
+ self._snap = snap
+
def get_figure(self):
"""
Return the :class:`~matplotlib.figure.Figure` instance the
Modified: trunk/matplotlib/lib/matplotlib/legend.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/legend.py 2008-12-11 20:44:51 UTC (rev 6570)
+++ trunk/matplotlib/lib/matplotlib/legend.py 2008-12-11 20:45:12 UTC (rev 6571)
@@ -254,6 +254,7 @@
xy=(0.0, 0.0), width=1., height=1.,
facecolor='w', edgecolor='k',
mutation_scale=self.fontsize,
+ snap=True
)
# The width and height of the legendPatch will be set (in the
Modified: trunk/matplotlib/lib/matplotlib/lines.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/lines.py 2008-12-11 20:44:51 UTC (rev 6570)
+++ trunk/matplotlib/lib/matplotlib/lines.py 2008-12-11 20:45:12 UTC (rev 6571)
@@ -453,6 +453,7 @@
join = self._solidjoinstyle
gc.set_joinstyle(join)
gc.set_capstyle(cap)
+ gc.set_snap(self.get_snap())
funcname = self._lineStyles.get(self._linestyle, '_draw_nothing')
if funcname != '_draw_nothing':
@@ -845,6 +846,7 @@
def _draw_point(self, renderer, gc, path, path_trans):
w = renderer.points_to_pixels(self._markersize) * \
self._point_size_reduction * 0.5
+ gc.set_snap(renderer.points_to_pixels(self._markersize) > 3.0)
rgbFace = self._get_rgb_face()
transform = Affine2D().scale(w)
renderer.draw_markers(
@@ -854,6 +856,7 @@
_draw_pixel_transform = Affine2D().translate(-0.5, -0.5)
def _draw_pixel(self, renderer, gc, path, path_trans):
rgbFace = self._get_rgb_face()
+ gc.set_snap(False)
renderer.draw_markers(gc, Path.unit_rectangle(),
self._draw_pixel_transform,
path, path_trans, rgbFace)
@@ -861,6 +864,7 @@
def _draw_circle(self, renderer, gc, path, path_trans):
w = renderer.points_to_pixels(self._markersize) * 0.5
+ gc.set_snap(renderer.points_to_pixels(self._markersize) > 3.0)
rgbFace = self._get_rgb_face()
transform = Affine2D().scale(w, w)
renderer.draw_markers(
@@ -870,6 +874,7 @@
_triangle_path = Path([[0.0, 1.0], [-1.0, -1.0], [1.0, -1.0], [0.0, 1.0]])
def _draw_triangle_up(self, renderer, gc, path, path_trans):
+ gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0)
offset = 0.5*renderer.points_to_pixels(self._markersize)
transform = Affine2D().scale(offset, offset)
rgbFace = self._get_rgb_face()
@@ -878,6 +883,7 @@
def _draw_triangle_down(self, renderer, gc, path, path_trans):
+ gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0)
offset = 0.5*renderer.points_to_pixels(self._markersize)
transform = Affine2D().scale(offset, -offset)
rgbFace = self._get_rgb_face()
@@ -886,6 +892,7 @@
def _draw_triangle_left(self, renderer, gc, path, path_trans):
+ gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0)
offset = 0.5*renderer.points_to_pixels(self._markersize)
transform = Affine2D().scale(offset, offset).rotate_deg(90)
rgbFace = self._get_rgb_face()
@@ -894,6 +901,7 @@
def _draw_triangle_right(self, renderer, gc, path, path_trans):
+ gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0)
offset = 0.5*renderer.points_to_pixels(self._markersize)
transform = Affine2D().scale(offset, offset).rotate_deg(-90)
rgbFace = self._get_rgb_face()
@@ -902,6 +910,7 @@
def _draw_square(self, renderer, gc, path, path_trans):
+ gc.set_snap(renderer.points_to_pixels(self._markersize) >= 2.0)
side = renderer.points_to_pixels(self._markersize)
transform = Affine2D().translate(-0.5, -0.5).scale(side)
rgbFace = self._get_rgb_face()
@@ -910,6 +919,7 @@
def _draw_diamond(self, renderer, gc, path, path_trans):
+ gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0)
side = renderer.points_to_pixels(self._markersize)
transform = Affine2D().translate(-0.5, -0.5).rotate_deg(45).scale(side)
rgbFace = self._get_rgb_face()
@@ -918,6 +928,7 @@
def _draw_thin_diamond(self, renderer, gc, path, path_trans):
+ gc.set_snap(renderer.points_to_pixels(self._markersize) >= 3.0)
offset = renderer.points_to_pixels(self._markersize)
transform = Affine2D().translate(-0.5, -0.5) \
.rotate_deg(45).scale(offset * 0.6, offset)
@@ -927,6 +938,7 @@
def _draw_pentagon(self, renderer, gc, path, path_trans):
+ gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0)
offset = 0.5 * renderer.points_to_pixels(self._markersize)
transform = Affine2D().scale(offset)
rgbFace = self._get_rgb_face()
@@ -934,6 +946,7 @@
path, path_trans, rgbFace)
def _draw_star(self, renderer, gc, path, path_trans):
+ gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0)
offset = 0.5 * renderer.points_to_pixels(self._markersize)
transform = Affine2D().scale(offset)
rgbFace = self._get_rgb_face()
@@ -943,6 +956,7 @@
def _draw_hexagon1(self, renderer, gc, path, path_trans):
+ gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0)
offset = 0.5 * renderer.points_to_pixels(self._markersize)
transform = Affine2D().scale(offset)
rgbFace = self._get_rgb_face()
@@ -951,6 +965,7 @@
def _draw_hexagon2(self, renderer, gc, path, path_trans):
+ gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0)
offset = 0.5 * renderer.points_to_pixels(self._markersize)
transform = Affine2D().scale(offset).rotate_deg(30)
rgbFace = self._get_rgb_face()
@@ -960,6 +975,7 @@
_line_marker_path = Path([[0.0, -1.0], [0.0, 1.0]])
def _draw_vline(self, renderer, gc, path, path_trans):
+ gc.set_snap(renderer.points_to_pixels(self._markersize) >= 1.0)
offset = 0.5*renderer.points_to_pixels(self._markersize)
transform = Affine2D().scale(offset)
renderer.draw_markers(gc, self._line_marker_path, transform,
@@ -967,6 +983,7 @@
def _draw_hline(self, renderer, gc, path, path_trans):
+ gc.set_snap(renderer.points_to_pixels(self._markersize) >= 1.0)
offset = 0.5*renderer.points_to_pixels(self._markersize)
transform = Affine2D().scale(offset).rotate_deg(90)
renderer.draw_markers(gc, self._line_marker_path, transform,
@@ -975,6 +992,7 @@
_tickhoriz_path = Path([[0.0, 0.0], [1.0, 0.0]])
def _draw_tickleft(self, renderer, gc, path, path_trans):
+ gc.set_snap(renderer.points_to_pixels(self._markersize) >= 1.0)
offset = renderer.points_to_pixels(self._markersize)
marker_transform = Affine2D().scale(-offset, 1.0)
renderer.draw_markers(gc, self._tickhoriz_path, marker_transform,
@@ -982,6 +1000,7 @@
def _draw_tickright(self, renderer, gc, path, path_trans):
+ gc.set_snap(renderer.points_to_pixels(self._markersize) >= 1.0)
offset = renderer.points_to_pixels(self._markersize)
marker_transform = Affine2D().scale(offset, 1.0)
renderer.draw_markers(gc, self._tickhoriz_path, marker_transform,
@@ -990,6 +1009,7 @@
_tickvert_path = Path([[-0.0, 0.0], [-0.0, 1.0]])
def _draw_tickup(self, renderer, gc, path, path_trans):
+ gc.set_snap(renderer.points_to_pixels(self._markersize) >= 1.0)
offset = renderer.points_to_pixels(self._markersize)
marker_transform = Affine2D().scale(1.0, offset)
renderer.draw_markers(gc, self._tickvert_path, marker_transform,
@@ -997,6 +1017,7 @@
def _draw_tickdown(self, renderer, gc, path, path_trans):
+ gc.set_snap(renderer.points_to_pixels(self._markersize) >= 1.0)
offset = renderer.points_to_pixels(self._markersize)
marker_transform = Affine2D().scale(1.0, -offset)
renderer.draw_markers(gc, self._tickvert_path, marker_transform,
@@ -1008,6 +1029,7 @@
[Path.MOVETO, Path.LINETO,
Path.MOVETO, Path.LINETO])
def _draw_plus(self, renderer, gc, path, path_trans):
+ gc.set_snap(renderer.points_to_pixels(self._markersize) >= 3.0)
offset = 0.5*renderer.points_to_pixels(self._markersize)
transform = Affine2D().scale(offset)
renderer.draw_markers(gc, self._plus_path, transform,
@@ -1021,6 +1043,7 @@
Path.MOVETO, Path.LINETO,
Path.MOVETO, Path.LINETO])
def _draw_tri_down(self, renderer, gc, path, path_trans):
+ gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0)
offset = 0.5*renderer.points_to_pixels(self._markersize)
transform = Affine2D().scale(offset)
renderer.draw_markers(gc, self._tri_path, transform,
@@ -1028,6 +1051,7 @@
def _draw_tri_up(self, renderer, gc, path, path_trans):
+ gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0)
offset = 0.5*renderer.points_to_pixels(self._markersize)
transform = Affine2D().scale(offset).rotate_deg(180)
renderer.draw_markers(gc, self._tri_path, transform,
@@ -1035,6 +1059,7 @@
def _draw_tri_left(self, renderer, gc, path, path_trans):
+ gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0)
offset = 0.5*renderer.points_to_pixels(self._markersize)
transform = Affine2D().scale(offset).rotate_deg(90)
renderer.draw_markers(gc, self._tri_path, transform,
@@ -1042,6 +1067,7 @@
def _draw_tri_right(self, renderer, gc, path, path_trans):
+ gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0)
offset = 0.5*renderer.points_to_pixels(self._markersize)
transform = Affine2D().scale(offset).rotate_deg(270)
renderer.draw_markers(gc, self._tri_path, transform,
@@ -1050,6 +1076,7 @@
_caret_path = Path([[-1.0, 1.5], [0.0, 0.0], [1.0, 1.5]])
def _draw_caretdown(self, renderer, gc, path, path_trans):
+ gc.set_snap(renderer.points_to_pixels(self._markersize) >= 3.0)
offset = 0.5*renderer.points_to_pixels(self._markersize)
transform = Affine2D().scale(offset)
renderer.draw_markers(gc, self._caret_path, transform,
@@ -1057,6 +1084,7 @@
def _draw_caretup(self, renderer, gc, path, path_trans):
+ gc.set_snap(renderer.points_to_pixels(self._markersize) >= 3.0)
offset = 0.5*renderer.points_to_pixels(self._markersize)
transform = Affine2D().scale(offset).rotate_deg(180)
renderer.draw_markers(gc, self._caret_path, transform,
@@ -1064,6 +1092,7 @@
def _draw_caretleft(self, renderer, gc, path, path_trans):
+ gc.set_snap(renderer.points_to_pixels(self._markersize) >= 3.0)
offset = 0.5*renderer.points_to_pixels(self._markersize)
transform = Affine2D().scale(offset).rotate_deg(270)
renderer.draw_markers(gc, self._caret_path, transform,
@@ -1071,6 +1100,7 @@
def _draw_caretright(self, renderer, gc, path, path_trans):
+ gc.set_snap(renderer.points_to_pixels(self._markersize) >= 3.0)
offset = 0.5*renderer.points_to_pixels(self._markersize)
transform = Affine2D().scale(offset).rotate_deg(90)
renderer.draw_markers(gc, self._caret_path, transform,
@@ -1082,6 +1112,7 @@
[Path.MOVETO, Path.LINETO,
Path.MOVETO, Path.LINETO])
def _draw_x(self, renderer, gc, path, path_trans):
+ gc.set_snap(renderer.points_to_pixels(self._markersize) >= 3.0)
offset = 0.5*renderer.points_to_pixels(self._markersize)
transform = Affine2D().scale(offset)
renderer.draw_markers(gc, self._x_path, transform,
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2008-12-11 20:44:51 UTC (rev 6570)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2008-12-11 20:45:12 UTC (rev 6571)
@@ -278,6 +278,7 @@
self._set_gc_clip(gc)
gc.set_capstyle('projecting')
gc.set_url(self._url)
+ gc.set_snap(self._snap)
if (not self.fill or self._facecolor is None or
(cbook.is_string_like(self._facecolor) and self._facecolor.lower()=='none')):
@@ -1435,7 +1436,6 @@
#adding quotes for now to work around tex bug treating '-' as itemize
_table.append([cls.__name__, "'%s'"%name, argstr])
-
return _pprint_table(_table)
@@ -1505,7 +1505,7 @@
BoxStyle("Round, pad=0.2")
- The following boxstyle classes are defined.
+ Following boxstyle classes are defined.
%(AvailableBoxstyles)s
@@ -2549,6 +2549,7 @@
A arrowstyle object can be either created as::
ArrowStyle.Fancy(head_length=.4, head_width=.4, tail_width=.4)
+
or::
ArrowStyle("Fancy", head_length=.4, head_width=.4, tail_width=.4)
Modified: trunk/matplotlib/src/_backend_agg.cpp
===================================================================
--- trunk/matplotlib/src/_backend_agg.cpp 2008-12-11 20:44:51 UTC (rev 6570)
+++ trunk/matplotlib/src/_backend_agg.cpp 2008-12-11 20:45:12 UTC (rev 6571)
@@ -968,8 +968,6 @@
transformed_path_t tpath(path, trans);
simplify_t simplified(tpath, snap, simplify, width, height);
curve_t curve(simplified);
- if (snap)
- gc.isaa = false;
try {
_draw_path(curve, has_clippath, face, gc);
@@ -1127,10 +1125,7 @@
if (check_snap) {
snap = should_snap(gc, path, trans);
- if (snap)
- gc.isaa = false;
- else
- gc.isaa = bool(Py::Int(antialiaseds[i % Naa]));
+ gc.isaa = bool(Py::Int(antialiaseds[i % Naa]));
transformed_path_t tpath(path, trans);
simplify_t simplified(tpath, snap, false, width, height);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-12-11 20:44:57
|
Revision: 6570
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6570&view=rev
Author: mdboom
Date: 2008-12-11 20:44:51 +0000 (Thu, 11 Dec 2008)
Log Message:
-----------
Add snap parameter to gc object and pass it all the way to Agg.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/backend_bases.py
trunk/matplotlib/src/_backend_agg.cpp
trunk/matplotlib/src/_backend_agg.h
Modified: trunk/matplotlib/lib/matplotlib/backend_bases.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backend_bases.py 2008-12-11 20:44:40 UTC (rev 6569)
+++ trunk/matplotlib/lib/matplotlib/backend_bases.py 2008-12-11 20:44:51 UTC (rev 6570)
@@ -452,6 +452,7 @@
self._rgb = gc._rgb
self._hatch = gc._hatch
self._url = gc._url
+ self._snap = gc._snap
def get_alpha(self):
"""
@@ -533,6 +534,19 @@
"""
return self._url
+ def get_snap(self):
+ """
+ returns the snap setting which may be:
+
+ * True: snap vertices to the nearest pixel center
+
+ * False: leave vertices as-is
+
+ * None: (auto) If the path contains only rectilinear line
+ segments, round to the nearest pixel center
+ """
+ return self._snap
+
def set_alpha(self, alpha):
"""
Set the alpha value used for blending - not supported on
@@ -639,6 +653,19 @@
"""
self._url = url
+ def set_snap(self, snap):
+ """
+ Sets the snap setting which may be:
+
+ * True: snap vertices to the nearest pixel center
+
+ * False: leave vertices as-is
+
+ * None: (auto) If the path contains only rectilinear line
+ segments, round to the nearest pixel center
+ """
+ self._snap = snap
+
def set_hatch(self, hatch):
"""
Sets the hatch style for filling
Modified: trunk/matplotlib/src/_backend_agg.cpp
===================================================================
--- trunk/matplotlib/src/_backend_agg.cpp 2008-12-11 20:44:40 UTC (rev 6569)
+++ trunk/matplotlib/src/_backend_agg.cpp 2008-12-11 20:44:51 UTC (rev 6570)
@@ -148,6 +148,7 @@
_set_dashes(gc);
_set_clip_rectangle(gc);
_set_clip_path(gc);
+ _set_snap(gc);
}
GCAgg::GCAgg(double dpi) :
@@ -254,6 +255,24 @@
}
}
+void
+GCAgg::_set_snap( const Py::Object& gc) {
+ //set the snap setting
+
+ _VERBOSE("GCAgg::_set_snap");
+
+ Py::Object method_obj = gc.getAttr("get_snap");
+ Py::Callable method(method_obj);
+ Py::Object py_snap = method.apply(Py::Tuple());
+ if (py_snap.isNone()) {
+ snap = SNAP_AUTO;
+ } else if (py_snap.isTrue()) {
+ snap = SNAP_TRUE;
+ } else {
+ snap = SNAP_FALSE;
+ }
+}
+
const size_t
RendererAgg::PIXELS_PER_INCH(96);
@@ -336,43 +355,51 @@
}
template<class Path>
-bool should_snap(Path& path, const agg::trans_affine& trans) {
+bool should_snap(const GCAgg& gc, Path& path, const agg::trans_affine& trans) {
// If this contains only straight horizontal or vertical lines, it should be
// quantized to the nearest pixels
double x0, y0, x1, y1;
unsigned code;
- if (path.total_vertices() > 15)
- return false;
+ switch (gc.snap) {
+ case GCAgg::SNAP_AUTO:
+ if (path.total_vertices() > 15)
+ return false;
- code = path.vertex(&x0, &y0);
- if (code == agg::path_cmd_stop) {
- path.rewind(0);
- return false;
- }
- trans.transform(&x0, &y0);
+ code = path.vertex(&x0, &y0);
+ if (code == agg::path_cmd_stop) {
+ path.rewind(0);
+ return false;
+ }
+ trans.transform(&x0, &y0);
- while ((code = path.vertex(&x1, &y1)) != agg::path_cmd_stop) {
- trans.transform(&x1, &y1);
+ while ((code = path.vertex(&x1, &y1)) != agg::path_cmd_stop) {
+ trans.transform(&x1, &y1);
- switch (code) {
- case agg::path_cmd_curve3:
- case agg::path_cmd_curve4:
- path.rewind(0);
- return false;
- case agg::path_cmd_line_to:
- if (!(fabs(x0 - x1) < 1e-4 || fabs(y0 - y1) < 1e-4)) {
- path.rewind(0);
- return false;
+ switch (code) {
+ case agg::path_cmd_curve3:
+ case agg::path_cmd_curve4:
+ path.rewind(0);
+ return false;
+ case agg::path_cmd_line_to:
+ if (!(fabs(x0 - x1) < 1e-4 || fabs(y0 - y1) < 1e-4)) {
+ path.rewind(0);
+ return false;
+ }
}
+
+ x0 = x1;
+ y0 = y1;
}
- x0 = x1;
- y0 = y1;
+ path.rewind(0);
+ return true;
+ case GCAgg::SNAP_FALSE:
+ return false;
+ case GCAgg::SNAP_TRUE:
+ return true;
}
-
- path.rewind(0);
- return true;
+ return false;
}
Py::Object
@@ -487,6 +514,8 @@
if (args.size() == 6)
face_obj = args[5];
+ GCAgg gc = GCAgg(gc_obj, dpi);
+
// Deal with the difference in y-axis direction
marker_trans *= agg::trans_affine_scaling(1.0, -1.0);
trans *= agg::trans_affine_scaling(1.0, -1.0);
@@ -497,14 +526,13 @@
// unfortunately, it can cause really small things to disappear.
// Disabling for now to revisit at a later date.
// const bool marker_snap = true;
- bool marker_snap = should_snap(marker_path, marker_trans);
+ bool marker_snap = should_snap(gc, marker_path, marker_trans);
transformed_path_t marker_path_transformed(marker_path, marker_trans);
simplify_t marker_path_simplified(marker_path_transformed, marker_snap, false, width, height);
curve_t marker_path_curve(marker_path_simplified);
PathIterator path(path_obj);
transformed_path_t path_transformed(path, trans);
- GCAgg gc = GCAgg(gc_obj, dpi);
path_transformed.rewind(0);
facepair_t face = _get_rgba_face(face_obj, gc.alpha);
@@ -934,7 +962,7 @@
trans *= agg::trans_affine_scaling(1.0, -1.0);
trans *= agg::trans_affine_translation(0.0, (double)height);
- bool snap = should_snap(path, trans);
+ bool snap = should_snap(gc, path, trans);
bool simplify = path.should_simplify() && !face.first;
transformed_path_t tpath(path, trans);
@@ -1098,7 +1126,7 @@
}
if (check_snap) {
- snap = should_snap(path, trans);
+ snap = should_snap(gc, path, trans);
if (snap)
gc.isaa = false;
else
Modified: trunk/matplotlib/src/_backend_agg.h
===================================================================
--- trunk/matplotlib/src/_backend_agg.h 2008-12-11 20:44:40 UTC (rev 6569)
+++ trunk/matplotlib/src/_backend_agg.h 2008-12-11 20:44:51 UTC (rev 6570)
@@ -110,7 +110,6 @@
agg::line_cap_e cap;
agg::line_join_e join;
-
double linewidth;
double alpha;
agg::rgba color;
@@ -124,6 +123,12 @@
double dashOffset;
dash_t dashes;
+ enum {
+ SNAP_AUTO,
+ SNAP_FALSE,
+ SNAP_TRUE
+ } snap;
+
protected:
agg::rgba get_color(const Py::Object& gc);
double points_to_pixels( const Py::Object& points);
@@ -133,6 +138,7 @@
void _set_clip_rectangle( const Py::Object& gc);
void _set_clip_path( const Py::Object& gc);
void _set_antialiased( const Py::Object& gc);
+ void _set_snap( const Py::Object& gc);
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-12-11 20:44:44
|
Revision: 6569
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6569&view=rev
Author: mdboom
Date: 2008-12-11 20:44:40 +0000 (Thu, 11 Dec 2008)
Log Message:
-----------
Added a member for snapping
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/backend_bases.py
Modified: trunk/matplotlib/lib/matplotlib/backend_bases.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backend_bases.py 2008-12-11 20:44:32 UTC (rev 6568)
+++ trunk/matplotlib/lib/matplotlib/backend_bases.py 2008-12-11 20:44:40 UTC (rev 6569)
@@ -436,6 +436,7 @@
self._rgb = (0.0, 0.0, 0.0)
self._hatch = None
self._url = None
+ self._snap = None
def copy_properties(self, gc):
'Copy properties from gc to self'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-12-11 20:44:38
|
Revision: 6568
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6568&view=rev
Author: mdboom
Date: 2008-12-11 20:44:32 +0000 (Thu, 11 Dec 2008)
Log Message:
-----------
added some docs for linestyles and markers
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/lines.py
Modified: trunk/matplotlib/lib/matplotlib/lines.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/lines.py 2008-12-11 20:44:23 UTC (rev 6567)
+++ trunk/matplotlib/lib/matplotlib/lines.py 2008-12-11 20:44:32 UTC (rev 6568)
@@ -690,6 +690,7 @@
========== ==========================
+
ACCEPTS: [ '+' | '*' | ',' | '.' | '1' | '2' | '3' | '4'
| '<' | '>' | 'D' | 'H' | '^' | '_' | 'd'
| 'h' | 'o' | 'p' | 's' | 'v' | 'x' | '|'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-12-11 20:44:28
|
Revision: 6567
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6567&view=rev
Author: mdboom
Date: 2008-12-11 20:44:23 +0000 (Thu, 11 Dec 2008)
Log Message:
-----------
fixed typo in Line2D.set_marker doc.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/lines.py
Modified: trunk/matplotlib/lib/matplotlib/lines.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/lines.py 2008-12-11 20:44:12 UTC (rev 6566)
+++ trunk/matplotlib/lib/matplotlib/lines.py 2008-12-11 20:44:23 UTC (rev 6567)
@@ -690,7 +690,6 @@
========== ==========================
-
ACCEPTS: [ '+' | '*' | ',' | '.' | '1' | '2' | '3' | '4'
| '<' | '>' | 'D' | 'H' | '^' | '_' | 'd'
| 'h' | 'o' | 'p' | 's' | 'v' | 'x' | '|'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-12-11 20:44:16
|
Revision: 6566
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6566&view=rev
Author: mdboom
Date: 2008-12-11 20:44:12 +0000 (Thu, 11 Dec 2008)
Log Message:
-----------
added some docs for linestyles and markers
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/lines.py
Modified: trunk/matplotlib/lib/matplotlib/lines.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/lines.py 2008-12-11 20:32:04 UTC (rev 6565)
+++ trunk/matplotlib/lib/matplotlib/lines.py 2008-12-11 20:44:12 UTC (rev 6566)
@@ -690,6 +690,7 @@
========== ==========================
+
ACCEPTS: [ '+' | '*' | ',' | '.' | '1' | '2' | '3' | '4'
| '<' | '>' | 'D' | 'H' | '^' | '_' | 'd'
| 'h' | 'o' | 'p' | 's' | 'v' | 'x' | '|'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2008-12-11 20:32:08
|
Revision: 6565
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6565&view=rev
Author: jouni
Date: 2008-12-11 20:32:04 +0000 (Thu, 11 Dec 2008)
Log Message:
-----------
Use subprocess.Popen instead of os.popen in dviread
(Windows problem reported by Jorgen Stenarson)
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/dviread.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-12-11 18:59:00 UTC (rev 6564)
+++ trunk/matplotlib/CHANGELOG 2008-12-11 20:32:04 UTC (rev 6565)
@@ -1,3 +1,6 @@
+2008-12-11 Use subprocess.Popen instead of os.popen in dviread
+ (Windows problem reported by Jorgen Stenarson) - JKS
+
2008-12-10 Added Michael's font_manager fix and Jae-Joon's
figure/subplot fix. Bumped version number to 0.98.5 - JDH
Modified: trunk/matplotlib/lib/matplotlib/dviread.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/dviread.py 2008-12-11 18:59:00 UTC (rev 6564)
+++ trunk/matplotlib/lib/matplotlib/dviread.py 2008-12-11 20:32:04 UTC (rev 6565)
@@ -21,8 +21,8 @@
import matplotlib
import matplotlib.cbook as mpl_cbook
import numpy as np
-import os
import struct
+import subprocess
_dvistate = mpl_cbook.Bunch(pre=0, outer=1, inpage=2, post_post=3, finale=4)
@@ -742,25 +742,15 @@
doesn't use kpathsea, so what do we do? (TODO)
"""
- cmd = 'kpsewhich '
+ cmd = ['kpsewhich']
if format is not None:
- assert "'" not in format
- cmd += "--format='" + format + "' "
- assert "'" not in filename
- cmd += "'" + filename + "'"
-
+ cmd += ['--format=' + format]
+ cmd += [filename]
+
matplotlib.verbose.report('find_tex_file(%s): %s' \
% (filename,cmd), 'debug')
- pipe = os.popen(cmd, 'r')
- result = ""
- while True:
- data = _read_nointr(pipe)
- if data == "":
- break
- result += data
- pipe.close()
- result = result.rstrip()
-
+ pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE)
+ result = pipe.communicate()[0].rstrip()
matplotlib.verbose.report('find_tex_file result: %s' % result,
'debug')
return result
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lee...@us...> - 2008-12-11 18:59:04
|
Revision: 6564
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6564&view=rev
Author: leejjoon
Date: 2008-12-11 18:59:00 +0000 (Thu, 11 Dec 2008)
Log Message:
-----------
deleted some unused imports, functions.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/axis.py
trunk/matplotlib/lib/matplotlib/backend_bases.py
trunk/matplotlib/lib/matplotlib/backends/backend_agg.py
trunk/matplotlib/lib/matplotlib/legend.py
trunk/matplotlib/lib/matplotlib/patches.py
trunk/matplotlib/lib/matplotlib/text.py
Modified: trunk/matplotlib/lib/matplotlib/axis.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axis.py 2008-12-11 18:29:30 UTC (rev 6563)
+++ trunk/matplotlib/lib/matplotlib/axis.py 2008-12-11 18:59:00 UTC (rev 6564)
@@ -470,7 +470,7 @@
'return the Interval instance for this axis view limits'
return self.axes.viewLim.intervaly
- def set_view_interval(self, vmin, vmax):
+ def set_view_interval(self, vmin, vmax, ignore = False):
if ignore:
self.axes.viewLim.intervaly = vmin, vmax
else:
Modified: trunk/matplotlib/lib/matplotlib/backend_bases.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backend_bases.py 2008-12-11 18:29:30 UTC (rev 6563)
+++ trunk/matplotlib/lib/matplotlib/backend_bases.py 2008-12-11 18:59:00 UTC (rev 6564)
@@ -28,8 +28,6 @@
import numpy as np
import matplotlib.cbook as cbook
import matplotlib.colors as colors
-import matplotlib._image as _image
-import matplotlib.path as path
import matplotlib.transforms as transforms
import matplotlib.widgets as widgets
from matplotlib import rcParams
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_agg.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2008-12-11 18:29:30 UTC (rev 6563)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2008-12-11 18:59:00 UTC (rev 6564)
@@ -21,23 +21,19 @@
* integrate screen dpi w/ ppi and text
"""
from __future__ import division
-import os, sys, weakref
import numpy as npy
-import matplotlib
from matplotlib import verbose, rcParams
-from matplotlib._image import fromarray
-from matplotlib._pylab_helpers import Gcf
from matplotlib.backend_bases import RendererBase,\
- GraphicsContextBase, FigureManagerBase, FigureCanvasBase
-from matplotlib.cbook import is_string_like, exception_to_str, maxdict
+ FigureManagerBase, FigureCanvasBase
+from matplotlib.cbook import is_string_like, maxdict
from matplotlib.figure import Figure
from matplotlib.font_manager import findfont
from matplotlib.ft2font import FT2Font, LOAD_FORCE_AUTOHINT
from matplotlib.mathtext import MathTextParser
from matplotlib.path import Path
-from matplotlib.transforms import Affine2D, Bbox
+from matplotlib.transforms import Bbox
from _backend_agg import RendererAgg as _RendererAgg
from matplotlib import _png
Modified: trunk/matplotlib/lib/matplotlib/legend.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/legend.py 2008-12-11 18:29:30 UTC (rev 6563)
+++ trunk/matplotlib/lib/matplotlib/legend.py 2008-12-11 18:59:00 UTC (rev 6564)
@@ -30,14 +30,10 @@
from matplotlib.cbook import is_string_like, iterable, silent_list, safezip
from matplotlib.font_manager import FontProperties
from matplotlib.lines import Line2D
-from matplotlib.mlab import segments_intersect
-from matplotlib.patches import Patch, Rectangle, Shadow, bbox_artist, FancyBboxPatch
+from matplotlib.patches import Patch, Rectangle, Shadow, FancyBboxPatch
from matplotlib.collections import LineCollection, RegularPolyCollection
-from matplotlib.text import Text
-from matplotlib.transforms import Affine2D, Bbox, BboxTransformTo
+from matplotlib.transforms import Bbox
-from itertools import cycle, izip
-
from matplotlib.offsetbox import HPacker, VPacker, TextArea, DrawingArea
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2008-12-11 18:29:30 UTC (rev 6563)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2008-12-11 18:59:00 UTC (rev 6564)
@@ -9,7 +9,6 @@
import matplotlib.artist as artist
import matplotlib.colors as colors
import matplotlib.transforms as transforms
-import matplotlib.artist as artist
from matplotlib.path import Path
# these are not available for the object inspector until after the
@@ -2171,7 +2170,7 @@
from matplotlib.bezier import split_bezier_intersecting_with_closedpath
from matplotlib.bezier import get_intersection, inside_circle, get_parallels
from matplotlib.bezier import make_wedged_bezier2
-from matplotlib.bezier import split_path_inout, inside_circle, get_cos_sin
+from matplotlib.bezier import split_path_inout, get_cos_sin
class ConnectionStyle(_Style):
@@ -2651,7 +2650,7 @@
# call transmute method with squeezed height.
path_mutated, closed = self.transmute(path_shrinked, linewidth,
mutation_size)
- vertices, codes = path_mutate.vertices, path_mutate.codes
+ vertices, codes = path_mutated.vertices, path_mutated.codes
# Restore the height
vertices[:,1] = vertices[:,1] * aspect_ratio
return Path(vertices, codes), closed
@@ -2915,8 +2914,6 @@
else:
scaleB = self.scaleB
- from matplotlib.bezier import get_cos_sin
-
vertices_list, codes_list = [], []
if self.bracketA:
@@ -3297,12 +3294,6 @@
__init__.__doc__ = cbook.dedent(__init__.__doc__) % kwdoc
del kwdoc
- def list_available_arrowstyles(cls):
- return _list_available_arrowstyles(cls._fancy_arrow_transmuters)
-
- def list_available_connectionstyles(cls):
- return _list_available_connectionstyles(cls._connectors)
-
def set_positions(self, posA, posB):
""" set the begin end end positions of the connecting
path. Use current vlaue if None.
Modified: trunk/matplotlib/lib/matplotlib/text.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/text.py 2008-12-11 18:29:30 UTC (rev 6563)
+++ trunk/matplotlib/lib/matplotlib/text.py 2008-12-11 18:59:00 UTC (rev 6564)
@@ -575,10 +575,6 @@
return self._horizontalalignment
- def _get_xy_display(self):
- 'get the (possibly unit converted) transformed x,y in display coords'
- return self.get_transform().transform_point((self._x, self._y))
-
def get_position(self):
"Return the position of the text as a tuple (*x*, *y*)"
x = float(self.convert_xunits(self._x))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <as...@us...> - 2008-12-11 18:29:42
|
Revision: 6563
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6563&view=rev
Author: astraw
Date: 2008-12-11 18:29:30 +0000 (Thu, 11 Dec 2008)
Log Message:
-----------
/matplotlib/__init__.py: catch OSError when calling subprocess.
An OSError can occur when the user does not have the command in the
path. Fixes an error reported by Nils Wagner.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/__init__.py
Modified: trunk/matplotlib/lib/matplotlib/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/__init__.py 2008-12-11 17:45:45 UTC (rev 6562)
+++ trunk/matplotlib/lib/matplotlib/__init__.py 2008-12-11 18:29:30 UTC (rev 6563)
@@ -262,7 +262,7 @@
line = s.stdout.readlines()[1]
v = line.split()[-1]
return v
- except (IndexError, ValueError):
+ except (IndexError, ValueError, OSError):
return None
def checkdep_ghostscript():
@@ -275,7 +275,7 @@
stderr=subprocess.PIPE)
v = s.stdout.read()[:-1]
return v
- except (IndexError, ValueError):
+ except (IndexError, ValueError, OSError):
return None
def checkdep_tex():
@@ -287,7 +287,7 @@
match = re.search(pattern, line)
v = match.group(0)
return v
- except (IndexError, ValueError, AttributeError):
+ except (IndexError, ValueError, AttributeError, OSError):
return None
def checkdep_pdftops():
@@ -298,7 +298,7 @@
if 'version' in line:
v = line.split()[-1]
return v
- except (IndexError, ValueError, UnboundLocalError):
+ except (IndexError, ValueError, UnboundLocalError, OSError):
return None
def compare_versions(a, b):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|