|
From: <jd...@us...> - 2008-05-25 21:14:08
|
Revision: 5268
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5268&view=rev
Author: jdh2358
Date: 2008-05-25 14:14:01 -0700 (Sun, 25 May 2008)
Log Message:
-----------
rewrote the readme to describe the dir layout
Added Paths:
-----------
trunk/matplotlib/README.txt
Removed Paths:
-------------
trunk/matplotlib/README
trunk/matplotlib/coding_guide.rst
Deleted: trunk/matplotlib/README
===================================================================
--- trunk/matplotlib/README 2008-05-25 20:59:14 UTC (rev 5267)
+++ trunk/matplotlib/README 2008-05-25 21:14:01 UTC (rev 5268)
@@ -1,70 +0,0 @@
-INTRODUCTION:
-
-
- matplotlib is a pure python 2D plotting library with a Matlab(TM)
- syntax which produces publication quality figures using in a
- variety of hardcopy formats (PNG, JPG, TIFF, PS) and interactive
- GUI environments (WX, GTK) across platforms. matplotlib can be used
- in python scripts, interactively from the python shell (ala matlab
- or mathematica), in web application servers generating dynamic
- charts, or embedded in GTK or WX applications; see backends.
-
- matplotlib trys to make easy things easy and hard things
- possible. You can generate plots, histograms, power spectra, bar
- charts, errorcharts, scatterplots, etc, with just a few lines of
- code. For example, to make a histogram of data in x, you simply need
- to type
-
- >>> hist(x, 100) # use 100 bins
-
-
- For the power user, you have full control of line styles, font
- properties, axes properties, etc, via an object oriented interface
- or via a handle graphics interface familiar to matlab users. A
- summary of the goals of matplotlib and the progress so far can be
- found at http://matplotlib.sf.net/goals.html.
-
-REQUIREMENTS:
-
- python 2.3+, and numpy (http://numpy.scipy.org/). Other
- requirements are backend dependent. See
- http://matplotlib.sourceforge.net/backends.html. If you are using
- python2.3, you'll also need to install setuptools; just download
- http://peak.telecommunity.com/dist/ez_setup.py and run it.
-
-INSTALL
-
- The latest installation instructions can be found at
-
- http://matplotlib.sourceforge.net/installing.html
-
- and for backend specific install information see
-
- http://matplotlib.sourceforge.net/backends.html
-
- If you want to use matplotlib interactively from the prompt, see
- http://matplotlib.sourceforge.net/interactive.html
-
-
-EXAMPLES
-
- See the examples in the examples dir. To see examples scripts with
- the outputs they produce, see
- http://matplotlib.sourceforge.net/screenshots.html
-
-AUTHOR
-
- John D. Hunter <jd...@gm...>
- Copyright (c) 2002-2007 John D. Hunter; All Rights Reserved.
-
- Jeremy O'Donoghue wrote the wx backend
-
- See http://matplotlib.sourceforge.net/credits.html for additionaly
- contributors
-
-LICENSE
-
- Based on that of python 2.2. See the LICENSE file that ships with
- the matplotlib source code or
- http://matplotlib.sourceforge.net/license.html
-
Copied: trunk/matplotlib/README.txt (from rev 5265, trunk/matplotlib/README)
===================================================================
--- trunk/matplotlib/README.txt (rev 0)
+++ trunk/matplotlib/README.txt 2008-05-25 21:14:01 UTC (rev 5268)
@@ -0,0 +1,61 @@
+Overview of the matplotlib src tree
+===================================
+
+This is the source directory for matplotlib, which contains the
+following files and directories.
+
+* doc - the matplotlib documentation. See doc/users for the user's
+ documentation and doc/devel for the developers documentation
+
+* examples - a bunch of examples using matplotib. See
+ examples/README.txt for information
+
+* setup.cfg.template - used to configure the matplotlib build process.
+ Copy this file to setup.cfg if you want to override the default
+ build behavior
+
+* matplotlibrc.template - a template file used to generate the
+ matplotlibrc config file at build time. The matplotlibrc file will
+ be installed in matplotlib/mpl-data/matplotlibrc
+
+* lib - the python src code. matplotlib ships several third party
+ packages here. The subdirectory lib/matplotlib contains the python
+ src code for matplotlib
+
+* src - the matplotlib extension code, mostly C++
+
+* ttconv - some truetype font utilities
+
+* license - all the licenses for code included with matplotlib.
+ matplotlib uses only BSD compatible code
+
+* unit - some unit tests
+
+* CHANGELOG - all the significant changes to matplotlib, organized by
+ release. The top of this file will show you the most recent changes
+
+* API_CHANGES - any change that alters the API is listed here. The
+ entries are organized by release, with most recent entries first
+
+* MIGRATION.txt - instructions on moving from the 0.91 code to the
+ 0.98 trunk.
+
+* SEGFAULTS - some tips for how to diagnose and debug segfaults
+
+* setup.py - the matplotlib build script
+
+* setupext.py - some helper code for setup.py to build the matplotlib
+ extensions
+
+* boilerplate.py - some code to automatically generate the pyplot
+ wrappers
+
+* DEVNOTES - deprecated developer notes. TODO: update and move to the
+ doc/devel framework
+
+* FILETYPES - This is a table of the output formats supported by each
+ backend. TODO: move to doc/users
+
+* INTERACTIVE - instructions on using matplotlib interactively, eg
+ from the python shell. TODO: update and move to doc/users.
+
Deleted: trunk/matplotlib/coding_guide.rst
===================================================================
--- trunk/matplotlib/coding_guide.rst 2008-05-25 20:59:14 UTC (rev 5267)
+++ trunk/matplotlib/coding_guide.rst 2008-05-25 21:14:01 UTC (rev 5268)
@@ -1 +0,0 @@
-link doc/devel/coding_guide.rst
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-05-26 17:05:54
|
Revision: 5273
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5273&view=rev
Author: jdh2358
Date: 2008-05-26 10:05:50 -0700 (Mon, 26 May 2008)
Log Message:
-----------
changes to doc readme
Modified Paths:
--------------
trunk/matplotlib/doc/README.txt
trunk/matplotlib/examples/api/logo2.py
trunk/matplotlib/lib/matplotlib/lines.py
Modified: trunk/matplotlib/doc/README.txt
===================================================================
--- trunk/matplotlib/doc/README.txt 2008-05-26 17:04:38 UTC (rev 5272)
+++ trunk/matplotlib/doc/README.txt 2008-05-26 17:05:50 UTC (rev 5273)
@@ -3,9 +3,8 @@
This is the top level build directory for the matplotlib
documentation. All of the documentation is written using sphinx, a
-python documentation system built on top of ReST.
+python documentation system built on top of ReST. This directory contains
-If you are looking for plain text documentation, you can read the following
* users - the user documentation, eg plotting tutorials, configuration
tips, etc.
Modified: trunk/matplotlib/examples/api/logo2.py
===================================================================
--- trunk/matplotlib/examples/api/logo2.py 2008-05-26 17:04:38 UTC (rev 5272)
+++ trunk/matplotlib/examples/api/logo2.py 2008-05-26 17:05:50 UTC (rev 5273)
@@ -36,7 +36,7 @@
x = mu + sigma*np.random.randn(10000)
# the histogram of the data
-n, bins, patches = axhist.hist(x, 50, normed=1,
+n, bins, patches = axhist.hist(x, 20, normed=1,
facecolor='green', edgecolor='green', alpha=0.75)
Modified: trunk/matplotlib/lib/matplotlib/lines.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/lines.py 2008-05-26 17:04:38 UTC (rev 5272)
+++ trunk/matplotlib/lib/matplotlib/lines.py 2008-05-26 17:05:50 UTC (rev 5273)
@@ -529,6 +529,7 @@
def get_markersize(self): return self._markersize
+
def get_xdata(self, orig=True):
"""
return the xdata; if orig is true return the original data,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-05-26 17:09:02
|
Revision: 5274
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5274&view=rev
Author: jdh2358
Date: 2008-05-26 10:08:43 -0700 (Mon, 26 May 2008)
Log Message:
-----------
Merged revisions 5271-5272 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint
........
r5271 | jdh2358 | 2008-05-26 12:02:46 -0500 (Mon, 26 May 2008) | 1 line
added a line vertex selector widget
........
r5272 | jdh2358 | 2008-05-26 12:04:38 -0500 (Mon, 26 May 2008) | 1 line
added a line vertex selector widget
........
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/lines.py
Property Changed:
----------------
trunk/matplotlib/
Property changes on: trunk/matplotlib
___________________________________________________________________
Name: svnmerge-integrated
- /branches/v0_91_maint:1-5260
+ /branches/v0_91_maint:1-5273
Modified: trunk/matplotlib/lib/matplotlib/lines.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/lines.py 2008-05-26 17:05:50 UTC (rev 5273)
+++ trunk/matplotlib/lib/matplotlib/lines.py 2008-05-26 17:08:43 UTC (rev 5274)
@@ -529,7 +529,11 @@
def get_markersize(self): return self._markersize
+ def get_data(self, orig=True):
+ 'return the xdata, ydata; if orig is True, return the original data'
+ return self.get_xdata(orig=orig), self.get_ydata(orig=orig)
+
def get_xdata(self, orig=True):
"""
return the xdata; if orig is true return the original data,
@@ -1177,7 +1181,83 @@
'return True if line is dashstyle'
return self._linestyle in ('--', '-.', ':')
+class VertexSelector:
+ """
+ manage the callbacks to maintain a list of selected vertices for
+ matplotlib.lines.Line2D. Derived classes should override
+ process_selected to do something with the picks
+ Here is an example which highlights the selected verts with red
+ circles::
+
+ import numpy as np
+ import matplotlib.pyplot as plt
+ import matplotlib.lines as lines
+
+ class HighlightSelected(lines.VertexSelector):
+ def __init__(self, line, fmt='ro', **kwargs):
+ lines.VertexSelector.__init__(self, line)
+ self.markers, = self.axes.plot([], [], fmt, **kwargs)
+
+ def process_selected(self, ind, xs, ys):
+ self.markers.set_data(xs, ys)
+ self.canvas.draw()
+
+ fig = plt.figure()
+ ax = fig.add_subplot(111)
+ x, y = np.random.rand(2, 30)
+ line, = ax.plot(x, y, 'bs-', picker=5)
+
+ selector = HighlightSelected(line)
+ plt.show()
+
+ """
+ def __init__(self, line):
+ """
+ Initialize the class with a matplotlib.lines.Line2D instance.
+ The line should already be added to some matplotlib.axes.Axes
+ instance and should have the picker property set.
+ """
+ if not hasattr(line, 'axes'):
+ raise RuntimeError('You must first add the line to the Axes')
+
+ if line.get_picker() is None:
+ raise RuntimeError('You must first set the picker property of the line')
+
+ self.axes = line.axes
+ self.line = line
+ self.canvas = self.axes.figure.canvas
+ self.cid = self.canvas.mpl_connect('pick_event', self.onpick)
+
+ self.ind = set()
+
+
+ def process_selected(self, ind, xs, ys):
+ """
+ Default do nothing implementation of the process_selected method.
+
+ ind are the indices of the selected vertices. xs and ys are
+ the coordinates of the selected vertices.
+ """
+ pass
+
+ def onpick(self, event):
+ 'when the line is picked, update the set of selected indicies'
+ if event.artist is not self.line: return
+
+ for i in event.ind:
+ if i in self.ind:
+ self.ind.remove(i)
+ else:
+ self.ind.add(i)
+
+
+ ind = list(self.ind)
+ ind.sort()
+
+ xdata, ydata = self.line.get_data()
+ self.process_selected(ind, xdata[ind], ydata[ind])
+
lineStyles = Line2D._lineStyles
lineMarkers = Line2D._markers
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-05-26 17:12:17
|
Revision: 5276
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5276&view=rev
Author: jdh2358
Date: 2008-05-26 10:12:07 -0700 (Mon, 26 May 2008)
Log Message:
-----------
Merged revisions 5275 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint
........
r5275 | jdh2358 | 2008-05-26 12:09:44 -0500 (Mon, 26 May 2008) | 1 line
fixed an empty vertex list bug
........
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/lines.py
Property Changed:
----------------
trunk/matplotlib/
Property changes on: trunk/matplotlib
___________________________________________________________________
Name: svnmerge-integrated
- /branches/v0_91_maint:1-5273
+ /branches/v0_91_maint:1-5275
Modified: trunk/matplotlib/lib/matplotlib/lines.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/lines.py 2008-05-26 17:09:44 UTC (rev 5275)
+++ trunk/matplotlib/lib/matplotlib/lines.py 2008-05-26 17:12:07 UTC (rev 5276)
@@ -1254,7 +1254,6 @@
ind = list(self.ind)
ind.sort()
-
xdata, ydata = self.line.get_data()
self.process_selected(ind, xdata[ind], ydata[ind])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-05-27 16:06:00
|
Revision: 5277
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5277&view=rev
Author: mdboom
Date: 2008-05-27 09:05:57 -0700 (Tue, 27 May 2008)
Log Message:
-----------
Try to fix TkAgg build on Ubuntu 8.04
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/setupext.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-05-26 17:12:07 UTC (rev 5276)
+++ trunk/matplotlib/CHANGELOG 2008-05-27 16:05:57 UTC (rev 5277)
@@ -1,3 +1,6 @@
+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
Modified: trunk/matplotlib/setupext.py
===================================================================
--- trunk/matplotlib/setupext.py 2008-05-26 17:12:07 UTC (rev 5276)
+++ trunk/matplotlib/setupext.py 2008-05-27 16:05:57 UTC (rev 5277)
@@ -69,6 +69,7 @@
from distutils.core import Extension
import glob
import ConfigParser
+import cStringIO
major, minor1, minor2, s, tmp = sys.version_info
if major<2 or (major==2 and minor1<3):
@@ -888,6 +889,105 @@
TCL_TK_CACHE = tcl_lib_dir, tk_lib_dir, str(Tkinter.TkVersion)[:3]
return TCL_TK_CACHE
+def parse_tcl_config(tcl_lib_dir, tk_lib_dir):
+ # This is where they live on Ubuntu Hardy (at least)
+ tcl_config = os.path.join(tcl_lib_dir, "tclConfig.sh")
+ tk_config = os.path.join(tk_lib_dir, "tkConfig.sh")
+ if not (os.path.exists(tcl_config) and os.path.exists(tk_config)):
+ # This is where they live on RHEL4 (at least)
+ tcl_config = "/usr/lib/tclConfig.sh"
+ tk_config = "/usr/lib/tkConfig.sh"
+ if not (os.path.exists(tcl_config) and os.path.exists(tk_config)):
+ return None
+
+ # These files are shell scripts that set a bunch of
+ # environment variables. To actually get at the
+ # values, we use ConfigParser, which supports almost
+ # the same format, but requires at least one section.
+ # So, we push a "[default]" section to a copy of the
+ # file in a StringIO object.
+ try:
+ tcl_vars_str = cStringIO.StringIO(
+ "[default]\n" + open(tcl_config, "r").read())
+ tk_vars_str = cStringIO.StringIO(
+ "[default]\n" + open(tk_config, "r").read())
+ except IOError:
+ # if we can't read the file, that's ok, we'll try
+ # to guess instead
+ return None
+
+ tcl_vars_str.seek(0)
+ tcl_vars = ConfigParser.RawConfigParser()
+ tk_vars_str.seek(0)
+ tk_vars = ConfigParser.RawConfigParser()
+ try:
+ tcl_vars.readfp(tcl_vars_str)
+ tk_vars.readfp(tk_vars_str)
+ except ConfigParser.ParsingError:
+ # if we can't read the file, that's ok, we'll try
+ # to guess instead
+ return None
+
+ try:
+ tcl_lib = tcl_vars.get("default", "TCL_LIB_SPEC")[1:-1].split()[0][2:]
+ tcl_inc = tcl_vars.get("default", "TCL_INCLUDE_SPEC")[3:-1]
+ tk_lib = tk_vars.get("default", "TK_LIB_SPEC")[1:-1].split()[0][2:]
+ if tk_vars.has_option("default", "TK_INCLUDE_SPEC"):
+ # On Ubuntu 8.04
+ tk_inc = tk_vars.get("default", "TK_INCLUDE_SPEC")[3:-1]
+ else:
+ # On RHEL4
+ tk_inc = tcl_inc
+ except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
+ return None
+
+ if not os.path.exists(os.path.join(tk_inc, 'tk.h')):
+ return None
+
+ return tcl_lib, tcl_inc, tk_lib, tk_inc
+
+def guess_tcl_config(tcl_lib_dir, tk_lib_dir, tk_ver):
+ if not (os.path.exists(tcl_lib_dir) and os.path.exists(tk_lib_dir)):
+ return None
+
+ tcl_lib = os.path.normpath(os.path.join(tcl_lib_dir, '../'))
+ tk_lib = os.path.normpath(os.path.join(tk_lib_dir, '../'))
+
+ tcl_inc = os.path.normpath(os.path.join(tcl_lib_dir,
+ '../../include/tcl' + tk_ver))
+ if not os.path.exists(tcl_inc):
+ tcl_inc = os.path.normpath(os.path.join(tcl_lib_dir,
+ '../../include'))
+
+ tk_inc = os.path.normpath(os.path.join(tk_lib_dir,
+ '../../include/tk' + tk_ver))
+ if not os.path.exists(tk_inc):
+ tk_inc = os.path.normpath(os.path.join(tk_lib_dir,
+ '../../include'))
+
+ if not os.path.exists(os.path.join(tk_inc, 'tk.h')):
+ tk_inc = tcl_inc
+
+ if not os.path.exists(tcl_inc):
+ # this is a hack for suse linux, which is broken
+ if (sys.platform.startswith('linux') and
+ os.path.exists('/usr/include/tcl.h') and
+ os.path.exists('/usr/include/tk.h')):
+ tcl_inc = '/usr/include'
+ tk_inc = '/usr/include'
+
+ if not os.path.exists(os.path.join(tk_inc, 'tk.h')):
+ return None
+
+ return tcl_lib, tcl_inc, tk_lib, tk_inc
+
+def hardcoded_tcl_config():
+ tcl_inc = "/usr/local/include"
+ tk_inc = "/usr/local/include"
+ tcl_lib = "/usr/local/lib"
+ tk_lib = "/usr/local/lib"
+ return tcl_lib, tcl_inc, tk_lib, tk_inc
+
def add_tk_flags(module):
'Add the module flags to build extensions which use tk'
message = None
@@ -951,46 +1051,39 @@
# you're still here? ok we'll try it this way...
else:
+ success = False
+ # There are 3 methods to try, in decreasing order of "smartness"
+ #
+ # 1. Parse the tclConfig.sh and tkConfig.sh files that have
+ # all the information we need
+ #
+ # 2. Guess the include and lib dirs based on the location of
+ # Tkinter's 'tcl_library' and 'tk_library' variables.
+ #
+ # 3. Use some hardcoded locations that seem to work on a lot
+ # of distros.
+
# Query Tcl/Tk system for library paths and version string
- tcl_lib_dir, tk_lib_dir, tk_ver = query_tcltk() # todo: try/except
-
- # Process base directories to obtain include + lib dirs
- if tcl_lib_dir != '' and tk_lib_dir != '':
- tcl_lib = os.path.normpath(os.path.join(tcl_lib_dir, '../'))
- tk_lib = os.path.normpath(os.path.join(tk_lib_dir, '../'))
- tcl_inc = os.path.normpath(os.path.join(tcl_lib_dir,
- '../../include/tcl' + tk_ver))
- if not os.path.exists(tcl_inc):
- tcl_inc = os.path.normpath(os.path.join(tcl_lib_dir,
- '../../include'))
- tk_inc = os.path.normpath(os.path.join(tk_lib_dir,
- '../../include/tk' + tk_ver))
- if not os.path.exists(tk_inc):
- tk_inc = os.path.normpath(os.path.join(tk_lib_dir,
- '../../include'))
-
- if ((not os.path.exists(os.path.join(tk_inc,'tk.h'))) and
- os.path.exists(os.path.join(tcl_inc,'tk.h'))):
- tk_inc = tcl_inc
-
- if not os.path.exists(tcl_inc):
- # this is a hack for suse linux, which is broken
- if (sys.platform.startswith('linux') and
- os.path.exists('/usr/include/tcl.h') and
- os.path.exists('/usr/include/tk.h')):
- tcl_inc = '/usr/include'
- tk_inc = '/usr/include'
+ try:
+ tcl_lib_dir, tk_lib_dir, tk_ver = query_tcltk()
+ except:
+ result = hardcoded_tcl_config()
else:
- message = """\
+ result = parse_tcl_config(tcl_lib_dir, tk_lib_dir)
+ if result is None:
+ message = """\
+Guessing the library and include directories for Tcl and Tk because the
+tclConfig.sh and tkConfig.sh could not be found and/or parsed."""
+ result = guess_tcl_config(tcl_lib_dir, tk_lib_dir, tk_ver)
+ if result is None:
+ message = """\
Using default library and include directories for Tcl and Tk because a
Tk window failed to open. You may need to define DISPLAY for Tk to work
so that setup can determine where your libraries are located."""
- tcl_inc = "/usr/local/include"
- tk_inc = "/usr/local/include"
- tcl_lib = "/usr/local/lib"
- tk_lib = "/usr/local/lib"
- tk_ver = ""
+ result = hardcoded_tcl_config()
+
# Add final versions of directories and libraries to module lists
+ tcl_lib, tcl_inc, tk_lib, tk_inc = result
module.include_dirs.extend([tcl_inc, tk_inc])
module.library_dirs.extend([tcl_lib, tk_lib])
module.libraries.extend(['tk' + tk_ver, 'tcl' + tk_ver])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-05-28 03:16:36
|
Revision: 5282
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5282&view=rev
Author: jdh2358
Date: 2008-05-27 20:16:35 -0700 (Tue, 27 May 2008)
Log Message:
-----------
reworked callback api for cm.ScalarMappable
Modified Paths:
--------------
trunk/matplotlib/API_CHANGES
trunk/matplotlib/CHANGELOG
trunk/matplotlib/examples/pylab/image_demo2.py
trunk/matplotlib/lib/matplotlib/cm.py
trunk/matplotlib/lib/matplotlib/colorbar.py
trunk/matplotlib/lib/matplotlib/figure.py
trunk/matplotlib/lib/matplotlib/pyplot.py
Removed Paths:
-------------
trunk/matplotlib/lib/matplotlib/agg.py
Modified: trunk/matplotlib/API_CHANGES
===================================================================
--- trunk/matplotlib/API_CHANGES 2008-05-28 02:04:26 UTC (rev 5281)
+++ trunk/matplotlib/API_CHANGES 2008-05-28 03:16:35 UTC (rev 5282)
@@ -1,3 +1,8 @@
+ 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.
+
New axes function and Axes method provide control over the plot
color cycle: axes.set_default_color_cycle(clist) and
Axes.set_color_cycle(clist).
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-05-28 02:04:26 UTC (rev 5281)
+++ trunk/matplotlib/CHANGELOG 2008-05-28 03:16:35 UTC (rev 5282)
@@ -1,3 +1,9 @@
+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.)
Modified: trunk/matplotlib/examples/pylab/image_demo2.py
===================================================================
--- trunk/matplotlib/examples/pylab/image_demo2.py 2008-05-28 02:04:26 UTC (rev 5281)
+++ trunk/matplotlib/examples/pylab/image_demo2.py 2008-05-28 03:16:35 UTC (rev 5282)
@@ -8,7 +8,7 @@
A.shape = w, h
extent = (0, 25, 0, 25)
-im = imshow(A, cmap=cm.jet, origin='upper', extent=extent)
+im = imshow(A, cmap=cm.hot, origin='upper', extent=extent)
markers = [(15.9, 14.5), (16.8, 15)]
x,y = zip(*markers)
Deleted: trunk/matplotlib/lib/matplotlib/agg.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/agg.py 2008-05-28 02:04:26 UTC (rev 5281)
+++ trunk/matplotlib/lib/matplotlib/agg.py 2008-05-28 03:16:35 UTC (rev 5282)
@@ -1,1322 +0,0 @@
-# This file was automatically generated by SWIG (http://www.swig.org).
-# Version 1.3.31
-#
-# Don't modify this file, modify the SWIG interface instead.
-# This file is compatible with both classic and new-style classes.
-
-import _agg
-import new
-new_instancemethod = new.instancemethod
-try:
- _swig_property = property
-except NameError:
- pass # Python < 2.2 doesn't have 'property'.
-def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
- if (name == "thisown"): return self.this.own(value)
- if (name == "this"):
- if type(value).__name__ == 'PySwigObject':
- self.__dict__[name] = value
- return
- method = class_type.__swig_setmethods__.get(name,None)
- if method: return method(self,value)
- if (not static) or hasattr(self,name):
- self.__dict__[name] = value
- else:
- raise AttributeError("You cannot add attributes to %s" % self)
-
-def _swig_setattr(self,class_type,name,value):
- return _swig_setattr_nondynamic(self,class_type,name,value,0)
-
-def _swig_getattr(self,class_type,name):
- if (name == "thisown"): return self.this.own()
- method = class_type.__swig_getmethods__.get(name,None)
- if method: return method(self)
- raise AttributeError,name
-
-def _swig_repr(self):
- try: strthis = "proxy of " + self.this.__repr__()
- except: strthis = ""
- return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
-
-import types
-try:
- _object = types.ObjectType
- _newclass = 1
-except AttributeError:
- class _object : pass
- _newclass = 0
-del types
-
-
-cover_shift = _agg.cover_shift
-cover_size = _agg.cover_size
-cover_mask = _agg.cover_mask
-cover_none = _agg.cover_none
-cover_full = _agg.cover_full
-deg2rad = _agg.deg2rad
-rad2deg = _agg.rad2deg
-path_cmd_stop = _agg.path_cmd_stop
-path_cmd_move_to = _agg.path_cmd_move_to
-path_cmd_line_to = _agg.path_cmd_line_to
-path_cmd_curve3 = _agg.path_cmd_curve3
-path_cmd_curve4 = _agg.path_cmd_curve4
-path_cmd_curveN = _agg.path_cmd_curveN
-path_cmd_catrom = _agg.path_cmd_catrom
-path_cmd_ubspline = _agg.path_cmd_ubspline
-path_cmd_end_poly = _agg.path_cmd_end_poly
-path_cmd_mask = _agg.path_cmd_mask
-path_flags_none = _agg.path_flags_none
-path_flags_ccw = _agg.path_flags_ccw
-path_flags_cw = _agg.path_flags_cw
-path_flags_close = _agg.path_flags_close
-path_flags_mask = _agg.path_flags_mask
-is_vertex = _agg.is_vertex
-is_stop = _agg.is_stop
-is_move_to = _agg.is_move_to
-is_line_to = _agg.is_line_to
-is_curve = _agg.is_curve
-is_curve3 = _agg.is_curve3
-is_curve4 = _agg.is_curve4
-is_end_poly = _agg.is_end_poly
-is_close = _agg.is_close
-is_next_poly = _agg.is_next_poly
-is_cw = _agg.is_cw
-is_ccw = _agg.is_ccw
-is_oriented = _agg.is_oriented
-is_closed = _agg.is_closed
-get_close_flag = _agg.get_close_flag
-clear_orientation = _agg.clear_orientation
-get_orientation = _agg.get_orientation
-set_orientation = _agg.set_orientation
-class point_type(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, point_type, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, point_type, name)
- __repr__ = _swig_repr
- __swig_setmethods__["x"] = _agg.point_type_x_set
- __swig_getmethods__["x"] = _agg.point_type_x_get
- if _newclass:x = _swig_property(_agg.point_type_x_get, _agg.point_type_x_set)
- __swig_setmethods__["y"] = _agg.point_type_y_set
- __swig_getmethods__["y"] = _agg.point_type_y_get
- if _newclass:y = _swig_property(_agg.point_type_y_get, _agg.point_type_y_set)
- def __init__(self, *args):
- this = _agg.new_point_type(*args)
- try: self.this.append(this)
- except: self.this = this
- __swig_destroy__ = _agg.delete_point_type
- __del__ = lambda self : None;
-point_type_swigregister = _agg.point_type_swigregister
-point_type_swigregister(point_type)
-cvar = _agg.cvar
-pi = cvar.pi
-
-class vertex_type(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, vertex_type, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, vertex_type, name)
- __repr__ = _swig_repr
- __swig_setmethods__["x"] = _agg.vertex_type_x_set
- __swig_getmethods__["x"] = _agg.vertex_type_x_get
- if _newclass:x = _swig_property(_agg.vertex_type_x_get, _agg.vertex_type_x_set)
- __swig_setmethods__["y"] = _agg.vertex_type_y_set
- __swig_getmethods__["y"] = _agg.vertex_type_y_get
- if _newclass:y = _swig_property(_agg.vertex_type_y_get, _agg.vertex_type_y_set)
- __swig_setmethods__["cmd"] = _agg.vertex_type_cmd_set
- __swig_getmethods__["cmd"] = _agg.vertex_type_cmd_get
- if _newclass:cmd = _swig_property(_agg.vertex_type_cmd_get, _agg.vertex_type_cmd_set)
- def __init__(self, *args):
- this = _agg.new_vertex_type(*args)
- try: self.this.append(this)
- except: self.this = this
- __swig_destroy__ = _agg.delete_vertex_type
- __del__ = lambda self : None;
-vertex_type_swigregister = _agg.vertex_type_swigregister
-vertex_type_swigregister(vertex_type)
-
-class rect(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, rect, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, rect, name)
- __repr__ = _swig_repr
- __swig_setmethods__["x1"] = _agg.rect_x1_set
- __swig_getmethods__["x1"] = _agg.rect_x1_get
- if _newclass:x1 = _swig_property(_agg.rect_x1_get, _agg.rect_x1_set)
- __swig_setmethods__["y1"] = _agg.rect_y1_set
- __swig_getmethods__["y1"] = _agg.rect_y1_get
- if _newclass:y1 = _swig_property(_agg.rect_y1_get, _agg.rect_y1_set)
- __swig_setmethods__["x2"] = _agg.rect_x2_set
- __swig_getmethods__["x2"] = _agg.rect_x2_get
- if _newclass:x2 = _swig_property(_agg.rect_x2_get, _agg.rect_x2_set)
- __swig_setmethods__["y2"] = _agg.rect_y2_set
- __swig_getmethods__["y2"] = _agg.rect_y2_get
- if _newclass:y2 = _swig_property(_agg.rect_y2_get, _agg.rect_y2_set)
- def __init__(self, *args):
- this = _agg.new_rect(*args)
- try: self.this.append(this)
- except: self.this = this
- def normalize(*args): return _agg.rect_normalize(*args)
- def clip(*args): return _agg.rect_clip(*args)
- def is_valid(*args): return _agg.rect_is_valid(*args)
- __swig_destroy__ = _agg.delete_rect
- __del__ = lambda self : None;
-rect_swigregister = _agg.rect_swigregister
-rect_swigregister(rect)
-
-class rect_d(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, rect_d, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, rect_d, name)
- __repr__ = _swig_repr
- __swig_setmethods__["x1"] = _agg.rect_d_x1_set
- __swig_getmethods__["x1"] = _agg.rect_d_x1_get
- if _newclass:x1 = _swig_property(_agg.rect_d_x1_get, _agg.rect_d_x1_set)
- __swig_setmethods__["y1"] = _agg.rect_d_y1_set
- __swig_getmethods__["y1"] = _agg.rect_d_y1_get
- if _newclass:y1 = _swig_property(_agg.rect_d_y1_get, _agg.rect_d_y1_set)
- __swig_setmethods__["x2"] = _agg.rect_d_x2_set
- __swig_getmethods__["x2"] = _agg.rect_d_x2_get
- if _newclass:x2 = _swig_property(_agg.rect_d_x2_get, _agg.rect_d_x2_set)
- __swig_setmethods__["y2"] = _agg.rect_d_y2_set
- __swig_getmethods__["y2"] = _agg.rect_d_y2_get
- if _newclass:y2 = _swig_property(_agg.rect_d_y2_get, _agg.rect_d_y2_set)
- def __init__(self, *args):
- this = _agg.new_rect_d(*args)
- try: self.this.append(this)
- except: self.this = this
- def normalize(*args): return _agg.rect_d_normalize(*args)
- def clip(*args): return _agg.rect_d_clip(*args)
- def is_valid(*args): return _agg.rect_d_is_valid(*args)
- __swig_destroy__ = _agg.delete_rect_d
- __del__ = lambda self : None;
-rect_d_swigregister = _agg.rect_d_swigregister
-rect_d_swigregister(rect_d)
-
-unite_rectangles = _agg.unite_rectangles
-unite_rectangles_d = _agg.unite_rectangles_d
-intersect_rectangles = _agg.intersect_rectangles
-intersect_rectangles_d = _agg.intersect_rectangles_d
-class binary_data(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, binary_data, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, binary_data, name)
- __repr__ = _swig_repr
- __swig_setmethods__["size"] = _agg.binary_data_size_set
- __swig_getmethods__["size"] = _agg.binary_data_size_get
- if _newclass:size = _swig_property(_agg.binary_data_size_get, _agg.binary_data_size_set)
- __swig_setmethods__["data"] = _agg.binary_data_data_set
- __swig_getmethods__["data"] = _agg.binary_data_data_get
- if _newclass:data = _swig_property(_agg.binary_data_data_get, _agg.binary_data_data_set)
- def __init__(self, *args):
- this = _agg.new_binary_data(*args)
- try: self.this.append(this)
- except: self.this = this
- __swig_destroy__ = _agg.delete_binary_data
- __del__ = lambda self : None;
-binary_data_swigregister = _agg.binary_data_swigregister
-binary_data_swigregister(binary_data)
-
-class buffer(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, buffer, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, buffer, name)
- __repr__ = _swig_repr
- def __init__(self, *args):
- this = _agg.new_buffer(*args)
- try: self.this.append(this)
- except: self.this = this
- __swig_destroy__ = _agg.delete_buffer
- __del__ = lambda self : None;
- def to_string(*args): return _agg.buffer_to_string(*args)
- __swig_getmethods__["width"] = _agg.buffer_width_get
- if _newclass:width = _swig_property(_agg.buffer_width_get)
- __swig_getmethods__["height"] = _agg.buffer_height_get
- if _newclass:height = _swig_property(_agg.buffer_height_get)
- __swig_getmethods__["stride"] = _agg.buffer_stride_get
- if _newclass:stride = _swig_property(_agg.buffer_stride_get)
- __swig_setmethods__["data"] = _agg.buffer_data_set
- __swig_getmethods__["data"] = _agg.buffer_data_get
- if _newclass:data = _swig_property(_agg.buffer_data_get, _agg.buffer_data_set)
- __swig_setmethods__["freemem"] = _agg.buffer_freemem_set
- __swig_getmethods__["freemem"] = _agg.buffer_freemem_get
- if _newclass:freemem = _swig_property(_agg.buffer_freemem_get, _agg.buffer_freemem_set)
-buffer_swigregister = _agg.buffer_swigregister
-buffer_swigregister(buffer)
-
-class order_rgb(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, order_rgb, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, order_rgb, name)
- __repr__ = _swig_repr
- R = _agg.order_rgb_R
- G = _agg.order_rgb_G
- B = _agg.order_rgb_B
- rgb_tag = _agg.order_rgb_rgb_tag
- def __init__(self, *args):
- this = _agg.new_order_rgb(*args)
- try: self.this.append(this)
- except: self.this = this
- __swig_destroy__ = _agg.delete_order_rgb
- __del__ = lambda self : None;
-order_rgb_swigregister = _agg.order_rgb_swigregister
-order_rgb_swigregister(order_rgb)
-
-class order_bgr(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, order_bgr, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, order_bgr, name)
- __repr__ = _swig_repr
- B = _agg.order_bgr_B
- G = _agg.order_bgr_G
- R = _agg.order_bgr_R
- rgb_tag = _agg.order_bgr_rgb_tag
- def __init__(self, *args):
- this = _agg.new_order_bgr(*args)
- try: self.this.append(this)
- except: self.this = this
- __swig_destroy__ = _agg.delete_order_bgr
- __del__ = lambda self : None;
-order_bgr_swigregister = _agg.order_bgr_swigregister
-order_bgr_swigregister(order_bgr)
-
-class order_rgba(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, order_rgba, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, order_rgba, name)
- __repr__ = _swig_repr
- R = _agg.order_rgba_R
- G = _agg.order_rgba_G
- B = _agg.order_rgba_B
- A = _agg.order_rgba_A
- rgba_tag = _agg.order_rgba_rgba_tag
- def __init__(self, *args):
- this = _agg.new_order_rgba(*args)
- try: self.this.append(this)
- except: self.this = this
- __swig_destroy__ = _agg.delete_order_rgba
- __del__ = lambda self : None;
-order_rgba_swigregister = _agg.order_rgba_swigregister
-order_rgba_swigregister(order_rgba)
-
-class order_argb(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, order_argb, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, order_argb, name)
- __repr__ = _swig_repr
- A = _agg.order_argb_A
- R = _agg.order_argb_R
- G = _agg.order_argb_G
- B = _agg.order_argb_B
- rgba_tag = _agg.order_argb_rgba_tag
- def __init__(self, *args):
- this = _agg.new_order_argb(*args)
- try: self.this.append(this)
- except: self.this = this
- __swig_destroy__ = _agg.delete_order_argb
- __del__ = lambda self : None;
-order_argb_swigregister = _agg.order_argb_swigregister
-order_argb_swigregister(order_argb)
-
-class order_abgr(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, order_abgr, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, order_abgr, name)
- __repr__ = _swig_repr
- A = _agg.order_abgr_A
- B = _agg.order_abgr_B
- G = _agg.order_abgr_G
- R = _agg.order_abgr_R
- rgba_tag = _agg.order_abgr_rgba_tag
- def __init__(self, *args):
- this = _agg.new_order_abgr(*args)
- try: self.this.append(this)
- except: self.this = this
- __swig_destroy__ = _agg.delete_order_abgr
- __del__ = lambda self : None;
-order_abgr_swigregister = _agg.order_abgr_swigregister
-order_abgr_swigregister(order_abgr)
-
-class order_bgra(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, order_bgra, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, order_bgra, name)
- __repr__ = _swig_repr
- B = _agg.order_bgra_B
- G = _agg.order_bgra_G
- R = _agg.order_bgra_R
- A = _agg.order_bgra_A
- rgba_tag = _agg.order_bgra_rgba_tag
- def __init__(self, *args):
- this = _agg.new_order_bgra(*args)
- try: self.this.append(this)
- except: self.this = this
- __swig_destroy__ = _agg.delete_order_bgra
- __del__ = lambda self : None;
-order_bgra_swigregister = _agg.order_bgra_swigregister
-order_bgra_swigregister(order_bgra)
-
-class rgba(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, rgba, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, rgba, name)
- __repr__ = _swig_repr
- __swig_setmethods__["r"] = _agg.rgba_r_set
- __swig_getmethods__["r"] = _agg.rgba_r_get
- if _newclass:r = _swig_property(_agg.rgba_r_get, _agg.rgba_r_set)
- __swig_setmethods__["g"] = _agg.rgba_g_set
- __swig_getmethods__["g"] = _agg.rgba_g_get
- if _newclass:g = _swig_property(_agg.rgba_g_get, _agg.rgba_g_set)
- __swig_setmethods__["b"] = _agg.rgba_b_set
- __swig_getmethods__["b"] = _agg.rgba_b_get
- if _newclass:b = _swig_property(_agg.rgba_b_get, _agg.rgba_b_set)
- __swig_setmethods__["a"] = _agg.rgba_a_set
- __swig_getmethods__["a"] = _agg.rgba_a_get
- if _newclass:a = _swig_property(_agg.rgba_a_get, _agg.rgba_a_set)
- def clear(*args): return _agg.rgba_clear(*args)
- def transparent(*args): return _agg.rgba_transparent(*args)
- def opacity(*args): return _agg.rgba_opacity(*args)
- def premultiply(*args): return _agg.rgba_premultiply(*args)
- def demultiply(*args): return _agg.rgba_demultiply(*args)
- def gradient(*args): return _agg.rgba_gradient(*args)
- __swig_getmethods__["no_color"] = lambda x: _agg.rgba_no_color
- if _newclass:no_color = staticmethod(_agg.rgba_no_color)
- __swig_getmethods__["from_wavelength"] = lambda x: _agg.rgba_from_wavelength
- if _newclass:from_wavelength = staticmethod(_agg.rgba_from_wavelength)
- def __init__(self, *args):
- this = _agg.new_rgba(*args)
- try: self.this.append(this)
- except: self.this = this
- __swig_destroy__ = _agg.delete_rgba
- __del__ = lambda self : None;
-rgba_swigregister = _agg.rgba_swigregister
-rgba_swigregister(rgba)
-rgba_no_color = _agg.rgba_no_color
-rgba_from_wavelength = _agg.rgba_from_wavelength
-
-class rgba8(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, rgba8, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, rgba8, name)
- __repr__ = _swig_repr
- base_shift = _agg.rgba8_base_shift
- base_size = _agg.rgba8_base_size
- base_mask = _agg.rgba8_base_mask
- __swig_setmethods__["r"] = _agg.rgba8_r_set
- __swig_getmethods__["r"] = _agg.rgba8_r_get
- if _newclass:r = _swig_property(_agg.rgba8_r_get, _agg.rgba8_r_set)
- __swig_setmethods__["g"] = _agg.rgba8_g_set
- __swig_getmethods__["g"] = _agg.rgba8_g_get
- if _newclass:g = _swig_property(_agg.rgba8_g_get, _agg.rgba8_g_set)
- __swig_setmethods__["b"] = _agg.rgba8_b_set
- __swig_getmethods__["b"] = _agg.rgba8_b_get
- if _newclass:b = _swig_property(_agg.rgba8_b_get, _agg.rgba8_b_set)
- __swig_setmethods__["a"] = _agg.rgba8_a_set
- __swig_getmethods__["a"] = _agg.rgba8_a_get
- if _newclass:a = _swig_property(_agg.rgba8_a_get, _agg.rgba8_a_set)
- def __init__(self, *args):
- this = _agg.new_rgba8(*args)
- try: self.this.append(this)
- except: self.this = this
- def clear(*args): return _agg.rgba8_clear(*args)
- def transparent(*args): return _agg.rgba8_transparent(*args)
- def opacity(*args): return _agg.rgba8_opacity(*args)
- def premultiply(*args): return _agg.rgba8_premultiply(*args)
- def demultiply(*args): return _agg.rgba8_demultiply(*args)
- def gradient(*args): return _agg.rgba8_gradient(*args)
- __swig_getmethods__["no_color"] = lambda x: _agg.rgba8_no_color
- if _newclass:no_color = staticmethod(_agg.rgba8_no_color)
- __swig_getmethods__["from_wavelength"] = lambda x: _agg.rgba8_from_wavelength
- if _newclass:from_wavelength = staticmethod(_agg.rgba8_from_wavelength)
- __swig_destroy__ = _agg.delete_rgba8
- __del__ = lambda self : None;
-rgba8_swigregister = _agg.rgba8_swigregister
-rgba8_swigregister(rgba8)
-rgba_pre = _agg.rgba_pre
-rgba8_no_color = _agg.rgba8_no_color
-rgba8_from_wavelength = _agg.rgba8_from_wavelength
-
-rgb8_packed = _agg.rgb8_packed
-bgr8_packed = _agg.bgr8_packed
-argb8_packed = _agg.argb8_packed
-class rgba16(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, rgba16, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, rgba16, name)
- __repr__ = _swig_repr
- base_shift = _agg.rgba16_base_shift
- base_size = _agg.rgba16_base_size
- base_mask = _agg.rgba16_base_mask
- __swig_setmethods__["r"] = _agg.rgba16_r_set
- __swig_getmethods__["r"] = _agg.rgba16_r_get
- if _newclass:r = _swig_property(_agg.rgba16_r_get, _agg.rgba16_r_set)
- __swig_setmethods__["g"] = _agg.rgba16_g_set
- __swig_getmethods__["g"] = _agg.rgba16_g_get
- if _newclass:g = _swig_property(_agg.rgba16_g_get, _agg.rgba16_g_set)
- __swig_setmethods__["b"] = _agg.rgba16_b_set
- __swig_getmethods__["b"] = _agg.rgba16_b_get
- if _newclass:b = _swig_property(_agg.rgba16_b_get, _agg.rgba16_b_set)
- __swig_setmethods__["a"] = _agg.rgba16_a_set
- __swig_getmethods__["a"] = _agg.rgba16_a_get
- if _newclass:a = _swig_property(_agg.rgba16_a_get, _agg.rgba16_a_set)
- def __init__(self, *args):
- this = _agg.new_rgba16(*args)
- try: self.this.append(this)
- except: self.this = this
- def clear(*args): return _agg.rgba16_clear(*args)
- def transparent(*args): return _agg.rgba16_transparent(*args)
- def opacity(*args): return _agg.rgba16_opacity(*args)
- def premultiply(*args): return _agg.rgba16_premultiply(*args)
- def demultiply(*args): return _agg.rgba16_demultiply(*args)
- def gradient(*args): return _agg.rgba16_gradient(*args)
- __swig_getmethods__["no_color"] = lambda x: _agg.rgba16_no_color
- if _newclass:no_color = staticmethod(_agg.rgba16_no_color)
- __swig_getmethods__["from_wavelength"] = lambda x: _agg.rgba16_from_wavelength
- if _newclass:from_wavelength = staticmethod(_agg.rgba16_from_wavelength)
- __swig_destroy__ = _agg.delete_rgba16
- __del__ = lambda self : None;
-rgba16_swigregister = _agg.rgba16_swigregister
-rgba16_swigregister(rgba16)
-rgba8_pre = _agg.rgba8_pre
-rgba16_no_color = _agg.rgba16_no_color
-rgba16_from_wavelength = _agg.rgba16_from_wavelength
-
-class trans_affine(_object):
- __swig_setmethods__ = {}
- __setattr__ = lambda self, name, value: _swig_setattr(self, trans_affine, name, value)
- __swig_getmethods__ = {}
- __getattr__ = lambda self, name: _swig_getattr(self, trans_affine, name)
- __repr__ = _swig_repr
- def __init__(self, *args):
- this = _agg.new_trans_affine(*args)
- try: self.this.append(this)
- except: self.this = this
- def parl_to_parl(*args): return _agg.trans_affine_parl_to_parl(*args)
- def rect_to_parl(*args): return _agg.trans_affine_rect_to_parl(*args)
- def parl_to_rect(*args): return _agg.trans_affine_parl_to_rect(*args)
- def reset(*args): return _agg.trans_affine_reset(*args)
- def multiply(*args): return _agg.trans_affine_multiply(*args)
- def premultiply(*args): return _agg.trans_affine_premultiply(*args)
- def invert(*args): return _agg.trans_affine_invert(*args)
- def flip_x(*args): return _agg.trans_affine_flip_x(*args)
- def flip_y(*args): return _agg.trans_affine_flip_y(*args)
- def as_vec6(*args): return _agg.trans_affine_as_vec6(*args)
- def load_from(*args): return _agg.trans_affine_load_from(*args)
- def __imul__(*args): return _agg.trans_affine___imul__(*args)
- def __mul__(*args): return _agg.trans_affine___mul__(*args)
- def __invert__(*args): return _agg.trans_affine___invert__(*args)
- def __eq__(*args): return _agg.trans_affine___eq__(*args)
- def __ne__(*args): return _agg.trans_affine___ne__(*args)
- def transform(*args): return _agg.trans_affine_transform(*args)
- def inverse_transform(*args): return _agg.trans_affine_inverse_transform(*args)
- def determinant(*args): return _agg.trans_affine_determinant(*args)
- def scale(*args): return _agg.trans_affine_scale(*args)
- def is_identity(*args): return _agg.trans_affine_is_identity(*args)
- def is_equal(*args): return _agg.trans_affine_is_equal(*args)
- def get_rotation(*args): return _agg.trans_affine_get_rotation(*args)
- def get_translation(*args): return _agg.trans_affine_get_translation(*args)
- def get_scaling(*args): return _agg.trans_affine_get_scaling(*args)
- __swig_destroy__ = _agg.delete_trans_affine
- __del__ = lambda self : None;
-trans_affine_swigregister = _agg.trans_affine_swigregister
-trans_affine_swigregister(trans_affine)
-rgba16_pre = _agg.rgba16_pre
-
-class trans_affine_rotation(trans_affine):
- __swig_setmethods__ = {}
- for _s in [trans_affine]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
- __setattr__ = lambda self, name, value: _swig_setattr(self, trans_affine_rotation, name, value)
- __swig_getmethods__ = {}
- for _s in [trans_affine]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
- __getattr__ = lambda self, name: _swig_getattr(self, trans_affine_rotation, name)
- __repr__ = _swig_repr
- def __init__(self, *args):
- this = _agg.new_trans_affine_rotation(*args)
- try: self.this.append(this)
- except: self.this = this
- __swig_destroy__ = _agg.delete_trans_affine_rotation
- __del__ = lambda self : None;
-trans_affine_rotation_swigregister = _agg.trans_affine_rotation_swigregister
-trans_affine_rotation_swigregister(trans_affine_rotation)
-
-class trans_affine_scaling(trans_affine):
- __swig_setmethods__ = {}
- for _s in [trans_affine]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
- __setattr__ = lambda self, name, value: _swig_setattr(self, trans_affine_scaling, name, value)
- __swig_getmethods__ = {}
- for _s in [trans_affine]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
- __getattr__ = lambda self, name: _swig_getattr(self, trans_affine_scaling, name)
- __repr__ = _swig_repr
- def __init__(self, *args):
- this = _agg.new_trans_affine_scaling(*args)
- try: self.this.append(this)
- except: self.this = this
- __swig_destroy__ = _agg.delete_trans_affine_scaling
- __del__ = lambda self : None;
-trans_affine_scaling_swigregister = _agg.trans_affine_scaling_swigregister
-trans_affine_scaling_swigregister(trans_affine_scaling)
-
-class trans_affine_translation(trans_affine):
- __swig_setmethods__ = {}
- for _s in [trans_affine]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
- __setattr__ = lambda self, name, value: _swig_setattr(self, trans_affine_translation, name, value)
- __swig_getmethods__ = {}
- for _s in [trans_affine]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
- __getattr__ = lambda self, name: _swig_getattr(self, trans_affine_translation, name)
- __repr__ = _swig_repr
- def __init__(self, *args):
- this = _agg.new_trans_affine_translation(*args)
- try: self.this.append(this)
- except: self.this = this
- __swig_destroy__ = _agg.delete_trans_affine_translation
- __del__ = lambda self : None;
-trans_affine_translation_swigregister = _agg.trans_affine_translation_swigregister
-trans_affine_translation_swigregister(trans_affine_translation)
-
-class trans_affine_skewing(trans_affine):
- __swig_setmethods__ = {}
- for _s in [trans_affine]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
- __setattr__ = lambda self, name, value: _swig_setattr(self, trans_affine_skewing, name, value)
- __swig_getmethods__ = {}
- for _s in [trans_affine]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
- __getattr__ = lambda self, name: _swig_getattr(self, trans_affine_skewing, name)
- __repr__ = _swig_repr
- def __init__(self, *args):
- this = _agg.new_trans_affine_skewing(*args)
- try: self.this.append(this)
- except: self.this = this
- __swig_destroy__ = _agg.delete_trans_affine_skewing
- __del__ = lambda self : None;
-trans_affine_skewing_swigregister = _agg.trans_affine_skewing_swigregister
-trans_affine_skew...
[truncated message content] |
|
From: <md...@us...> - 2008-05-28 13:36:53
|
Revision: 5284
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5284&view=rev
Author: mdboom
Date: 2008-05-28 06:36:50 -0700 (Wed, 28 May 2008)
Log Message:
-----------
Merged revisions 5276-5283 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_91_maint
........
r5283 | mdboom | 2008-05-28 09:31:39 -0400 (Wed, 28 May 2008) | 4 lines
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!
........
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/ttconv/pprdrv_tt2.cpp
Property Changed:
----------------
trunk/matplotlib/
Property changes on: trunk/matplotlib
___________________________________________________________________
Name: svnmerge-integrated
- /branches/v0_91_maint:1-5275
+ /branches/v0_91_maint:1-5283
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-05-28 13:31:39 UTC (rev 5283)
+++ trunk/matplotlib/CHANGELOG 2008-05-28 13:36:50 UTC (rev 5284)
@@ -1,3 +1,7 @@
+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
Modified: trunk/matplotlib/ttconv/pprdrv_tt2.cpp
===================================================================
--- trunk/matplotlib/ttconv/pprdrv_tt2.cpp 2008-05-28 13:31:39 UTC (rev 5283)
+++ trunk/matplotlib/ttconv/pprdrv_tt2.cpp 2008-05-28 13:36:50 UTC (rev 5284)
@@ -531,8 +531,8 @@
}
else /* The tt spec. does not clearly indicate */
{ /* whether these values are signed or not. */
- arg1 = *(glyph++);
- arg2 = *(glyph++);
+ arg1 = *(signed char *)(glyph++);
+ arg2 = *(signed char *)(glyph++);
}
if(flags & WE_HAVE_A_SCALE)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-05-28 14:39:25
|
Revision: 5285
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5285&view=rev
Author: jdh2358
Date: 2008-05-28 07:39:23 -0700 (Wed, 28 May 2008)
Log Message:
-----------
zero area rects no longer influence auto-scaling
Modified Paths:
--------------
trunk/matplotlib/API_CHANGES
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/API_CHANGES
===================================================================
--- trunk/matplotlib/API_CHANGES 2008-05-28 13:36:50 UTC (rev 5284)
+++ trunk/matplotlib/API_CHANGES 2008-05-28 14:39:23 UTC (rev 5285)
@@ -1,3 +1,4 @@
+
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
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-05-28 13:36:50 UTC (rev 5284)
+++ trunk/matplotlib/CHANGELOG 2008-05-28 14:39:23 UTC (rev 5285)
@@ -1,3 +1,7 @@
+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!
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-05-28 13:36:50 UTC (rev 5284)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-05-28 14:39:23 UTC (rev 5285)
@@ -1230,10 +1230,18 @@
def _update_patch_limits(self, p):
'update the datalimits for patch p'
+ # hist can add zero height Rectangles, which is useful to keep
+ # the bins, counts and patches lined up, but it throws off log
+ # scaling. We'll ignore rects with zero height or width in
+ # the auto-scaling
+ if isinstance(p, mpatches.Rectangle) and p.get_width()==0. or p.get_height()==0.:
+ return
+
vertices = p.get_patch_transform().transform(p.get_path().vertices)
if p.get_data_transform() != self.transData:
transform = p.get_data_transform() + self.transData.inverted()
xys = transform.transform(vertices)
+
self.update_datalim(vertices)
def add_table(self, tab):
@@ -3509,14 +3517,15 @@
if adjust_xlim:
xmin, xmax = self.dataLim.intervalx
- xmin = np.amin(width)
+ xmin = np.amin(width[width!=0]) # filter out the 0 width rects
if xerr is not None:
xmin = xmin - np.amax(xerr)
xmin = max(xmin*0.9, 1e-100)
self.dataLim.intervalx = (xmin, xmax)
+
if adjust_ylim:
ymin, ymax = self.dataLim.intervaly
- ymin = np.amin(height)
+ ymin = np.amin(height[height!=0]) # filter out the 0 height rects
if yerr is not None:
ymin = ymin - np.amax(yerr)
ymin = max(ymin*0.9, 1e-100)
@@ -5501,7 +5510,10 @@
width. If None, automatically compute the width. Ignored
for 'step' histtype.
- log: if True, the histogram axis will be set to a log scale
+ log: if True, the histogram axis will be set to a log scale.
+ If log is true and x is a 1D array, empty bins will be
+ filtered out and only the non-empty n, bins, patches will be
+ returned.
kwargs are used to update the properties of the
hist Rectangles:
@@ -5587,6 +5599,7 @@
ccount += 1
elif orientation == 'vertical':
for m in n:
+
color = colors[ccount % len(colors)]
patch = self.bar(bins[:-1]+boffset, m, width=width,
bottom=bottom, align='center', log=log,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-05-28 16:41:23
|
Revision: 5287
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5287&view=rev
Author: jdh2358
Date: 2008-05-28 09:41:21 -0700 (Wed, 28 May 2008)
Log Message:
-----------
use unicode minus rather than hyphen
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/ticker.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-05-28 15:33:03 UTC (rev 5286)
+++ trunk/matplotlib/CHANGELOG 2008-05-28 16:41:21 UTC (rev 5287)
@@ -1,3 +1,6 @@
+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
Modified: trunk/matplotlib/lib/matplotlib/ticker.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/ticker.py 2008-05-28 15:33:03 UTC (rev 5286)
+++ trunk/matplotlib/lib/matplotlib/ticker.py 2008-05-28 16:41:21 UTC (rev 5287)
@@ -408,7 +408,7 @@
def pprint_val(self, x):
xp = (x-self.offset)/10**self.orderOfMagnitude
if np.absolute(xp) < 1e-8: xp = 0
- return self.format % xp
+ return (self.format % xp).replace('-', u'\u2212')
def _formatSciNotation(self, s):
# transform 1e+004 into 1e4, for example
@@ -422,13 +422,13 @@
# reformat 1x10^y as 10^y
significand = ''
if exponent:
- exponent = '10^{%s%s}'%(sign, exponent)
+ exponent = u'10^{%s%s}'%(sign, exponent)
if significand and exponent:
return r'%s{\times}%s'%(significand, exponent)
else:
return r'%s%s'%(significand, exponent)
else:
- return ('%se%s%s' %(significand, sign, exponent)).rstrip('e')
+ return (u'%se%s%s' %(significand, sign.replace('-', u'\u2212'), exponent)).rstrip('e')
except IndexError, msg:
return s
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-05-28 16:44:47
|
Revision: 5288
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5288&view=rev
Author: jdh2358
Date: 2008-05-28 09:44:32 -0700 (Wed, 28 May 2008)
Log Message:
-----------
reverting due to PDF problem
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/ticker.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-05-28 16:41:21 UTC (rev 5287)
+++ trunk/matplotlib/CHANGELOG 2008-05-28 16:44:32 UTC (rev 5288)
@@ -1,4 +1,5 @@
-2008-05-28 Replaced '-' with u'\u2212' for minus sign as requested in
+2008-05-28 REVERTING due to PDF problem. 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
Modified: trunk/matplotlib/lib/matplotlib/ticker.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/ticker.py 2008-05-28 16:41:21 UTC (rev 5287)
+++ trunk/matplotlib/lib/matplotlib/ticker.py 2008-05-28 16:44:32 UTC (rev 5288)
@@ -408,7 +408,8 @@
def pprint_val(self, x):
xp = (x-self.offset)/10**self.orderOfMagnitude
if np.absolute(xp) < 1e-8: xp = 0
- return (self.format % xp).replace('-', u'\u2212')
+ #return (self.format % xp).replace('-', u'\u2212') # crashes PDF
+ return self.format % xp
def _formatSciNotation(self, s):
# transform 1e+004 into 1e4, for example
@@ -428,7 +429,8 @@
else:
return r'%s%s'%(significand, exponent)
else:
- return (u'%se%s%s' %(significand, sign.replace('-', u'\u2212'), exponent)).rstrip('e')
+ sign = sign.replace('-', u'\u2212') # crashes PDF
+ return ('%se%s%s' %(significand, sign, exponent)).rstrip('e')
except IndexError, msg:
return s
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-05-28 18:22:43
|
Revision: 5295
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5295&view=rev
Author: mdboom
Date: 2008-05-28 11:22:39 -0700 (Wed, 28 May 2008)
Log Message:
-----------
Merged revisions 5284-5294 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_91_maint
........
r5292 | jdh2358 | 2008-05-28 14:03:15 -0400 (Wed, 28 May 2008) | 1 line
added keywords to configure sliders for sf patch 1866207
........
r5293 | mdboom | 2008-05-28 14:13:05 -0400 (Wed, 28 May 2008) | 3 lines
Fix PDFs that crash xpdf and ghostscript when two-byte codepoints are
used with Type 3 fonts.
........
r5294 | mdboom | 2008-05-28 14:19:30 -0400 (Wed, 28 May 2008) | 2 lines
Adding CHANGELOG entry and scary comment about what was going wrong.
........
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/examples/widgets/sliders.py
trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py
trunk/matplotlib/lib/matplotlib/widgets.py
Property Changed:
----------------
trunk/matplotlib/
Property changes on: trunk/matplotlib
___________________________________________________________________
Name: svnmerge-integrated
- /branches/v0_91_maint:1-5283
+ /branches/v0_91_maint:1-5294
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-05-28 18:19:30 UTC (rev 5294)
+++ trunk/matplotlib/CHANGELOG 2008-05-28 18:22:39 UTC (rev 5295)
@@ -1,3 +1,11 @@
+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 REVERTING due to PDF problem. 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
Modified: trunk/matplotlib/examples/widgets/sliders.py
===================================================================
--- trunk/matplotlib/examples/widgets/sliders.py 2008-05-28 18:19:30 UTC (rev 5294)
+++ trunk/matplotlib/examples/widgets/sliders.py 2008-05-28 18:22:39 UTC (rev 5295)
@@ -12,8 +12,8 @@
axfreq = axes([0.125, 0.1, 0.775, 0.03], axisbg=axcolor)
axamp = axes([0.125, 0.15, 0.775, 0.03], axisbg=axcolor)
-sfreq = Slider(axfreq, 'Freq', 0.1, 30.0, valinit=1)
-samp = Slider(axamp, 'Amp', 0.1, 10.0, valinit=1)
+sfreq = Slider(axfreq, 'Freq', 0.1, 30.0, valinit=1, facecolor='blue', alpha=0.5)
+samp = Slider(axamp, 'Amp', 0.1, 10.0, valinit=1, facecolor='red', alpha=0.5)
def update(val):
amp = samp.val
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py 2008-05-28 18:19:30 UTC (rev 5294)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py 2008-05-28 18:22:39 UTC (rev 5295)
@@ -719,6 +719,13 @@
charprocDict['Type'] = Name('XObject')
charprocDict['Subtype'] = Name('Form')
charprocDict['BBox'] = bbox
+ # Each glyph includes bounding box information,
+ # but xpdf and ghostscript can't handle it in a
+ # Form XObject (they segfault!!!), so we remove it
+ # from the stream here. It's not needed anyway,
+ # since the Form XObject includes it in its BBox
+ # value.
+ stream = stream[stream.find("d1") + 2:]
charprocObject = self.reserveObject('charProc')
self.beginStream(charprocObject.id, None, charprocDict)
self.currentstream.write(stream)
Modified: trunk/matplotlib/lib/matplotlib/widgets.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/widgets.py 2008-05-28 18:19:30 UTC (rev 5294)
+++ trunk/matplotlib/lib/matplotlib/widgets.py 2008-05-28 18:22:39 UTC (rev 5295)
@@ -171,7 +171,7 @@
"""
def __init__(self, ax, label, valmin, valmax, valinit=0.5, valfmt='%1.2f',
closedmin=True, closedmax=True, slidermin=None, slidermax=None,
- dragging=True):
+ dragging=True, **kwargs):
"""
Create a slider from valmin to valmax in axes ax;
@@ -185,6 +185,11 @@
slidermin and slidermax - be used to contrain the value of
this slider to the values of other sliders.
+
+ additional kwargs are passed on to self.poly which is the
+ matplotlib.patches.Rectangle which draws the slider. See the
+ matplotlib.patches.Rectangle documentation for legal property
+ names (eg facecolor, edgecolor, alpha, ...)
"""
self.ax = ax
@@ -192,7 +197,7 @@
self.valmax = valmax
self.val = valinit
self.valinit = valinit
- self.poly = ax.axvspan(valmin,valinit,0,1)
+ self.poly = ax.axvspan(valmin,valinit,0,1, **kwargs)
self.vline = ax.axvline(valinit,0,1, color='r', lw=1)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-05-28 18:39:11
|
Revision: 5296
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5296&view=rev
Author: jdh2358
Date: 2008-05-28 11:39:05 -0700 (Wed, 28 May 2008)
Log Message:
-----------
readded minus/hyphen patch now that Michael has fixed PDF unicode
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/ticker.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-05-28 18:22:39 UTC (rev 5295)
+++ trunk/matplotlib/CHANGELOG 2008-05-28 18:39:05 UTC (rev 5296)
@@ -6,8 +6,7 @@
http://sourceforge.net/tracker/index.php?func=detail&aid=1866207&group_id=80706&atid=560722
- JDH
-2008-05-28 REVERTING due to PDF problem. Replaced '-' with u'\u2212'
- for minus sign as requested in
+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
Modified: trunk/matplotlib/lib/matplotlib/ticker.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/ticker.py 2008-05-28 18:22:39 UTC (rev 5295)
+++ trunk/matplotlib/lib/matplotlib/ticker.py 2008-05-28 18:39:05 UTC (rev 5296)
@@ -175,6 +175,23 @@
def set_locs(self, locs):
self.locs = locs
+ def fix_minus(self, s):
+ """
+ some classes may want to replace a hyphen for minus with the
+ proper unicode symbol as described here
+
+ http://sourceforge.net/tracker/index.php?func=detail&aid=1962574&group_id=80706&atid=560720.
+ The default is to do nothing
+
+ Note, if you use this method, eg in format_data or call, you
+ probably don't want to use it for format_data_short since the
+ toolbar uses this for interative coord reporting and I doubt
+ we can expect GUIs across platforms will handle the unicode
+ correctly. So for now the classes that override fix_minus
+ should have an explicit format_data_short method
+ """
+ return s
+
class NullFormatter(Formatter):
'Always return the empty string'
def __call__(self, x, pos=None):
@@ -270,6 +287,7 @@
such that the tick labels are meaningful. Scientific notation is used for
data < 1e-3 or data >= 1e4.
"""
+
def __init__(self, useOffset=True, useMathText=False):
# useOffset allows plotting small data ranges with large offsets:
# for example: [1+1e-9,1+2e-9,1+3e-9]
@@ -283,12 +301,17 @@
self._scientific = True
self._powerlimits = rcParams['axes.formatter.limits']
+ def fix_minus(self, s):
+ 'use a unicode minus rather than hyphen'
+ return s.replace('-', u'\u2212')
+
def __call__(self, x, pos=None):
'Return the format for tick val x at position pos'
if len(self.locs)==0:
return ''
else:
- return self.pprint_val(x)
+ s = self.pprint_val(x)
+ return self.fix_minus(s)
def set_scientific(self, b):
'''True or False to turn scientific notation on or off
@@ -314,11 +337,14 @@
def format_data(self,value):
'return a formatted string representation of a number'
- return self._formatSciNotation('%1.10e'% value)
+ s = self._formatSciNotation('%1.10e'% value)
+ return self.fix_minus(s)
+
def get_offset(self):
"""Return scientific notation, plus offset"""
if len(self.locs)==0: return ''
+ s = ''
if self.orderOfMagnitude or self.offset:
offsetStr = ''
sciNotStr = ''
@@ -333,14 +359,15 @@
if self._useMathText:
if sciNotStr != '':
sciNotStr = r'\times\mathdefault{%s}' % sciNotStr
- return ''.join(('$',sciNotStr,r'\mathdefault{',offsetStr,'}$'))
+ s = ''.join(('$',sciNotStr,r'\mathdefault{',offsetStr,'}$'))
elif self._usetex:
if sciNotStr != '':
sciNotStr = r'\times%s' % sciNotStr
- return ''.join(('$',sciNotStr,offsetStr,'$'))
+ s = ''.join(('$',sciNotStr,offsetStr,'$'))
else:
- return ''.join((sciNotStr,offsetStr))
- else: return ''
+ s = ''.join((sciNotStr,offsetStr))
+
+ return self.fix_minus(s)
def set_locs(self, locs):
'set the locations of the ticks'
@@ -408,7 +435,6 @@
def pprint_val(self, x):
xp = (x-self.offset)/10**self.orderOfMagnitude
if np.absolute(xp) < 1e-8: xp = 0
- #return (self.format % xp).replace('-', u'\u2212') # crashes PDF
return self.format % xp
def _formatSciNotation(self, s):
@@ -429,8 +455,8 @@
else:
return r'%s%s'%(significand, exponent)
else:
- #sign = sign.replace('-', u'\u2212') # crashes PDF
- return ('%se%s%s' %(significand, sign, exponent)).rstrip('e')
+ s = ('%se%s%s' %(significand, sign, exponent)).rstrip('e')
+ return s
except IndexError, msg:
return s
@@ -476,15 +502,20 @@
elif x<1: s = '%1.0e'%x
else : s = self.pprint_val(x,d)
if sign == -1:
- return '-%s' % s
- return s
+ s = '-%s' % s
+ return self.fix_minus(s)
+
def format_data(self,value):
self.labelOnlyBase = False
value = cbook.strip_math(self.__call__(value))
self.labelOnlyBase = True
return value
+ def format_data_short(self,value):
+ 'return a short formatted string representation of a number'
+ return '%1.3g'%value
+
def is_decade(self, x):
n = self.nearest_long(x)
return abs(x-n)<1e-10
@@ -541,10 +572,11 @@
elif fx<1: s = '%1.0e'%fx
else : s = self.pprint_val(fx,d)
if sign == -1:
- return '-%s' % s
- return s
+ s = '-%s' % s
+ return self.fix_minus(s)
+
class LogFormatterMathtext(LogFormatter):
"""
Format values for log axis; using exponent = log_base(value)
@@ -582,8 +614,6 @@
return s
-
-
class Locator(TickHelper):
"""
Determine the tick locations;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-05-29 14:58:07
|
Revision: 5300
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5300&view=rev
Author: mdboom
Date: 2008-05-29 07:57:15 -0700 (Thu, 29 May 2008)
Log Message:
-----------
Merged revisions 5295-5299 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_91_maint
........
r5298 | mdboom | 2008-05-29 09:01:40 -0400 (Thu, 29 May 2008) | 2 lines
Implement path clipping in SVG backend.
........
r5299 | dsdale | 2008-05-29 09:54:04 -0400 (Thu, 29 May 2008) | 3 lines
fixed two bugs in texmanager: dvipng version comparison, and
another related to the addition of the get_gray method
........
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/texmanager.py
Property Changed:
----------------
trunk/matplotlib/
Property changes on: trunk/matplotlib
___________________________________________________________________
Name: svnmerge-integrated
- /branches/v0_91_maint:1-5294
+ /branches/v0_91_maint:1-5299
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-05-29 13:54:04 UTC (rev 5299)
+++ trunk/matplotlib/CHANGELOG 2008-05-29 14:57:15 UTC (rev 5300)
@@ -1,3 +1,10 @@
+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-29 Implement path clipping in SVG backend - MGD
+
2008-05-28 Fix crashing of PDFs in xpdf and ghostscript when two-byte
characters are used with Type 3 fonts - MGD
Modified: trunk/matplotlib/lib/matplotlib/texmanager.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/texmanager.py 2008-05-29 13:54:04 UTC (rev 5299)
+++ trunk/matplotlib/lib/matplotlib/texmanager.py 2008-05-29 14:57:15 UTC (rev 5300)
@@ -33,7 +33,8 @@
"""
-import copy, glob, md5, os, shutil, sys
+import copy, glob, md5, os, shutil, sys, warnings
+import distutils.version
import numpy as np
import matplotlib as mpl
from matplotlib import rcParams
@@ -44,14 +45,15 @@
if sys.platform.startswith('win'): cmd_split = '&'
else: cmd_split = ';'
-def get_dvipng_version():
+def dvipng_hack_alpha():
stdin, stdout = os.popen4('dvipng -version')
for line in stdout:
if line.startswith('dvipng '):
version = line.split()[-1]
mpl.verbose.report('Found dvipng version %s'% version,
'helpful')
- return version
+ version = distutils.version.LooseVersion(version)
+ return version < distutils.version.LooseVersion('1.6')
raise RuntimeError('Could not obtain dvipng version')
@@ -78,7 +80,7 @@
if not os.path.exists(texcache):
os.mkdir(texcache)
- dvipngVersion = get_dvipng_version()
+ _dvipng_hack_alpha = dvipng_hack_alpha()
# mappable cache of
rgba_arrayd = {}
@@ -364,8 +366,28 @@
pngfile = self.make_png(tex, fontsize, dpi)
X = readpng(os.path.join(self.texcache, pngfile))
- if (self.dvipngVersion < '1.6') or rcParams['text.dvipnghack']:
- # hack the alpha channel as described in comment above
+ if self._dvipng_hack_alpha or rcParams['text.dvipnghack']:
+ # hack the alpha channel
+ # dvipng assumed a constant background, whereas we want to
+ # overlay these rasters with antialiasing over arbitrary
+ # backgrounds that may have other figure elements under them.
+ # When you set dvipng -bg Transparent, it actually makes the
+ # alpha channel 1 and does the background compositing and
+ # antialiasing itself and puts the blended data in the rgb
+ # channels. So what we do is extract the alpha information
+ # from the red channel, which is a blend of the default dvipng
+ # background (white) and foreground (black). So the amount of
+ # red (or green or blue for that matter since white and black
+ # blend to a grayscale) is the alpha intensity. Once we
+ # extract the correct alpha information, we assign it to the
+ # alpha channel properly and let the users pick their rgb. In
+ # this way, we can overlay tex strings on arbitrary
+ # backgrounds with antialiasing
+ #
+ # red = alpha*red_foreground + (1-alpha)*red_background
+ #
+ # Since the foreground is black (0) and the background is
+ # white (1) this reduces to red = 1-alpha or alpha = 1-red
alpha = np.sqrt(1-X[:,:,0])
else:
alpha = X[:,:,-1]
@@ -378,26 +400,6 @@
"""
Returns latex's rendering of the tex string as an rgba array
"""
- # dvipng assumes a constant background, whereas we want to
- # overlay these rasters with antialiasing over arbitrary
- # backgrounds that may have other figure elements under them.
- # When you set dvipng -bg Transparent, it actually makes the
- # alpha channel 1 and does the background compositing and
- # antialiasing itself and puts the blended data in the rgb
- # channels. So what we do is extract the alpha information
- # from the red channel, which is a blend of the default dvipng
- # background (white) and foreground (black). So the amount of
- # red (or green or blue for that matter since white and black
- # blend to a grayscale) is the alpha intensity. Once we
- # extract the correct alpha information, we assign it to the
- # alpha channel properly and let the users pick their rgb. In
- # this way, we can overlay tex strings on arbitrary
- # backgrounds with antialiasing
- #
- # red = alpha*red_foreground + (1-alpha)*red_background
- #
- # Since the foreground is black (0) and the background is
- # white (1) this reduces to red = 1-alpha or alpha = 1-red
if not fontsize: fontsize = rcParams['font.size']
if not dpi: dpi = rcParams['savefig.dpi']
r,g,b = rgb
@@ -407,7 +409,8 @@
if Z is None:
alpha = self.get_grey(tex, fontsize, dpi)
- Z = np.zeros((X.shape[0], X.shape[1], 4), np.float)
+ Z = np.zeros((alpha.shape[0], alpha.shape[1], 4), np.float)
+
Z[:,:,0] = r
Z[:,:,1] = g
Z[:,:,2] = b
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-05-29 16:44:55
|
Revision: 5303
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5303&view=rev
Author: jdh2358
Date: 2008-05-29 09:44:49 -0700 (Thu, 29 May 2008)
Log Message:
-----------
fixed the font rotation agg bug -- and there was much rejoicing
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/ticker.py
trunk/matplotlib/src/_backend_agg.cpp
Modified: trunk/matplotlib/lib/matplotlib/ticker.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/ticker.py 2008-05-29 15:55:55 UTC (rev 5302)
+++ trunk/matplotlib/lib/matplotlib/ticker.py 2008-05-29 16:44:49 UTC (rev 5303)
@@ -301,6 +301,7 @@
self._scientific = True
self._powerlimits = rcParams['axes.formatter.limits']
+
def fix_minus(self, s):
'use a unicode minus rather than hyphen'
if rcParams['text.usetex']: return s
Modified: trunk/matplotlib/src/_backend_agg.cpp
===================================================================
--- trunk/matplotlib/src/_backend_agg.cpp 2008-05-29 15:55:55 UTC (rev 5302)
+++ trunk/matplotlib/src/_backend_agg.cpp 2008-05-29 16:44:49 UTC (rev 5303)
@@ -679,8 +679,11 @@
typedef agg::span_allocator<agg::rgba8> color_span_alloc_type;
typedef agg::span_interpolator_linear<> interpolator_type;
typedef agg::image_accessor_clip<agg::pixfmt_gray8> image_accessor_type;
- typedef agg::span_image_filter_gray_2x2<image_accessor_type, interpolator_type>
+ //typedef agg::span_image_filter_gray_2x2<image_accessor_type, interpolator_type>
+ // image_span_gen_type;
+ typedef agg::span_image_filter_gray<image_accessor_type, interpolator_type>
image_span_gen_type;
+
typedef font_to_rgba<image_span_gen_type> span_gen_type;
typedef agg::renderer_scanline_aa<renderer_base, color_span_alloc_type, span_gen_type>
renderer_type;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-05-29 20:29:55
|
Revision: 5308
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5308&view=rev
Author: jdh2358
Date: 2008-05-29 13:29:54 -0700 (Thu, 29 May 2008)
Log Message:
-----------
Merged revisions 5304-5306 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint
........
r5304 | jdh2358 | 2008-05-29 13:25:15 -0500 (Thu, 29 May 2008) | 1 line
added clippath support for ps
........
r5305 | jdh2358 | 2008-05-29 13:25:58 -0500 (Thu, 29 May 2008) | 1 line
added clippath support for ps
........
r5306 | jdh2358 | 2008-05-29 15:17:32 -0500 (Thu, 29 May 2008) | 1 line
imread via pil now returns lumininance or rgb if possible
........
Modified Paths:
--------------
trunk/matplotlib/API_CHANGES
trunk/matplotlib/CHANGELOG
trunk/matplotlib/examples/pylab/image_demo3.py
trunk/matplotlib/lib/matplotlib/image.py
Property Changed:
----------------
trunk/matplotlib/
Property changes on: trunk/matplotlib
___________________________________________________________________
Name: svnmerge-integrated
- /branches/v0_91_maint:1-5299
+ /branches/v0_91_maint:1-5307
Modified: trunk/matplotlib/API_CHANGES
===================================================================
--- trunk/matplotlib/API_CHANGES 2008-05-29 20:18:41 UTC (rev 5307)
+++ trunk/matplotlib/API_CHANGES 2008-05-29 20:29:54 UTC (rev 5308)
@@ -1,4 +1,8 @@
+ 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.
+
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
@@ -197,6 +201,9 @@
END OF TRANSFORMS REFACTORING
+
+
+
0.91.2 Released
For csv2rec, checkrows=0 is the new default indicating all rows
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-05-29 20:18:41 UTC (rev 5307)
+++ trunk/matplotlib/CHANGELOG 2008-05-29 20:29:54 UTC (rev 5308)
@@ -1,3 +1,10 @@
+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
Modified: trunk/matplotlib/examples/pylab/image_demo3.py
===================================================================
--- trunk/matplotlib/examples/pylab/image_demo3.py 2008-05-29 20:18:41 UTC (rev 5307)
+++ trunk/matplotlib/examples/pylab/image_demo3.py 2008-05-29 20:29:54 UTC (rev 5308)
@@ -3,14 +3,15 @@
try:
import Image
except ImportError, exc:
- raise SystemExit("PIL must be loaded to run this example")
+ raise SystemExit("PIL must be installed to run this example")
lena = Image.open('../data/lena.jpg')
dpi = rcParams['figure.dpi']
figsize = lena.size[0]/dpi, lena.size[1]/dpi
figure(figsize=figsize)
-
+ax = axes([0,0,1,1], frameon=False)
+ax.set_axis_off()
im = imshow(lena, origin='lower')
#savefig('image_demo3')
Modified: trunk/matplotlib/lib/matplotlib/image.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/image.py 2008-05-29 20:18:41 UTC (rev 5307)
+++ trunk/matplotlib/lib/matplotlib/image.py 2008-05-29 20:29:54 UTC (rev 5308)
@@ -650,11 +650,15 @@
"""
return image file in fname as numpy array
- Return value is a MxNx4 array of 0-1 normalized floats
+ return value is a numpy array. For grayscale images, the return
+ array is MxN. For RGB images, the return value is MxNx3. For
+ RGBA images the return value is MxNx4
matplotlib can only read PNGs natively, but if PIL is installed,
- it will use it to load the image and return an RGBA if possible
+ it will use it to load the image and return an array (if possible)
which can be used with imshow
+
+ TODO: support RGB and grayscale return values in _image.readpng
"""
def pilread():
@@ -682,15 +686,39 @@
def pil_to_array( pilImage ):
+ """
+ load a PIL image and return it as a numpy array of uint8. For
+ grayscale images, the return array is MxN. For RGB images, the
+ return value is MxNx3. For RGBA images the return value is MxNx4
+ """
+ def toarray(im)
+ 'return a 1D array of floats'
+ x_str = im.tostring('raw',im.mode,0,-1)
+ x = np.fromstring(x_str,np.uint8)
+ return x
+
if pilImage.mode in ('RGBA', 'RGBX'):
- im = pilImage # no need to convert images in rgba format
+ im = pilImage # no need to convert images
+ elif pilImage.mode=='L':
+ im = pilImage # no need to luminance images
+ # return MxN luminance array
+ x = toarray(im)
+ x.shape = im.size[1], im.size[0]
+ return x
+ elif pilImage.mode=='RGB':
+ #return MxNx3 RGB array
+ im = pilImage # no need to RGB images
+ x = toarray(im)
+ x.shape = im.size[1], im.size[0], 3
+ return x
+
else: # try to convert to an rgba image
try:
im = pilImage.convert('RGBA')
except ValueError:
raise RuntimeError('Unknown image mode')
- x_str = im.tostring('raw',im.mode,0,-1)
- x = np.fromstring(x_str,np.uint8)
+ # return MxNx4 RGBA array
+ x = toarray(im)
x.shape = im.size[1], im.size[0], 4
return x
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cm...@us...> - 2008-05-30 03:09:55
|
Revision: 5314
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5314&view=rev
Author: cmoad
Date: 2008-05-29 20:09:53 -0700 (Thu, 29 May 2008)
Log Message:
-----------
new release prep
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/MANIFEST.in
trunk/matplotlib/lib/matplotlib/__init__.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-05-30 03:07:39 UTC (rev 5313)
+++ trunk/matplotlib/CHANGELOG 2008-05-30 03:09:53 UTC (rev 5314)
@@ -1,3 +1,6 @@
+===============================================================
+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
Modified: trunk/matplotlib/MANIFEST.in
===================================================================
--- trunk/matplotlib/MANIFEST.in 2008-05-30 03:07:39 UTC (rev 5313)
+++ trunk/matplotlib/MANIFEST.in 2008-05-30 03:09:53 UTC (rev 5314)
@@ -18,7 +18,7 @@
prune examples/_tmp_*
recursive-include src *.cpp *.c *.h
recursive-include CXX *.cxx *.hxx *.c *.h
-recursive-include agg23 *
+recursive-include agg24 *
recursive-include lib *
recursive-include swig *
recursive-include ttconv *.cpp *.h
Modified: trunk/matplotlib/lib/matplotlib/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/__init__.py 2008-05-30 03:07:39 UTC (rev 5313)
+++ trunk/matplotlib/lib/matplotlib/__init__.py 2008-05-30 03:09:53 UTC (rev 5314)
@@ -55,7 +55,7 @@
"""
from __future__ import generators
-__version__ = '0.98pre'
+__version__ = '0.98.0'
__revision__ = '$Revision$'
__date__ = '$Date$'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-05-30 19:38:43
|
Revision: 5333
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5333&view=rev
Author: jdh2358
Date: 2008-05-30 12:38:42 -0700 (Fri, 30 May 2008)
Log Message:
-----------
Merged revisions 5312-5313,5329 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint
........
r5312 | cmoad | 2008-05-29 15:59:43 -0700 (Thu, 29 May 2008) | 1 line
tagging new version
........
r5313 | cmoad | 2008-05-29 20:07:39 -0700 (Thu, 29 May 2008) | 1 line
minor rev bump
........
r5329 | jdh2358 | 2008-05-30 12:21:56 -0700 (Fri, 30 May 2008) | 1 line
added support for None for dvipng and removed the sqrt in the hack which I think is wrong
........
Modified Paths:
--------------
trunk/matplotlib/MIGRATION.txt
trunk/matplotlib/lib/matplotlib/rcsetup.py
trunk/matplotlib/lib/matplotlib/texmanager.py
trunk/matplotlib/matplotlibrc.template
Property Changed:
----------------
trunk/matplotlib/
Property changes on: trunk/matplotlib
___________________________________________________________________
Name: svnmerge-integrated
- /branches/v0_91_maint:1-5307
+ /branches/v0_91_maint:1-5330
Modified: trunk/matplotlib/MIGRATION.txt
===================================================================
--- trunk/matplotlib/MIGRATION.txt 2008-05-30 19:29:09 UTC (rev 5332)
+++ trunk/matplotlib/MIGRATION.txt 2008-05-30 19:38:42 UTC (rev 5333)
@@ -31,7 +31,7 @@
If you already have a working copy of the trunk, your next "svn up" will
include the latest transforms changes.
-Before installing, make sure you completely remove the old matplotlib
+IMPORTANT: Before installing, make sure you completely remove the old matplotlib
build and install directories, eg:
> cd matplotlib
Modified: trunk/matplotlib/lib/matplotlib/rcsetup.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/rcsetup.py 2008-05-30 19:29:09 UTC (rev 5332)
+++ trunk/matplotlib/lib/matplotlib/rcsetup.py 2008-05-30 19:38:42 UTC (rev 5333)
@@ -43,6 +43,16 @@
else:
raise ValueError('Could not convert "%s" to boolean' % b)
+def validate_bool_maybe_none(b):
+ 'Convert b to a boolean or raise'
+ if type(b) is str:
+ b = b.lower()
+ if b=='none': return None
+ if b in ('t', 'y', 'yes', 'on', 'true', '1', 1, True): return True
+ elif b in ('f', 'n', 'no', 'off', 'false', '0', 0, False): return False
+ else:
+ raise ValueError('Could not convert "%s" to boolean' % b)
+
def validate_float(s):
'convert s to float or raise'
try: return float(s)
@@ -338,7 +348,7 @@
'text.usetex' : [False, validate_bool],
'text.latex.unicode' : [False, validate_bool],
'text.latex.preamble' : [[''], validate_stringlist],
- 'text.dvipnghack' : [False, validate_bool],
+ 'text.dvipnghack' : [None, validate_bool_maybe_none],
'text.fontstyle' : ['normal', str],
'text.fontangle' : ['normal', str],
'text.fontvariant' : ['normal', str],
Modified: trunk/matplotlib/lib/matplotlib/texmanager.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/texmanager.py 2008-05-30 19:29:09 UTC (rev 5332)
+++ trunk/matplotlib/lib/matplotlib/texmanager.py 2008-05-30 19:38:42 UTC (rev 5333)
@@ -366,7 +366,12 @@
pngfile = self.make_png(tex, fontsize, dpi)
X = readpng(os.path.join(self.texcache, pngfile))
- if self._dvipng_hack_alpha or rcParams['text.dvipnghack']:
+ if rcParams['text.dvipnghack'] is not None:
+ hack = rcParams['text.dvipnghack']
+ else:
+ hack = self._dvipng_hack_alpha
+ print 'using hack', hack
+ if hack:
# hack the alpha channel
# dvipng assumed a constant background, whereas we want to
# overlay these rasters with antialiasing over arbitrary
@@ -388,7 +393,8 @@
#
# Since the foreground is black (0) and the background is
# white (1) this reduces to red = 1-alpha or alpha = 1-red
- alpha = np.sqrt(1-X[:,:,0])
+ #alpha = npy.sqrt(1-X[:,:,0]) # should this be sqrt here?
+ alpha = 1-X[:,:,0]
else:
alpha = X[:,:,-1]
Modified: trunk/matplotlib/matplotlibrc.template
===================================================================
--- trunk/matplotlib/matplotlibrc.template 2008-05-30 19:29:09 UTC (rev 5332)
+++ trunk/matplotlib/matplotlibrc.template 2008-05-30 19:38:42 UTC (rev 5333)
@@ -147,9 +147,14 @@
# beware of package collisions: color, geometry, graphicx,
# type1cm, textcomp. Adobe Postscript (PSSNFS) font packages
# may also be loaded, depending on your font settings
-#text.dvipnghack : False # some versions of dvipng don't handle
- # alpha channel properly. Use True to correct and flush
- # ~/.matplotlib/tex.cache before testing
+
+#text.dvipnghack : None # some versions of dvipng don't handle alpha
+ # channel properly. Use True to correct
+ # and flush ~/.matplotlib/tex.cache
+ # before testing and False to force
+ # correction off. None will try and
+ # guess based on your dvipng version
+
#text.markup : 'plain' # Affects how text, such as titles and labels, are
# interpreted by default.
# 'plain': As plain, unformatted text
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-05-30 19:39:38
|
Revision: 5335
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5335&view=rev
Author: jdh2358
Date: 2008-05-30 12:39:37 -0700 (Fri, 30 May 2008)
Log Message:
-----------
Merged revisions 5334 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint
........
r5334 | jdh2358 | 2008-05-30 12:38:58 -0700 (Fri, 30 May 2008) | 1 line
removed debug print statement
........
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/texmanager.py
Property Changed:
----------------
trunk/matplotlib/
Property changes on: trunk/matplotlib
___________________________________________________________________
Name: svnmerge-integrated
- /branches/v0_91_maint:1-5330
+ /branches/v0_91_maint:1-5334
Modified: trunk/matplotlib/lib/matplotlib/texmanager.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/texmanager.py 2008-05-30 19:38:58 UTC (rev 5334)
+++ trunk/matplotlib/lib/matplotlib/texmanager.py 2008-05-30 19:39:37 UTC (rev 5335)
@@ -370,7 +370,7 @@
hack = rcParams['text.dvipnghack']
else:
hack = self._dvipng_hack_alpha
- print 'using hack', hack
+
if hack:
# hack the alpha channel
# dvipng assumed a constant background, whereas we want to
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ds...@us...> - 2008-06-01 00:41:56
|
Revision: 5346
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5346&view=rev
Author: dsdale
Date: 2008-05-31 17:41:54 -0700 (Sat, 31 May 2008)
Log Message:
-----------
work on converting docstrings to restructured text
Modified Paths:
--------------
trunk/matplotlib/doc/api/index.rst
trunk/matplotlib/lib/matplotlib/artist.py
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/backend_bases.py
trunk/matplotlib/lib/matplotlib/colorbar.py
trunk/matplotlib/lib/matplotlib/contour.py
trunk/matplotlib/lib/matplotlib/figure.py
trunk/matplotlib/lib/matplotlib/patches.py
trunk/matplotlib/lib/matplotlib/pyplot.py
Added Paths:
-----------
trunk/matplotlib/doc/api/pyplot_api.rst
Modified: trunk/matplotlib/doc/api/index.rst
===================================================================
--- trunk/matplotlib/doc/api/index.rst 2008-05-31 14:30:09 UTC (rev 5345)
+++ trunk/matplotlib/doc/api/index.rst 2008-06-01 00:41:54 UTC (rev 5346)
@@ -12,4 +12,5 @@
.. toctree::
artist_api.rst
+ pyplot_api.rst
Added: trunk/matplotlib/doc/api/pyplot_api.rst
===================================================================
--- trunk/matplotlib/doc/api/pyplot_api.rst (rev 0)
+++ trunk/matplotlib/doc/api/pyplot_api.rst 2008-06-01 00:41:54 UTC (rev 5346)
@@ -0,0 +1,9 @@
+*****************
+matplotlib pyplot
+*****************
+
+:mod:`matplotlib.pyplot`
+=============================
+
+.. automodule:: matplotlib.pyplot
+ :members:
\ No newline at end of file
Modified: trunk/matplotlib/lib/matplotlib/artist.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/artist.py 2008-05-31 14:30:09 UTC (rev 5345)
+++ trunk/matplotlib/lib/matplotlib/artist.py 2008-06-01 00:41:54 UTC (rev 5346)
@@ -617,6 +617,28 @@
attrs.sort()
lines = []
+ ########
+ names = [self.aliased_name(prop) for prop in attrs]
+ accepts = [self.get_valid_values(prop) for prop in attrs]
+
+ col0_len = max([len(n) for n in names])
+ col1_len = max([len(a) for a in accepts])
+ table_formatstr = pad + '='*col0_len + ' ' + '='*col1_len
+
+ lines.append('')
+ lines.append(table_formatstr)
+ lines.append(pad + 'Property'.ljust(col0_len+3) + \
+ 'Description'.ljust(col1_len))
+ lines.append(table_formatstr)
+
+ lines.extend([pad + n.ljust(col0_len+3) + a.ljust(col1_len)
+ for n, a in zip(names, accepts)])
+
+ lines.append(table_formatstr)
+ lines.append('')
+ return lines
+ ########
+
for prop in attrs:
accepts = self.get_valid_values(prop)
name = self.aliased_name(prop)
@@ -757,7 +779,7 @@
return [x for x in flatten(ret)]
def kwdoc(a):
- return '\n'.join(ArtistInspector(a).pprint_setters(leadingspace=4))
+ return '\n'.join(ArtistInspector(a).pprint_setters(leadingspace=2))
kwdocd = dict()
kwdocd['Artist'] = kwdoc(Artist)
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-05-31 14:30:09 UTC (rev 5345)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-06-01 00:41:54 UTC (rev 5346)
@@ -70,11 +70,11 @@
"""
Process a matlab(TM) style color/line style format string. Return a
linestyle, color tuple as a result of the processing. Default
- values are ('-', 'b'). Example format strings include
+ values are ('-', 'b'). Example format strings include:
- 'ko' : black circles
- '.b' : blue dots
- 'r--' : red dashed lines
+ * 'ko': black circles
+ * '.b': blue dots
+ * 'r--': red dashed lines
See Line2D.lineStyles and GraphicsContext.colors for all possible
styles and color format string.
@@ -151,7 +151,7 @@
"""
Process variable length arguments to the plot command, so that
- plot commands like the following are supported
+ plot commands like the following are supported::
plot(t, s)
plot(t1, s1, t2, s2)
@@ -462,38 +462,45 @@
**kwargs
):
"""
- Build an Axes instance in Figure with
- rect=[left, bottom, width,height in Figure coords
+ Build an Axes instance in Figure fig with
+ rect=[left, bottom, width, height] in Figure coords
- adjustable: ['box' | 'datalim']
- alpha: the alpha transparency
- anchor: ['C', 'SW', 'S', 'SE', 'E', 'NE', 'N', 'NW', 'W']
- aspect: ['auto' | 'equal' | aspect_ratio]
- autoscale_on: boolean - whether or not to autoscale the viewlim
- axis_bgcolor: any matplotlib color - see help(colors)
- axisbelow: draw the grids and ticks below the other artists
- cursor_props: a (float, color) tuple
- figure: a Figure instance
- frame_on: a boolean - draw the axes frame
- label: the axes label
- navigate: True|False
- navigate_mode: the navigation toolbar button status: 'PAN', 'ZOOM', or None
- position: [left, bottom, width,height in Figure coords
- sharex: an Axes instance to share the x-axis with
- sharey: an Axes instance to share the y-axis with
- title: the title string
- visible: a boolean - whether the axes is visible
- xlabel: the xlabel
- xlim: (xmin, xmax) view limits
- xscale: [%(scale)s]
- xticklabels: sequence of strings
- xticks: sequence of floats
- ylabel: the ylabel strings
- ylim: (ymin, ymax) view limits
- yscale: [%(scale)s]
- yticklabels: sequence of strings
- yticks: sequence of floats
+ Optional keyword arguments:
+ ============== ====================================================
+ Keyword Description
+ ============== ====================================================
+ adjustable [ 'box' | 'datalim' ]
+ alpha float: the alpha transparency
+ anchor [ 'C', 'SW', 'S', 'SE', 'E', 'NE', 'N', 'NW', 'W' ]
+ aspect [ 'auto' | 'equal' | aspect_ratio ]
+ autoscale_on [ True | False ] whether or not to autoscale the
+ viewlim
+ axis_bgcolor any matplotlib color - see help(colors)
+ axisbelow draw the grids and ticks below the other artists
+ cursor_props a (float, color) tuple
+ figure a Figure instance
+ frame_on a boolean - draw the axes frame
+ label the axes label
+ navigate [ True | False ]
+ navigate_mode [ 'PAN' | 'ZOOM' | None ] the navigation toolbar
+ button status
+ position [left, bottom, width, height] in Figure coords
+ sharex an Axes instance to share the x-axis with
+ sharey an Axes instance to share the y-axis with
+ title the title string
+ visible [ True | False ] whether the axes is visible
+ xlabel the xlabel
+ xlim (xmin, xmax) view limits
+ xscale [%(scale)s]
+ xticklabels sequence of strings
+ xticks sequence of floats
+ ylabel the ylabel strings
+ ylim (ymin, ymax) view limits
+ yscale [%(scale)s]
+ yticklabels sequence of strings
+ yticks sequence of floats
+ ============== ====================================================
""" % {'scale': ' | '.join([repr(x) for x in mscale.get_scale_names()])}
martist.Artist.__init__(self)
if isinstance(rect, mtransforms.Bbox):
@@ -561,7 +568,7 @@
"""
Set the Axes figure
- ACCEPTS: a Figure instance
+ accepts a Figure instance
"""
martist.Artist.set_figure(self, fig)
@@ -618,7 +625,7 @@
will add the given amount of padding (in points) between the
axes and the label. The x-direction is in data coordinates
and the y-direction is in axis coordinates. Returns a 3-tuple
- of the form:
+ of the form::
(transform, valign, halign)
@@ -639,7 +646,7 @@
labels, which will add the given amount of padding (in points)
between the axes and the label. The x-direction is in data
coordinates and the y-direction is in axis coordinates.
- Returns a 3-tuple of the form:
+ Returns a 3-tuple of the form::
(transform, valign, halign)
@@ -672,7 +679,7 @@
will add the given amount of padding (in points) between the
axes and the label. The x-direction is in axis coordinates
and the y-direction is in data coordinates. Returns a 3-tuple
- of the form:
+ of the form::
(transform, valign, halign)
@@ -693,7 +700,7 @@
labels, which will add the given amount of padding (in points)
between the axes and the label. The x-direction is in axis
coordinates and the y-direction is in data coordinates.
- Returns a 3-tuple of the form:
+ Returns a 3-tuple of the form::
(transform, valign, halign)
@@ -733,11 +740,19 @@
used, but which may be modified by apply_aspect, and a second
which is the starting point for apply_aspect.
- which = 'active' to change the first;
- 'original' to change the second;
- 'both' to change both
+ Required arguments:
+ pos:
+ len(4) sequence of floats, or a Bbox object
- ACCEPTS: len(4) sequence of floats, or a Bbox object
+ Optional keyword arguments:
+ which:
+
+ ========== ====================
+ 'active' to change the first
+ 'original' to change the second
+ 'both' to change both
+ ========== ====================
+
"""
if not isinstance(pos, mtransforms.BboxBase):
pos = mtransforms.Bbox.from_bounds(*pos)
@@ -864,17 +879,23 @@
def hold(self, b=None):
"""
- HOLD(b=None)
+ call signature::
+ hold(b=None)
+
Set the hold state. If hold is None (default), toggle the
hold state. Else set the hold state to boolean value b.
- Eg
- hold() # toggle hold
- hold(True) # hold is on
- hold(False) # hold is off
+ Examples:
+ * toggle hold:
+ >>> hold()
+ * turn hold on:
+ >>> hold(True)
+ * turn hold off
+ >>> hold(False)
+
When hold is True, subsequent plot commands will be added to
the current axes. When hold is False, the current axes and
figure will be cleared on the next plot command
@@ -891,25 +912,33 @@
def set_aspect(self, aspect, adjustable=None, anchor=None):
"""
aspect:
- 'auto' - automatic; fill position rectangle with data
- 'normal' - same as 'auto'; deprecated
- 'equal' - same scaling from data to plot units for x and y
- num - a circle will be stretched such that the height
- is num times the width. aspect=1 is the same as
- aspect='equal'.
+ ======== ================================================
+ 'auto' automatic; fill position rectangle with data
+ 'normal' same as 'auto'; deprecated
+ 'equal' same scaling from data to plot units for x and y
+ num a circle will be stretched such that the height
+ is num times the width. aspect=1 is the same as
+ aspect='equal'.
+ ======== ================================================
+
adjustable:
- 'box' - change physical size of axes
- 'datalim' - change xlim or ylim
+ ======== ============================
+ 'box' change physical size of axes
+ 'datalim' change xlim or ylim
+ ======== ============================
+
anchor:
- 'C' - centered
- 'SW' - lower left corner
- 'S' - middle of bottom edge
- 'SE' - lower right corner
- etc.
- ACCEPTS: ['auto' | 'equal' | aspect_ratio]
+ ==== =====================
+ 'C' centered
+ 'SW' lower left corner
+ 'S' middle of bottom edge
+ 'SE' lower right corner
+ etc.
+ ==== =====================
+
"""
if aspect in ('normal', 'auto'):
self._aspect = 'auto'
@@ -940,7 +969,20 @@
def set_anchor(self, anchor):
"""
- ACCEPTS: ['C', 'SW', 'S', 'SE', 'E', 'NE', 'N', 'NW', 'W']
+ anchor:
+
+ ==== ============
+ 'C' Center
+ 'SW' bottom left
+ 'S' bottom
+ 'SE' bottom right
+ 'E' right
+ 'NE' top right
+ 'N' top
+ 'NW' top left
+ 'W' left
+ ==== ============
+
"""
if anchor in mtransforms.Bbox.coefs.keys() or len(anchor) == 2:
self._anchor = anchor
@@ -1325,7 +1367,7 @@
"""
Set whether autoscaling is applied on plot commands
- ACCEPTS: True|False
+ accepts: True|False
"""
self._autoscaleon = b
@@ -1518,14 +1560,17 @@
def grid(self, b=None, **kwargs):
"""
- GRID(self, b=None, **kwargs)
+ call signature::
+
+ grid(self, b=None, **kwargs)
+
Set the axes grids on or off; b is a boolean
if b is None and len(kwargs)==0, toggle the grid state. if
kwargs are supplied, it is assumed that you want a grid and b
is thus set to True
- kawrgs are used to set the grid line properties, eg
+ kawrgs are used to set the grid line properties, eg::
ax.grid(color='r', linestyle='-', linewidth=2)
@@ -1542,11 +1587,16 @@
Convenience method for manipulating the ScalarFormatter
used by default for linear axes.
- kwargs:
- style = 'sci' (or 'scientific') or 'plain';
- plain turns off scientific notation
- axis = 'x', 'y', or 'both'
+ Optional keyword arguments:
+ ======= =====================================
+ Keyword Description
+ ======= =====================================
+ style [ 'sci' (or 'scientific') | 'plain' ]
+ plain turns off scientific notation
+ axis [ 'x' | 'y' | 'both' ]
+ ======= =====================================
+
Only the major ticks are affected.
If the method is called when the ScalarFormatter is not
the one being used, an AttributeError will be raised with
@@ -1577,19 +1627,11 @@
self.yaxis.major.formatter.set_scientific(sb)
def set_axis_off(self):
- """
- turn off the axis
-
- ACCEPTS: void
- """
+ """turn off the axis"""
self.axison = False
def set_axis_on(self):
- """
- turn on the axis
-
- ACCEPTS: void
- """
+ """turn on the axis"""
self.axison = True
def get_axis_bgcolor(self):
@@ -1619,7 +1661,12 @@
return right < left
def get_xbound(self):
- "Returns the x-axis numerical bounds in the form of lowerBound < upperBound"
+ """
+ Returns the x-axis numerical bounds where::
+
+ lowerBound < upperBound
+
+ """
left, right = self.get_xlim()
if left < right:
return left, right
@@ -1627,9 +1674,10 @@
return right, left
def set_xbound(self, lower=None, upper=None):
- """Set the lower and upper numerical bounds of the x-axis.
- This method will honor axes inversion regardless of parameter order.
"""
+ Set the lower and upper numerical bounds of the x-axis.
+ This method will honor axes inversion regardless of parameter order.
+ """
if upper is None and iterable(lower):
lower,upper = lower
@@ -1657,24 +1705,31 @@
def set_xlim(self, xmin=None, xmax=None, emit=True, **kwargs):
"""
- set_xlim(self, *args, **kwargs):
+ call signature::
- Set the limits for the xaxis; v = [xmin, xmax]
+ set_xlim(self, *args, **kwargs)
- set_xlim((valmin, valmax))
- set_xlim(valmin, valmax)
- set_xlim(xmin=1) # xmax unchanged
- set_xlim(xmax=1) # xmin unchanged
+ Set the limits for the xaxis
- Valid kwargs:
+ Returns the current xlimits as a length 2 tuple: [xmin, xmax]
- xmin : the min of the xlim
- xmax : the max of the xlim
- emit : notify observers of lim change
+ Examples::
+ set_xlim((valmin, valmax))
+ set_xlim(valmin, valmax)
+ set_xlim(xmin=1) # xmax unchanged
+ set_xlim(xmax=1) # xmin unchanged
- Returns the current xlimits as a length 2 tuple
+ Valid keyword arguments:
+ ======= ==============================
+ Keyword Description
+ ======= ==============================
+ xmin the min of the xlim
+ xmax the max of the xlim
+ emit notify observers of lim change
+ ======= ==============================
+
ACCEPTS: len(2) sequence of floats
"""
if xmax is None and iterable(xmin):
@@ -1714,8 +1769,10 @@
def set_xscale(self, value, **kwargs):
"""
- SET_XSCALE(value)
+ call signature::
+ set_xscale(value)
+
Set the scaling of the x-axis: %(scale)s
ACCEPTS: [%(scale)s]
@@ -2460,8 +2517,10 @@
def axhline(self, y=0, xmin=0, xmax=1, **kwargs):
"""
- AXHLINE(y=0, xmin=0, xmax=1, **kwargs)
+ call signature::
+ axhline(y=0, xmin=0, xmax=1, **kwargs)
+
Axis Horizontal Line
Draw a horizontal line at y from xmin to xmax. With the default
@@ -2474,16 +2533,19 @@
Return value is the Line2D instance. kwargs are the same as kwargs to
plot, and can be used to control the line properties. Eg
- # draw a thick red hline at y=0 that spans the xrange
- axhline(linewidth=4, color='r')
+ * draw a thick red hline at y=0 that spans the xrange
- # draw a default hline at y=1 that spans the xrange
- axhline(y=1)
+ >>> axhline(linewidth=4, color='r')
- # draw a default hline at y=.5 that spans the the middle half of
- # the xrange
- axhline(y=.5, xmin=0.25, xmax=0.75)
+ * draw a default hline at y=1 that spans the xrange
+ >>> axhline(y=1)
+
+ * draw a default hline at y=.5 that spans the the middle half of
+ the xrange
+
+ >>> axhline(y=.5, xmin=0.25, xmax=0.75)
+
Valid kwargs are Line2D properties
%(Line2D)s
"""
@@ -2502,8 +2564,10 @@
def axvline(self, x=0, ymin=0, ymax=1, **kwargs):
"""
- AXVLINE(x=0, ymin=0, ymax=1, **kwargs)
+ call signature::
+ axvline(x=0, ymin=0, ymax=1, **kwargs)
+
Axis Vertical Line
Draw a vertical line at x from ymin to ymax. With the default values
@@ -2516,16 +2580,19 @@
Return value is the Line2D instance. kwargs are the same as
kwargs to plot, and can be used to control the line properties. Eg
- # draw a thick red vline at x=0 that spans the yrange
- l = axvline(linewidth=4, color='r')
+ * draw a thick red vline at x=0 that spans the yrange
- # draw a default vline at x=1 that spans the yrange
- l = axvline(x=1)
+ >>> axvline(linewidth=4, color='r')
- # draw a default vline at x=.5 that spans the the middle half of
- # the yrange
- axvline(x=.5, ymin=0.25, ymax=0.75)
+ * draw a default vline at x=1 that spans the yrange
+ >>> axvline(x=1)
+
+ * draw a default vline at x=.5 that spans the the middle half of
+ the yrange
+
+ >>> axvline(x=.5, ymin=0.25, ymax=0.75)
+
Valid kwargs are Line2D properties
%(Line2D)s
"""
@@ -2544,8 +2611,10 @@
def axhspan(self, ymin, ymax, xmin=0, xmax=1, **kwargs):
"""
- AXHSPAN(ymin, ymax, xmin=0, xmax=1, **kwargs)
+ call signature::
+ axhspan(ymin, ymax, xmin=0, xmax=1, **kwargs)
+
Axis Horizontal Span. ycoords are in data units and x
coords are in axes (relative 0-1) units
@@ -2556,21 +2625,15 @@
0=left, 0.5=middle, 1.0=right but the y location is in data
coordinates.
- kwargs are the kwargs to Patch, eg
+ Return value is the patches.Polygon instance.
- antialiased, aa
- linewidth, lw
- edgecolor, ec
- facecolor, fc
+ Examples:
- the terms on the right are aliases
+ * draw a gray rectangle from y=0.25-0.75 that spans the horizontal
+ extent of the axes
- Return value is the patches.Polygon instance.
+ >>> axhspan(0.25, 0.75, facecolor='0.5', alpha=0.5)
- #draws a gray rectangle from y=0.25-0.75 that spans the horizontal
- #extent of the axes
- axhspan(0.25, 0.75, facecolor='0.5', alpha=0.5)
-
Valid kwargs are Polygon properties
%(Polygon)s
"""
@@ -2586,9 +2649,11 @@
def axvspan(self, xmin, xmax, ymin=0, ymax=1, **kwargs):
"""
- AXVSPAN(xmin, xmax, ymin=0, ymax=1, **kwargs)
+ call signature::
- axvspan : Axis Vertical Span. xcoords are in data units and y coords
+ axvspan(xmin, xmax, ymin=0, ymax=1, **kwargs)
+
+ Axis Vertical Span. xcoords are in data units and y coords
are in axes (relative 0-1) units
Draw a vertical span (regtangle) from xmin to xmax. With the default
@@ -2597,22 +2662,16 @@
command. That is, the vertical extent is in axes coords: 0=bottom,
0.5=middle, 1.0=top but the y location is in data coordinates.
- kwargs are the kwargs to Patch, eg
+ return value is the patches.Polygon instance.
- antialiased, aa
- linewidth, lw
- edgecolor, ec
- facecolor, fc
+ Examples:
- the terms on the right are aliases
+ * draw a vertical green translucent rectangle from x=1.25 to 1.55 that
+ spans the yrange of the axes
- return value is the patches.Polygon instance.
+ >>> axvspan(1.25, 1.55, facecolor='g', alpha=0.5)
- # draw a vertical green translucent rectangle from x=1.25 to 1.55 that
- # spans the yrange of the axes
- axvspan(1.25, 1.55, facecolor='g', alpha=0.5)
-
- Valid kwargs are Polygon properties
+ Valid kwargs are Polygon properties:
%(Polygon)s
"""
# convert x axis units
@@ -2629,19 +2688,33 @@
def hlines(self, y, xmin, xmax, colors='k', linestyles='solid',
label='', **kwargs):
"""
- HLINES(y, xmin, xmax, colors='k', linestyle='solid', **kwargs)
+ call signature::
- plot horizontal lines at each y from xmin to xmax. xmin or xmax can
- be scalars or len(x) numpy arrays. If they are scalars, then the
- respective values are constant, else the widths of the lines are
- determined by xmin and xmax
+ hlines(y, xmin, xmax, colors='k', linestyle='solid', **kwargs)
- colors is a line collections color args, either a single color
- or a len(x) list of colors
+ plot horizontal lines at each y from xmin to xmax.
- linestyle is one of solid|dashed|dashdot|dotted
+ Returns the LineCollection that was added
- Returns the LineCollection that was added
+ Required arguments:
+
+ y:
+ a 1-D numpy array or iterable.
+
+ xmin and xmax:
+ can be scalars or len(x) numpy arrays. If they are scalars, then
+ the respective values are constant, else the widths of the lines
+ are determined by xmin and xmax
+
+ Optional keyword arguments:
+
+ colors:
+ a line collections color argument, either a single color
+ or a len(y) list of colors
+
+ linestyle:
+ [ 'solid' | 'dashed' | 'dashdot' | 'dotted' ]
+
"""
if kwargs.get('fmt') is not None:
raise DeprecationWarning(
@@ -3290,13 +3363,15 @@
**kwargs
):
"""
- BAR(left, height, width=0.8, bottom=0,
- color=None, edgecolor=None, linewidth=None,
- yerr=None, xerr=None, ecolor=None, capsize=3,
- align='edge', orientation='vertical', log=False)
+ call signature::
- Make a bar plot with rectangles bounded by
+ bar(left, height, width=0.8, bottom=0,
+ color=None, edgecolor=None, linewidth=None,
+ yerr=None, xerr=None, ecolor=None, capsize=3,
+ align='edge', orientation='vertical', log=False)
+ Make a bar plot with rectangles bounded by:
+
left, left+width, bottom, bottom+height
(left, right, bottom and top edges)
@@ -3304,38 +3379,37 @@
Return value is a list of Rectangle patch instances
- left - the x coordinates of the left sides of the bars
+ Required arguments:
- height - the heights of the bars
+ ======== ===============================================
+ Argument Description
+ ======== ===============================================
+ left the x coordinates of the left sides of the bars
+ height the heights of the bars
+ ======== ===============================================
- Optional arguments:
+ Optional keyword arguments:
- width - the widths of the bars
+ ============= ===================================================
+ Keyword Description
+ ============= ===================================================
+ width the widths of the bars
+ bottom the y coordinates of the bottom edges of the bars
+ color the colors of the bars
+ edgecolor the colors of the bar edges
+ linewidth width of bar edges; None means use default
+ linewidth; 0 means don't draw edges.
+ xerr and yerr if not None, will be used to generate errorbars
+ on the bar chart
+ ecolor specifies the color of any errorbar
+ capsize (default 3) determines the length in points of the
+ error bar caps
+ align 'edge' (default) | 'center'
+ orientation 'vertical' | 'horizontal'
+ log [False|True] False (default) leaves the orientation
+ axis as-is; True sets it to log scale
+ ============= ===================================================
- bottom - the y coordinates of the bottom edges of the bars
-
- color - the colors of the bars
-
- edgecolor - the colors of the bar edges
-
- linewidth - width of bar edges; None means use default
- linewidth; 0 means don't draw edges.
-
- xerr and yerr, if not None, will be used to generate errorbars
- on the bar chart
-
- ecolor specifies the color of any errorbar
-
- capsize (default 3) determines the length in points of the error
- bar caps
-
- align = 'edge' (default) | 'center'
-
- orientation = 'vertical' | 'horizontal'
-
- log = False | True - False (default) leaves the orientation
- axis as-is; True sets it to log scale
-
For vertical bars, align='edge' aligns bars by their left edges in
left, while 'center' interprets these values as the x coordinates of
the bar centers. For horizontal bars, 'edge' aligns bars by their
@@ -3347,7 +3421,7 @@
This enables you to use bar as the basis for stacked bar charts, or
candlestick plots.
- Optional kwargs:
+ Other optional kwargs:
%(Rectangle)s
"""
if not self._hold: self.cla()
@@ -3536,10 +3610,12 @@
def barh(self, bottom, width, height=0.8, left=None, **kwargs):
"""
- BARH(bottom, width, height=0.8, left=0, **kwargs)
+ call signature::
- Make a horizontal bar plot with rectangles bounded by
+ barh(bottom, width, height=0.8, left=0, **kwargs)
+ Make a horizontal bar plot with rectangles bounded by:
+
left, left+width, bottom, bottom+height
(left, right, bottom and top edges)
@@ -3547,36 +3623,36 @@
Return value is a list of Rectangle patch instances
- bottom - the vertical positions of the bottom edges of the bars
+ Required arguments:
- width - the lengths of the bars
+ ======== ======================================================
+ Argument Description
+ ======== ======================================================
+ bottom the vertical positions of the bottom edges of the bars
+ width the lengths of the bars
+ ======== ========================...
[truncated message content] |
|
From: <ds...@us...> - 2008-06-01 13:15:38
|
Revision: 5349
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5349&view=rev
Author: dsdale
Date: 2008-06-01 06:15:36 -0700 (Sun, 01 Jun 2008)
Log Message:
-----------
do not use column- or row-spanning cells in rest tables.
Such tables can not be converted to latex by sphinx.
Modified Paths:
--------------
trunk/matplotlib/doc/api/pyplot_api.rst
trunk/matplotlib/doc/devel/documenting_mpl.rst
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/contour.py
trunk/matplotlib/lib/matplotlib/lines.py
trunk/matplotlib/lib/matplotlib/pyplot.py
Modified: trunk/matplotlib/doc/api/pyplot_api.rst
===================================================================
--- trunk/matplotlib/doc/api/pyplot_api.rst 2008-06-01 11:07:42 UTC (rev 5348)
+++ trunk/matplotlib/doc/api/pyplot_api.rst 2008-06-01 13:15:36 UTC (rev 5349)
@@ -2,8 +2,9 @@
matplotlib pyplot
*****************
+
:mod:`matplotlib.pyplot`
=============================
.. automodule:: matplotlib.pyplot
- :members: acorr
\ No newline at end of file
+ :members:
\ No newline at end of file
Modified: trunk/matplotlib/doc/devel/documenting_mpl.rst
===================================================================
--- trunk/matplotlib/doc/devel/documenting_mpl.rst 2008-06-01 11:07:42 UTC (rev 5348)
+++ trunk/matplotlib/doc/devel/documenting_mpl.rst 2008-06-01 13:15:36 UTC (rev 5349)
@@ -30,6 +30,9 @@
statement. For example, in the Developers Guide, index.rst lists
coding_guide, which automatically inserts coding_guide.rst.
+Sphinx does not support tables with column- or row-spanning cells for
+latex output. Such tables can not be used when documenting matplotlib.
+
Mathematical expressions can be rendered as png images in html, and in
the usual way by latex. For example:
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-06-01 11:07:42 UTC (rev 5348)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-06-01 13:15:36 UTC (rev 5349)
@@ -3888,7 +3888,7 @@
call signature::
errorbar(x, y, yerr=None, xerr=None,
- fmt='b-', ecolor=None, elinewidth=None, capsize=3,
+ fmt='-', ecolor=None, elinewidth=None, capsize=3,
barsabove=False, lolims=False, uplims=False,
xlolims=False, xuplims=False)
@@ -3901,39 +3901,31 @@
Optional keyword arguments:
- +------------+------------------------------------------------------+
- | Keyword | Description |
- +============+======================================================+
- | xerr | a rank-0 or Nx1 Numpy array yields symmetric |
- | yerr | errorbars +/- value |
- | +------------------------------------------------------+
- | | an N-element list or tuple yields symmetric |
- | | errorbars +/- value |
- | +------------------------------------------------------+
- | | a rank-1, Nx2 Numpy array yields asymmetric |
- | | errorbars: -column1/+column2 |
- +------------+------------------------------------------------------+
- | fmt | the plot format symbol for y. If fmt is None, just |
- | | plot the errorbars with no line symbols. This can |
- | | be useful for creating a bar plot with errorbars |
- +------------+------------------------------------------------------+
- | ecolor | a matplotlib color arg which gives the color the |
- | | errorbar lines; if None, use the marker color. |
- +------------+------------------------------------------------------+
- | elinewidth | the linewidth of the errorbar lines. If None, use |
- | | the linewidth. |
- +------------+------------------------------------------------------+
- | capsize | the size of the error bar caps in points |
- +------------+------------------------------------------------------+
- | barsabove | if True, will plot the errorbars above the plot |
- | | symbols. Default is below. |
- +------------+------------------------------------------------------+
- | lolims | These arguments can be used to indicate that a value |
- | uplims | gives only upper/lower limits. In that case a caret |
- | xlolims | symbol is used to indicate this. lims-arguments may |
- | xuplims | be of the same type as xerr and yerr. |
- +------------+------------------------------------------------------+
+ xerr/yerr: [ scalar | N, Nx1, Nx2 array-like ]
+ If a scalar number, len(N) array-like object, or an Nx1 array-like
+ object, errorbars are drawn +/- value.
+ If a rank-1, Nx2 Numpy array, errorbars are drawn at -column1 and
+ +column2
+ fmt: '-'
+ The plot format symbol for y. If fmt is None, just plot the
+ errorbars with no line symbols. This can be useful for creating a
+ bar plot with errorbars.
+ ecolor: [ None | mpl color ]
+ a matplotlib color arg which gives the color the errorbar lines; if
+ None, use the marker color.
+ elinewidth: scalar
+ the linewidth of the errorbar lines. If None, use the linewidth.
+ capsize: scalar
+ the size of the error bar caps in points
+ barsabove: [ True | False ]
+ if True, will plot the errorbars above the plot symbols. Default is
+ below.
+ lolims/uplims/xlolims/xuplims: [ False | True ]
+ These arguments can be used to indicate that a value gives only
+ upper/lower limits. In that case a caret symbol is used to indicate
+ this. lims-arguments may be of the same type as xerr and yerr.
+
All other keyword arguments are passed on to the plot command for the
markers, so you can add additional key=value pairs to control the
errorbar markers. For example, this code makes big red squares with
@@ -4594,73 +4586,61 @@
Optional keyword arguments:
- +----------+---------------------------------------------------------+
- | Keyword | Description |
- +==========+=========================================================+
- | gridsize | The number of hexagons in the x-direction, default is |
- | | 100. The corresponding number of hexagons in the |
- | | y-direction is chosen such that the hexagons are |
- | | approximately regular. Alternatively, gridsize can be a |
- | | tuple with two elements specifying the number of |
- | | hexagons in the x-direction and the y-direction. |
- +----------+---------------------------------------------------------+
- | bins | If None, no binning is applied; the color of each |
- | | hexagon directly corresponds to its count value. |
- | +---------------------------------------------------------+
- | | If 'log', use a logarithmic scale for the color |
- | | map. Internally, log10(count+1) is used to determine |
- | | the hexagon color. |
- | +---------------------------------------------------------+
- | | If an integer, divide the counts in the specified |
- | | number of bins, and color the hexagons accordingly |
- | +---------------------------------------------------------+
- | | I a sequence of values, the values of the lower bound |
- | | of the bins to be used. |
- +----------+---------------------------------------------------------+
- | xscale | [ 'linear' | 'log' ] |
- | | Use a log10 scale on the horizontal axis. |
- +----------+---------------------------------------------------------+
- | yscale | [ 'linear' | 'log' ] |
- | | Use a log10 scale on the vertical axis. |
- +----------+---------------------------------------------------------+
+ gridsize: [ 100 | integer ]
+ The number of hexagons in the x-direction, default is 100. The
+ corresponding number of hexagons in the y-direction is chosen such
+ that the hexagons are approximately regular. Alternatively,
+ gridsize can be a tuple with two elements specifying the number of
+ hexagons in the x-direction and the y-direction.
+ bins: [ None | 'log' | integer | sequence ]
+ If None, no binning is applied; the color of each hexagon directly
+ corresponds to its count value.
+ If 'log', use a logarithmic scale for the color map. Internally,
+ log10(count+1) is used to determine the hexagon color.
+
+ If an integer, divide the counts in the specified number of bins,
+ and color the hexagons accordingly.
+
+ I a sequence of values, the values of the lower bound of the bins
+ to be used.
+ xscale: [ 'linear' | 'log' ]
+ Use a linear or log10 scale on the horizontal axis.
+ scale: [ 'linear' | 'log' ]
+ Use a linear or log10 scale on the vertical axis.
+
Other keyword arguments controlling color mapping and normalization
arguments:
- ========== ======================================================
- Keyword Description
- ========== ======================================================
- cmap a colors.Colormap instance from cm. defaults to rc
- image.cmap
- norm colors.Normalize instance is used to scale luminance
- data to 0,1.
- vmin/vmax vmin and vmax are used in conjunction with norm to
- normalize luminance data. If either are None, the
- min and max of the color array C is used. Note if you
- pass a norm instance, your settings for vmin and vmax
- will be ignored
- alpha the alpha value for the patches
- linewidths if None, defaults to (lines.linewidth,). Note
- that this is a tuple, and if you set the linewidths
- argument you must set it as a sequence of floats, as
- required by RegularPolyCollection -- see
- collections.RegularPolyCollection for details
- ========== ======================================================
+ cmap: [ None | Colormap ]
+ a colors.Colormap instance from cm. If None, defaults to rc
+ image.cmap.
+ norm: [ None | Normalize ]
+ colors.Normalize instance is used to scale luminance data to 0,1.
+ vmin/vmax: scalar
+ vmin and vmax are used in conjunction with norm to normalize
+ luminance data. If either are None, the min and max of the color
+ array C is used. Note if you pass a norm instance, your settings
+ for vmin and vmax will be ignored.
+ alpha: scalar
+ the alpha value for the patches
+ linewidths: [ None | scalar ]
+ If None, defaults to rc lines.linewidth. Note that this is a tuple,
+ and if you set the linewidths argument you must set it as a
+ sequence of floats, as required by RegularPolyCollection -- see
+ collections.RegularPolyCollection for details.
Other keyword arguments controlling the Collection properties:
- ========== ======================================================
- Keyword Description
- ========== ======================================================
- edgecolors if 'none', draws the edges in the same color as the
- fill color. This is the default, as it avoids
- unsightly unpainted pixels between the hexagons.
+ edgecolors: [ None | mpl color | color sequence ]
+ If 'none', draws the edges in the same color as the fill color.
+ This is the default, as it avoids unsightly unpainted pixels
+ between the hexagons.
- if None, draws the outlines in the default color.
+ If None, draws the outlines in the default color.
- if a matplotlib color arg or sequence of rgba tuples,
- draws the outlines in the specified color.
- ========== ======================================================
+ If a matplotlib color arg or sequence of rgba tuples, draws the
+ outlines in the specified color.
Here are the standard descriptions of all the Collection kwargs:
%(Collection)s
Modified: trunk/matplotlib/lib/matplotlib/contour.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/contour.py 2008-06-01 11:07:42 UTC (rev 5348)
+++ trunk/matplotlib/lib/matplotlib/contour.py 2008-06-01 13:15:36 UTC (rev 5349)
@@ -32,40 +32,37 @@
"""
call signature::
- clabel(CS, **kwargs)
+ clabel(cs, **kwargs)
- adds labels to line contours in CS, where CS is a ContourSet object
+ adds labels to line contours in cs, where cs is a ContourSet object
returned by contour.
- call signature::
+ ::
- clabel(CS, V, **kwargs)
+ clabel(cs, v, **kwargs)
- only labels contours listed in V
+ only labels contours listed in v
Optional keyword arguments:
- +----------+--------------------------------------------------------+
- | Keyword | Description |
- +==========+========================================================+
- | fontsize | See http://matplotlib.sf.net/fonts.html |
- +----------+--------------------------------------------------------+
- | | a tuple of matplotlib color args (string, float, rgb, |
- | | etc). Different labels will be plotted in different |
- | | colors in the order specified |
- | +--------------------------------------------------------+
- | colors | one string color, e.g. colors = 'r' or colors = 'red' |
- | | all labels will be plotted in this color |
- | +--------------------------------------------------------+
- | | None, the color of each label matches the color |
- | | of the corresponding contour |
- +----------+--------------------------------------------------------+
- | inline | controls whether the underlying contour is removed |
- | | (inline = True) or not (False). Default is True |
- +----------+--------------------------------------------------------+
- | fmt | a format string for the label. Default is '%1.3f' |
- +----------+--------------------------------------------------------+
+ fontsize:
+ See http://matplotlib.sf.net/fonts.html
+ colors:
+ if None, the color of each label matches the color of the
+ corresponding contour
+ if one string color, e.g. colors = 'r' or colors = 'red' all labels
+ will be plotted in this color
+
+ if a tuple of matplotlib color args (string, float, rgb, etc),
+ different labels will be plotted in different colors in the order
+ specified
+ inline:
+ controls whether the underlying contour is removed
+ (inline = True) or not (False). Default is True
+ fmt:
+ a format string for the label. Default is '%1.3f'
+
"""
fontsize = kwargs.get('fontsize', None)
inline = kwargs.get('inline', 1)
@@ -384,11 +381,15 @@
User-callable method: clabel
Useful attributes:
- ax - the axes object in which the contours are drawn
- collections - a silent_list of LineCollections or PolyCollections
- levels - contour levels
- layers - same as levels for line contours; half-way between
- levels for filled contours. See _process_colors method.
+ ax:
+ the axes object in which the contours are drawn
+ collections:
+ a silent_list of LineCollections or PolyCollections
+ levels:
+ contour levels
+ layers:
+ same as levels for line contours; half-way between
+ levels for filled contours. See _process_colors method.
"""
@@ -801,108 +802,71 @@
Optional keyword arguments:
- +---------+-----------+----------------------------------------------+
- | Keyword | Default | Description |
- +=========+===========+==============================================+
- | colors | None | a tuple of matplotlib color args (string, |
- | | | float, rgb, etc), different levels will be |
- | | | plotted in different colors in the order |
- | | | specified |
- | | +----------------------------------------------+
- | | | one string color, e.g.: |
- | | | |
- | | | >>> colors = 'r' |
- | | | |
- | | | all levels will be plotted in this color |
- | | +----------------------------------------------+
- | | | if colors is None, the colormap specified by |
- | | | cmap will be used |
- +---------+-----------+----------------------------------------------+
- | alpha | 1.0 | the alpha blending value |
- +---------+-----------+----------------------------------------------+
- | cmap | None | a cm Colormap instance from matplotlib.cm. |
- | | | if cmap is None and colors is None, a |
- | | | default Colormap is used. |
- +---------+-----------+----------------------------------------------+
- | norm | None | a matplotlib.colors.Normalize instance for |
- | | | scaling data values to colors. If norm is |
- | | | None and colors is None, the default linear |
- | | | scaling is used. |
- +---------+-----------+----------------------------------------------+
- | origin | None | [ 'upper' | 'lower' | 'image' | None ] |
- | | | If 'image', the rc value for image.origin |
- | | | will be used. If None, the first value of Z |
- | | | will correspond to the lower left corner, |
- | | | location (0,0). |
- | | | |
- | | | This keyword is not active if X and Y are |
- | | | specified in the call to contour. |
- +---------+-----------+----------------------------------------------+
- | extent | None | (x0,x1,y0,y1) If origin is not None, then |
- | | | extent is interpreted as in imshow: it gives |
- | | | the outer pixel boundaries. In this case, |
- | | | the position of Z[0,0] is the center of the |
- | | | pixel, not a corner. If origin is None, then |
- | | | (x0,y0) is the position of Z[0,0], and |
- | | | (x1,y1) is the position of Z[-1,-1]. |
- | | | |
- | | | This keyword is not active if X and Y are |
- | | | specified in the call to contour. |
- +---------+-----------+----------------------------------------------+
- | locator | None | an instance of a ticker.Locator subclass. |
- | | | If locator is None, the default MaxNLocator |
- | | | is used. The locator is used to determine |
- | | | the contour levels if they are not given |
- | | | explicitly via the V argument. |
- +---------+-----------+----------------------------------------------+
- | extend | 'neither' | ['neither' | 'both' | 'min' | 'max' ] |
- | | | Unless this is 'neither', contour levels are |
- | | | automatically added to one or both ends of |
- | | | the range so that all data are included. |
- | | | These added ranges are then mapped to the |
- | | | special colormap values which default to the |
- | | | ends of the colormap range, but can be set |
- | | | via Colormap.set_under() and |
- | | | Colormap.set_over() methods. |
- +---------+-----------+----------------------------------------------+
+ colors: [ None | string | (mpl_colors) ]
+ If None, the colormap specified by cmap will be used.
- contour only keyword arguments:
+ If a string like 'r' or 'red', all levels will be plotted in this
+ color.
- +------------+---------+---------------------------------------------+
- | Keyword | Default | Description |
- +============+=========+=============================================+
- | linewidths | None | a number: all levels will be plotted with |
- | | | this linewidth, e.g.: |
- | | | |
- | | | >>> linewidths = 0.6 |
- | | | |
- | | +---------------------------------------------+
- | | | a tuple of numbers, e.g.: |
- | | | |
- | | | >>> linewidths = (0.4, 0.8, 1.2) |
- | | | |
- | | | different levels will be plotted with |
- | | | different linewidths in the order specified |
- | | +---------------------------------------------+
- | | | if linewidths is None, the default width in |
- | | | lines.linewidth in matplotlibrc is used |
- +------------+---------+---------------------------------------------+
+ If a tuple of matplotlib color args (string, float, rgb, etc),
+ different levels will be plotted in different colors in the order
+ specified.
+ alpha: float
+ The alpha blending value
+ cmap: [ None | Colormap ]
+ A cm Colormap instance from matplotlib.cm or None. If cmap is None
+ and colors is None, a default Colormap is used.
+ norm: [ None | Normalize ]
+ A matplotlib.colors.Normalize instance for scaling data values to
+ colors. If norm is None and colors is None, the default linear
+ scaling is used.
+ origin: [ None | 'upper' | 'lower' | 'image' ]
+ If None, the first value of Z will correspond to the lower left
+ corner, location (0,0). If 'image', the rc value for image.origin
+ will be used.
+ This keyword is not active if X and Y are specified in the call to
+ contour.
+ extent: [ None | (x0,x1,y0,y1) ]
+ If origin is not None, then extent is interpreted as in imshow: it
+ gives the outer pixel boundaries. In this case, the position of
+ Z[0,0] is the center of the pixel, not a corner. If origin is None,
+ then (x0,y0) is the position of Z[0,0], and (x1,y1) is the position
+ of Z[-1,-1].
+
+ This keyword is not active if X and Y are specified in the call to
+ contour.
+ locator: [ None | ticker.Locator subclass ]
+ If locator is None, the default MaxNLocator is used. The locator is
+ used to determine the contour levels if they are not given
+ explicitly via the V argument.
+ extend: [ 'neither' | 'both' | 'min' | 'max' ]
+ Unless this is 'neither', contour levels are automatically added to
+ one or both ends of the range so that all data are included. These
+ added ranges are then mapped to the special colormap values which
+ default to the ends of the colormap range, but can be set via
+ Colormap.set_under() and Colormap.set_over() methods.
+
contour only keyword arguments:
- +-------------+---------+--------------------------------------------+
- | Keyword | Default | Description |
- +=============+=========+============================================+
- | antialiased | True | [ True | False ] |
- +-------------+---------+--------------------------------------------+
- | nchunk | 0 | 0 for no subdivision of the domain |
- | | | specify a positive integer to divide the |
- | | | domain into subdomains of roughly nchunk |
- | | | by nchunk points. This may never actually |
- | | | be advantageous, so this option may be |
- | | | removed. Chunking introduces artifacts at |
- | | | the chunk boundaries unless antialiased |
- | | | is False |
- +-------------+---------+--------------------------------------------+
+ linewidths: [ None | number | tuple of numbers ]
+ if linewidths is None, the default width in lines.linewidth in
+ matplotlibrc is used
+ If a number, all levels will be plotted with this linewidth.
+
+ If a tuple, different levels will be plotted with different
+ linewidths in the order specified
+
+ contourf only keyword arguments:
+
+ antialiased: [ True | False ]
+ enable antialiasing
+ nchunk: [ 0 | integer ]
+ If 0, no subdivision of the domain. Specify a positive integer to
+ divide the domain into subdomains of roughly nchunk by nchunk
+ points. This may never actually be advantageous, so this option may
+ be removed. Chunking introduces artifacts at the chunk boundaries
+ unless antialiased is False.
+
"""
Modified: trunk/matplotlib/lib/matplotlib/lines.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/lines.py 2008-06-01 11:07:42 UTC (rev 5348)
+++ trunk/matplotlib/lib/matplotlib/lines.py 2008-06-01 13:15:36 UTC (rev 5349)
@@ -214,7 +214,7 @@
linestyle or ls: [ '-' | '--' | '-.' | ':' | 'steps' | 'steps-pre' | 'steps-mid' | 'steps-post' | 'None' | ' ' | '' ]
linewidth or lw: float value in points
lod: [True | False]
- marker: [ '+' | ',' | '.' | '1' | '2' | '3' | '4'
+ marker: [ '+' | ',' | '.' | '1' | '2' | '3' | '4' ]
markeredgecolor or mec: any matplotlib color
markeredgewidth or mew: float value in points (default 5)
markerfacecolor or mfc: any matplotlib color
Modified: trunk/matplotlib/lib/matplotlib/pyplot.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/pyplot.py 2008-06-01 11:07:42 UTC (rev 5348)
+++ trunk...
[truncated message content] |
|
From: <ds...@us...> - 2008-06-01 21:36:56
|
Revision: 5351
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5351&view=rev
Author: dsdale
Date: 2008-06-01 14:36:50 -0700 (Sun, 01 Jun 2008)
Log Message:
-----------
continue conversion of docstrings to restructured text
Modified Paths:
--------------
trunk/matplotlib/boilerplate.py
trunk/matplotlib/lib/matplotlib/__init__.py
trunk/matplotlib/lib/matplotlib/artist.py
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/figure.py
trunk/matplotlib/lib/matplotlib/pyplot.py
trunk/matplotlib/lib/matplotlib/quiver.py
Modified: trunk/matplotlib/boilerplate.py
===================================================================
--- trunk/matplotlib/boilerplate.py 2008-06-01 15:37:48 UTC (rev 5350)
+++ trunk/matplotlib/boilerplate.py 2008-06-01 21:36:50 UTC (rev 5351)
@@ -28,6 +28,7 @@
return ret
if Axes.%(func)s.__doc__ is not None:
%(func)s.__doc__ = dedent(Axes.%(func)s.__doc__) + \"\"\"
+
Additional kwargs: hold = [True|False] overrides default hold state\"\"\"
"""
Modified: trunk/matplotlib/lib/matplotlib/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/__init__.py 2008-06-01 15:37:48 UTC (rev 5350)
+++ trunk/matplotlib/lib/matplotlib/__init__.py 2008-06-01 21:36:50 UTC (rev 5351)
@@ -653,38 +653,42 @@
for lines.linewidth the group is 'lines', for axes.facecolor, the
group is 'axes', and so on. Group may also be a list or tuple
of group names, eg ('xtick','ytick'). kwargs is a list of
- attribute name/value pairs, eg
+ attribute name/value pairs, eg::
rc('lines', linewidth=2, color='r')
- sets the current rc params and is equivalent to
+ sets the current rc params and is equivalent to::
rcParams['lines.linewidth'] = 2
rcParams['lines.color'] = 'r'
The following aliases are available to save typing for interactive
- users
- 'lw' : 'linewidth'
- 'ls' : 'linestyle'
- 'c' : 'color'
- 'fc' : 'facecolor'
- 'ec' : 'edgecolor'
- 'mew' : 'markeredgewidth'
- 'aa' : 'antialiased'
+ users:
- Thus you could abbreviate the above rc command as
+ ===== =================
+ Alias Property
+ ===== =================
+ 'lw' 'linewidth'
+ 'ls' 'linestyle'
+ 'c' 'color'
+ 'fc' 'facecolor'
+ 'ec' 'edgecolor'
+ 'mew' 'markeredgewidth'
+ 'aa' 'antialiased'
+ ===== =================
+ Thus you could abbreviate the above rc command as::
+
rc('lines', lw=2, c='r')
Note you can use python's kwargs dictionary facility to store
dictionaries of default parameters. Eg, you can customize the
- font rc as follows
+ font rc as follows::
font = {'family' : 'monospace',
'weight' : 'bold',
- 'size' : 'larger',
- }
+ 'size' : 'larger'}
rc('font', **font) # pass in the font dict as kwargs
Modified: trunk/matplotlib/lib/matplotlib/artist.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/artist.py 2008-06-01 15:37:48 UTC (rev 5350)
+++ trunk/matplotlib/lib/matplotlib/artist.py 2008-06-01 21:36:50 UTC (rev 5351)
@@ -724,9 +724,8 @@
If you want to see all the properties that can be set, and their
possible values, you can do
-
>>> setp(line)
- ... long output listing omitted'
+ ... long output listing omitted
setp operates on a single instance or a list of instances. If you
are in query mode introspecting the possible values, only the first
@@ -734,17 +733,18 @@
all the instances will be set. Eg, suppose you have a list of two
lines, the following will make both lines thicker and red
- >>> x = arange(0,1.0,0.01)
- >>> y1 = sin(2*pi*x)
- >>> y2 = sin(4*pi*x)
- >>> lines = plot(x, y1, x, y2)
- >>> setp(lines, linewidth=2, color='r')
+ >>> x = arange(0,1.0,0.01)
+ >>> y1 = sin(2*pi*x)
+ >>> y2 = sin(4*pi*x)
+ >>> lines = plot(x, y1, x, y2)
+ >>> setp(lines, linewidth=2, color='r')
setp works with the matlab(TM) style string/value pairs or with
python kwargs. For example, the following are equivalent
- >>> setp(lines, 'linewidth', 2, 'color', r') # matlab style
- >>> setp(lines, linewidth=2, color='r') # python style
+ >>> setp(lines, 'linewidth', 2, 'color', r') # matlab style
+ >>> setp(lines, linewidth=2, color='r') # python style
+
"""
insp = ArtistInspector(h)
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-06-01 15:37:48 UTC (rev 5350)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-06-01 21:36:50 UTC (rev 5351)
@@ -2419,38 +2419,40 @@
def text(self, x, y, s, fontdict=None,
withdash=False, **kwargs):
"""
- TEXT(x, y, s, fontdict=None, **kwargs)
+ call signature::
+ text(x, y, s, fontdict=None, **kwargs)
+
Add text in string s to axis at location x,y (data coords)
- fontdict is a dictionary to override the default text properties.
- If fontdict is None, the defaults are determined by your rc
- parameters.
+ Keyword arguments:
- withdash=True will create a TextWithDash instance instead
- of a Text instance.
+ fontdict:
+ a dictionary to override the default text properties.
+ If fontdict is None, the defaults are determined by your rc
+ parameters.
+ withdash: [ False | True ]
+ creates a TextWithDash instance instead of a Text instance.
Individual keyword arguments can be used to override any given
- parameter
+ parameter::
text(x, y, s, fontsize=12)
The default transform specifies that text is in data coords,
alternatively, you can specify text in axis coords (0,0 lower left and
1,1 upper right). The example below places text in the center of the
- axes
+ axes::
text(0.5, 0.5,'matplotlib',
horizontalalignment='center',
verticalalignment='center',
- transform = ax.transAxes,
- )
+ transform = ax.transAxes)
-
You can put a rectangular box around the text instance (eg to
set a background color) by using the keyword bbox. bbox is a
dictionary of patches.Rectangle properties (see help
- for Rectangle for a list of these). For example
+ for Rectangle for a list of these). For example::
text(x, y, s, bbox=dict(facecolor='red', alpha=0.5))
@@ -2946,22 +2948,31 @@
def plot_date(self, x, y, fmt='bo', tz=None, xdate=True, ydate=False,
**kwargs):
"""
- PLOT_DATE(x, y, fmt='bo', tz=None, xdate=True, ydate=False, **kwargs)
+ call signature::
+ plot_date(x, y, fmt='bo', tz=None, xdate=True, ydate=False, **kwargs)
+
Similar to the plot() command, except the x or y (or both) data
is considered to be dates, and the axis is labeled accordingly.
- x or y (or both) can be a sequence of dates represented as
- float days since 0001-01-01 UTC.
+ x and/or y can be a sequence of dates represented as float days since
+ 0001-01-01 UTC.
- fmt is a plot format string.
+ See dates for helper functions date2num, num2date
+ and drange for help on creating the required floating point dates
- tz is the time zone to use in labelling dates. Defaults to rc value.
+ Keyword arguments:
- If xdate is True, the x-axis will be labeled with dates.
+ fmt: string
+ The plot format string.
+ tz: [ None | timezone string ]
+ The time zone to use in labeling dates. If None, defaults to rc
+ value.
+ xdate: [ True | False ]
+ If True, the x-axis will be labeled with dates.
+ ydate: [ False | True ]
+ If True, the y-axis will be labeled with dates.
- If ydate is True, the y-axis will be labeled with dates.
-
Note if you are using custom date tickers and formatters, it
may be necessary to set the formatters/locators after the call
to plot_date since plot_date will set the default tick locator
@@ -2973,9 +2984,6 @@
Valid kwargs are Line2D properties:
%(Line2D)s
-
- See dates for helper functions date2num, num2date
- and drange for help on creating the required floating point dates
"""
if not self._hold: self.cla()
@@ -2999,10 +3007,10 @@
loglog(*args, **kwargs)
- Make a plot with log scaling on the a and y axis. The args to loglog
- are the same as the args to ``plot``. See ``plot`` for more info.
+ Make a plot with log scaling on the x and y axis. The args to loglog
+ are the same as the args to plot. See plot for more info.
- loglog supports all the keyword arguments of ``plot`` and
+ loglog supports all the keyword arguments of plot and
Axes.set_xscale/Axes.set_yscale.
Notable keyword arguments:
@@ -3039,21 +3047,26 @@
def semilogx(self, *args, **kwargs):
"""
- SEMILOGX(*args, **kwargs)
+ call signature::
- Make a semilog plot with log scaling on the x axis. The args to
- semilog x are the same as the args to plot. See help plot for more
- info.
+ semilogx(*args, **kwargs)
- Optional keyword args supported are any of the kwargs supported by
- plot or set_xscale. Notable, for log scaling:
+ Make a plot with log scaling on the x axis. The args to
+ semilogx are the same as the args to plot. See plot for
+ more info.
- * basex: base of the logarithm
+ semilogx supports all the keyword arguments of plot and
+ Axes.set_xscale.
- * subsx: the location of the minor ticks; None defaults to
- autosubs, which depend on the number of decades in the
- plot; see set_xscale for details
+ Notable keyword arguments:
+ basex: scalar > 1
+ base of the x logarithm
+ subsx: [ None | sequence ]
+ the location of the minor xticks; None defaults to
+ autosubs, which depend on the number of decades in the
+ plot; see set_xscale for details
+
The remaining valid kwargs are Line2D properties:
%(Line2D)s
"""
@@ -3072,24 +3085,28 @@
def semilogy(self, *args, **kwargs):
"""
- SEMILOGY(*args, **kwargs):
+ call signature::
- Make a semilog plot with log scaling on the y axis. The args to
- semilogy are the same as the args to plot. See help plot for more
- info.
+ semilogy(*args, **kwargs)
- Optional keyword args supported are any of the kwargs supported by
- plot or set_yscale. Notable, for log scaling:
+ Make a plot with log scaling on the y axis. The args to
+ semilogy are the same as the args to plot. See plot for
+ more info.
- * basey: base of the logarithm
+ semilogy supports all the keyword arguments of plot and
+ Axes.set_yscale.
- * subsy: a sequence of the location of the minor ticks;
- None defaults to autosubs, which depend on the number of
- decades in the plot; see set_yscale for details
+ Notable keyword arguments:
+ basey: scalar > 1
+ base of the y logarithm
+ subsy: [ None | sequence ]
+ the location of the minor yticks; None defaults to
+ autosubs, which depend on the number of decades in the
+ plot; see set_yscale for details
+
The remaining valid kwargs are Line2D properties:
%(Line2D)s
-
"""
if not self._hold: self.cla()
d = {'basey': kwargs.pop('basey', 10),
@@ -3352,21 +3369,25 @@
def step(self, x, y, *args, **kwargs):
'''
- step(x, y, *args, **kwargs)
+ call signature::
+ step(x, y, *args, **kwargs)
+
x and y must be 1-D sequences, and it is assumed, but not checked,
that x is uniformly increasing.
- Make a step plot. The args and keyword args to step are the same
- as the args to plot. See help plot for more info.
+ Keyword arguments:
- Additional keyword args for step:
+ where: [ 'pre' | 'post' | 'mid' ]
+ if 'pre', the interval from x[i] to x[i+1] has level y[i]
- * where: can be 'pre', 'post' or 'mid'; if 'pre', the
- interval from x[i] to x[i+1] has level y[i];
- if 'post', that interval has level y[i+1];
- and if 'mid', the jumps in y occur half-way
- between the x-values. Default is 'pre'.
+ if 'post', that interval has level y[i+1]
+
+ if 'mid', the jumps in y occur half-way between the x-values.
+
+ Make a step plot. Additional keyword args to step are the same
+ as those for plot. See plot for more info.
+
'''
where = kwargs.pop('where', 'pre')
@@ -3733,8 +3754,10 @@
def stem(self, x, y, linefmt='b-', markerfmt='bo', basefmt='r-'):
"""
- STEM(x, y, linefmt='b-', markerfmt='bo', basefmt='r-')
+ call signature::
+ stem(x, y, linefmt='b-', markerfmt='bo', basefmt='r-')
+
A stem plot plots vertical lines (using linefmt) at each x location
from the baseline to y, and places a marker there using markerfmt. A
horizontal line at 0 is is plotted using basefmt
@@ -3763,51 +3786,51 @@
return markerline, stemlines, baseline
- def pie(self, x, explode=None, labels=None,
- colors=None,
- autopct=None,
- pctdistance=0.6,
- shadow=False,
- labeldistance=1.1,
- ):
+ def pie(self, x, explode=None, labels=None, colors=None,
+ autopct=None, pctdistance=0.6, shadow=False,
+ labeldistance=1.1):
"""
- PIE(x, explode=None, labels=None,
- colors=('b', 'g', 'r', 'c', 'm', 'y', 'k', 'w'),
- autopct=None, pctdistance=0.6, labeldistance=1.1, shadow=False)
+ call signature::
+ pie(x, explode=None, labels=None,
+ colors=('b', 'g', 'r', 'c', 'm', 'y', 'k', 'w'),
+ autopct=None, pctdistance=0.6, labeldistance=1.1, shadow=False)
+
Make a pie chart of array x. The fractional area of each wedge is
given by x/sum(x). If sum(x)<=1, then the values of x give the
fractional area directly and the array will not be normalized.
- - explode, if not None, is a len(x) array which specifies the
- fraction of the radius to offset that wedge.
+ Keyword arguments:
- - colors is a sequence of matplotlib color args that the pie chart
+ explode: [ None | len(x) sequence ]
+ If not None, is a len(x) array which specifies the
+ fraction of the radius with which to offset each wedge.
+ colors: [ None | color sequence ]
+ A sequence of matplotlib color args through which the pie chart
will cycle.
-
- - labels, if not None, is a len(x) list of labels.
-
- - autopct, if not None, is a string or function used to label the
+ labels: [ None | len(x) sequence of strings ]
+ A sequence of strings providing the labels for each wedge
+ autopct: [ None | format string | format function ]
+ If not None, is a string or function used to label the
wedges with their numeric value. The label will be placed inside
the wedge. If it is a format string, the label will be fmt%pct.
If it is a function, it will be called
+ pctdistance: scalar
+ The ratio between the center of each pie slice and the start of the
+ text generated by autopct. Ignored if autopct is None; default is
+ 0.6.
+ labeldistance: scalar
+ The radial distance at which the pie labels are drawn
+ shadow: [ False | True ]
+ Draw a shadow beneath the pie.
- - pctdistance is the ratio between the center of each pie slice
- and the start of the text generated by autopct. Ignored if autopct
- is None; default is 0.6.
-
- - labeldistance is the radial distance at which the pie labels are drawn
-
- - shadow, if True, will draw a shadow beneath the pie.
-
The pie chart will probably look best if the figure and axes are
- square. Eg,
+ square. Eg::
figure(figsize=(8,8))
ax = axes([0.1, 0.1, 0.8, 0.8])
Return value:
-
If autopct is None, return a list of (patches, texts), where patches
is a sequence of mpatches.Wedge instances and texts is a
list of the label Text instnaces
@@ -3815,6 +3838,7 @@
If autopct is not None, return (patches, texts, autotexts), where
patches and texts are as above, and autotexts is a list of text
instances for the numeric labels
+
"""
self.set_frame_on(False)
@@ -4314,97 +4338,109 @@
faceted=True, verts=None,
**kwargs):
"""
- SCATTER(x, y, s=20, c='b', marker='o', cmap=None, norm=None,
- vmin=None, vmax=None, alpha=1.0, linewidths=None,
- verts=None, **kwargs)
- Supported function signatures:
+ call signatures::
- SCATTER(x, y, **kwargs)
- SCATTER(x, y, s, **kwargs)
- SCATTER(x, y, s, c, **kwargs)
+ scatter(x, y, s=20, c='b', marker='o', cmap=None, norm=None,
+ vmin=None, vmax=None, alpha=1.0, linewidths=None,
+ verts=None, **kwargs)
Make a scatter plot of x versus y, where x, y are 1-D sequences
of the same length, N.
- Arguments s and c can also be given as kwargs; this is encouraged
- for readability.
+ Keyword arguments:
- s is a size in points^2. It is a scalar
- or an array of the same length as x and y.
+ s:
+ size in points^2. It is a scalar or an array of the same
+ length as x and y.
+ c:
+ a color. c can be a single color format string, or a
+ sequence of color specifications of length N, or a sequence
+ of N numbers to be mapped to colors using the cmap and norm
+ specified via kwargs (see below). Note that c should not be
+ a single numeric RGB or RGBA sequence because that is
+ indistinguishable from an array of values to be colormapped.
+ c can be a 2-D array in which the rows are RGB or RGBA,
+ however.
+ marker:
+ can be one of:
- c is a color and can be a single color format string,
- or a sequence of color specifications of length N,
- or a sequence of N numbers to be mapped to colors
- using the cmap and norm specified via kwargs (see below).
- Note that c should not be a single numeric RGB or RGBA
- sequence because that is indistinguishable from an array
- of values to be colormapped. c can be a 2-D array in which
- the rows are RGB or RGBA, however.
+ ===== ==============
+ Value Description
+ ===== ==============
+ 's' square
+ 'o' circle
+ '^' triangle up
+ '>' triangle right
+ 'v' triangle down
+ '<' triangle left
+ 'd' diamond
+ 'p' pentagram
+ 'h' hexagon
+ '8' octagon
+ '+' plus
+ 'x' cross
+ ===== ==============
- The marker can be one of
+ The marker can also be a tuple (numsides, style, angle), which will
+ create a custom, regular symbol.
- 's' : square
- 'o' : circle
- '^' : triangle up
- '>' : triangle right
- 'v' : triangle down
- '<' : triangle left
- 'd' : diamond
- 'p' : pentagram
- 'h' : hexagon
- '8' : octagon
- '+' : plus
- 'x' : cross
+ numsides:
+ the number of sides
+ style:
+ the style of the regular symbol:
- The marker can also be a tuple (numsides, style, angle), which will
- create a custom, regular symbol.
+ ===== ==================
+ Value Description
+ ===== ==================
+ 0 a regular polygon
+ 1 a star-like symbol
+ 2 an asterisk
+ ===== ==================
- numsides is the number of sides
+ angle:
+ the angle of rotation of the symbol
- style is the style of the regular symbol:
- 0 : a regular polygon
- 1 : a star-like symbol
- 2 : an asterisk
+ Finally, marker can be (verts, 0), verts is a sequence of (x,y)
+ vertices for a custom scatter symbol. Alternatively, use the
+ kwarg combination marker=None, verts=verts.
- angle is the angle of rotation of the symbol
-
- Finally, marker can be (verts, 0), verts is a sequence of (x,y)
- vertices for a custom scatter symbol. Alternatively, use the
- kwarg combination marker=None,verts=verts.
-
Any or all of x, y, s, and c may be masked arrays, in which
case all masks will be combined and only unmasked points
will be plotted.
- Other keyword args; the color mapping and normalization arguments will
- be used only if c is an array of floats
+ Other keyword arguments: the color mapping and normalization
+ arguments will be used only if c is an array of floats.
- * cmap = cm.jet : a colors.Colormap instance from cm.
- defaults to rc image.cmap
-
- * norm = colors.Normalize() : colors.Normalize instance
- is used to scale luminance data to 0,1.
-
- * vmin=None and vmax=None : vmin and vmax are used in conjunction
- with norm to normalize luminance data. If either are None, the
- min and max of the color array C is used. Note if you pass a norm
- instance, your settings for vmin and vmax will be ignored
-
- * alpha =1.0 : the alpha value for the patches
-
- * linewidths, if None, defaults to (lines.linewidth,). Note
+ cmap: [ None | Colormap ]
+ a colors.Colormap instance from cm. If None, defaults to rc
+ image.cmap. cmap is only used if c is an array of floats.
+ norm: [ None | Normalize ]
+ a colors.Normalize instance is used to scale luminance data
+ to 0,1. If None, use the default normalize(). norm is only
+ used if c is an array of floats.
+ vmin/vmax:
+ vmin and vmax are used in conjunction with norm to normalize
+ luminance data. If either are None, the min and max of the
+ color array C is used. Note if you pass a norm instance, your
+ settings for vmin and vmax will be ignored.
+ alpha: 0 <= scalar <= 1
+ the alpha value for the patches
+ linewidths: [ None | scalar | sequence ]
+ if None, defaults to (lines.linewidth,). Note
that this is a tuple, and if you set the linewidths
argument you must set it as a sequence of floats, as
required by RegularPolyCollection -- see
collections.RegularPolyCollection for details
- Optional kwargs control the Collection properties; in
- particular:
+ Optional kwargs control the Collection properties; in
+ particular:
- edgecolors='none' : to plot faces with no outlines
- facecolors='none' : to plot unfilled outlines
+ edgecolors:
+ 'none' to plot faces with no outlines
+ facecolors:
+ 'none' to plot unfilled outlines
- Here are the standard descriptions of all the Collection kwargs:
+ Here are the standard descriptions of all the Collection kwargs:
%(Collection)s
A Collection instance is returned
@@ -4829,9 +4865,6 @@
quiverkey.__doc__ = mquiver.QuiverKey.quiverkey_doc
def quiver(self, *args, **kw):
- """
- TODO: Document me
- """
q = mquiver.Quiver(self, *args, **kw)
self.add_collection(q, False)
self.update_datalim(q.XY)
@@ -5026,9 +5059,9 @@
def pcolor(self, *args, **kwargs):
"""
- pcolor(*args, **kwargs): pseudocolor plot of a 2-D array
+ Create a pseudocolor plot of a 2-D array
- Function signatures
+ call signatures::
pcolor(C, **kwargs)
pcolor(X, Y, C, **kwargs)
@@ -5054,72 +5087,73 @@
of the vertices surrounding C[i,j] (X or Y at [i,j],[i+1,j],
[i,j+1],[i=1,j+1]) is masked, nothing is plotted.
- Optional keyword args are shown with their defaults below (you must
- use kwargs for these):
+ Keyword arguments:
- * cmap = cm.jet : a cm Colormap instance from cm
+ cmap: [ None | Colormap ]
+ A cm Colormap instance from cm. If None, use rc settings.
+ norm: [ None | Normalize ]
+ An mcolors.Normalize instance is used to scale luminance data to
+ 0,1. If None, defaults to normalize()
+ vmin/vmax: [ None | scalar ]
+ vmin and vmax are used in conjunction with norm to normalize
+ luminance data. If either are None, the min and max of the color
+ array C is used. If you pass a norm instance, vmin and vmax will
+ be None.
+ shading: [ 'flat' | 'faceted' ]
+ If 'faceted', a black grid is drawn around each rectangle; if
+ 'flat', edges are not drawn. Default is 'flat', contrary to
+ Matlab(TM).
- * norm = Normalize() : mcolors.Normalize instance
- is used to scale luminance data to 0,1.
+ This kwarg is deprecated; please use 'edgecolors' instead:
+ * shading='flat' -- edgecolors='None'
+ * shading='faceted -- edgecolors='k'
+ edgecolors: [ None | 'None' | color | color sequence]
+ If None, the rc setting is used by default.
+ If 'None', edges will not be visible.
+ An mpl color or sequence of colors will set the edge color
+ alpha: 0 <= scalar <= 1
+ the alpha blending value
- * vmin=None and vmax=None : vmin and vmax are used in conjunction
- with norm to normalize luminance data. If either are None, the
- min and max of the color array C is used. If you pass a norm
- instance, vmin and vmax will be None
+ Return value is a matplotlib.collection.Collection object
- * shading = 'flat' : or 'faceted'. If 'faceted', a black grid is
- drawn around each rectangle; if 'flat', edges are not drawn.
- Default is 'flat', contrary to Matlab(TM).
- This kwarg is deprecated;
- please use the edgecolors kwarg instead:
- shading='flat' --> edgecolors='None'
- shading='faceted --> edgecolors='k'
- edgecolors can also be None to specify the rcParams
- default, or any mpl color or sequence of colors.
+ The grid orientation follows the Matlab(TM) convention: an
+ array C with shape (nrows, ncolumns) is plotted with
+ the column number as X and the row number as Y, increasing
+ up; hence it is plotted the way the array would be printed,
+ except that the Y axis is reversed. That is, C is taken
+ as C(y,x).
- * alpha=1.0 : the alpha blending value
+ Similarly for meshgrid::
- Return value is a mcoll.Collection
- object
+ x = np.arange(5)
+ y = np.arange(3)
+ X, Y = meshgrid(x,y)
- Grid Orientation
+ is equivalent to:
- The orientation follows the Matlab(TM) convention: an
- array C with shape (nrows, ncolumns) is plotted with
- the column number as X and the row number as Y, increasing
- up; hence it is plotted the way the array would be printed,
- except that the Y axis is reversed. That is, C is taken
- as C(y,x).
+ X = array([[0, 1, 2, 3, 4],
+ [0, 1, 2, 3, 4],
+ [0, 1, 2, 3, 4]])
- Similarly for meshgrid:
+ Y = array([[0, 0, 0, 0, 0],
+ [1, 1, 1, 1, 1],
+ [2, 2, 2, 2, 2]])
- x = np.arange(5)
- y = np.arange(3)
- X, Y = meshgrid(x,y)
+ so if you have::
- is equivalent to
+ C = rand( len(x), len(y))
- X = array([[0, 1, 2, 3, 4],
- [0, 1, 2, 3, 4],
- [0, 1, 2, 3, 4]])
+ then you need::
- Y = array([[0, 0, 0, 0, 0],
- [1, 1, 1, 1, 1],
- [2, 2, 2, 2, 2]])
+ pcolor(X, Y, C.T)
- so if you have
- C = rand( len(...
[truncated message content] |
|
From: <mme...@us...> - 2008-06-02 10:10:48
|
Revision: 5352
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5352&view=rev
Author: mmetz_bn
Date: 2008-06-02 03:10:40 -0700 (Mon, 02 Jun 2008)
Log Message:
-----------
Added support for log to hist with histtype='step'
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-06-01 21:36:50 UTC (rev 5351)
+++ trunk/matplotlib/CHANGELOG 2008-06-02 10:10:40 UTC (rev 5352)
@@ -1,3 +1,5 @@
+2008-06-02 Added support for log to hist with histtype='step' - MM
+
===============================================================
2008-05-29 Released 0.98.0 at revision 5314
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-06-01 21:36:50 UTC (rev 5351)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-06-02 10:10:40 UTC (rev 5352)
@@ -5739,7 +5739,6 @@
ccount += 1
elif orientation == 'vertical':
for m in n:
-
color = colors[ccount % len(colors)]
patch = self.bar(bins[:-1]+boffset, m, width=width,
bottom=bottom, align='center', log=log,
@@ -5762,6 +5761,13 @@
elif align != 'edge':
raise ValueError, 'invalid align: %s' % align
+ if log:
+ y[0],y[-1] = 1e-100, 1e-100
+ if orientation == 'horizontal':
+ self.set_xscale('log')
+ elif orientation == 'vertical':
+ self.set_yscale('log')
+
for m in n:
y[1:-1:2], y[2::2] = m, m
if orientation == 'horizontal':
@@ -5769,6 +5775,22 @@
elif orientation != 'vertical':
raise ValueError, 'invalid orientation: %s' % orientation
patches.append( self.fill(x,y) )
+
+ # adopted from adjust_x/ylim part of the bar method
+ if orientation == 'horizontal':
+ xmin, xmax = 0, self.dataLim.intervalx[1]
+ for m in n:
+ xmin = np.amin(m[m!=0]) # filter out the 0 height bins
+ xmin = max(xmin*0.9, 1e-100)
+ self.dataLim.intervalx = (xmin, xmax)
+ elif orientation == 'vertical':
+ ymin, ymax = 0, self.dataLim.intervaly[1]
+ for m in n:
+ ymin = np.amin(m[m!=0]) # filter out the 0 height bins
+ ymin = max(ymin*0.9, 1e-100)
+ self.dataLim.intervaly = (ymin, ymax)
+ self.autoscale_view()
+
else:
raise ValueError, 'invalid histtype: %s' % histtype
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mme...@us...> - 2008-06-02 12:56:46
|
Revision: 5354
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5354&view=rev
Author: mmetz_bn
Date: 2008-06-02 05:55:57 -0700 (Mon, 02 Jun 2008)
Log Message:
-----------
fixed a bug for log-scale stacked histograms
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-06-02 11:48:42 UTC (rev 5353)
+++ trunk/matplotlib/CHANGELOG 2008-06-02 12:55:57 UTC (rev 5354)
@@ -1,4 +1,5 @@
-2008-06-02 Added support for log to hist with histtype='step' - MM
+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
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-06-02 11:48:42 UTC (rev 5353)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-06-02 12:55:57 UTC (rev 5354)
@@ -5637,7 +5637,7 @@
align:
['edge' | 'center' ] Controles how the histogram is plotted.
- If 'edge, bars are centered between the bin edges.
+ If 'edge', bars are centered between the bin edges.
If 'center', bars are centered on the left bin edges
orientation:
@@ -5718,7 +5718,6 @@
boffset, dw = 0.0, 0.0
stacked = True
- if bottom is None: bottom = 0.0
else:
raise ValueError, 'invalid histtype: %s' % histtype
@@ -5734,7 +5733,9 @@
left=bottom, align='center', log=log,
color=color)
patches.append(patch)
- if stacked: bottom += m
+ if stacked:
+ if bottom is None: bottom = 0.0
+ bottom += m
boffset += dw
ccount += 1
elif orientation == 'vertical':
@@ -5744,7 +5745,9 @@
bottom=bottom, align='center', log=log,
color=color)
patches.append(patch)
- if stacked: bottom += m
+ if stacked:
+ if bottom is None: bottom = 0.0
+ bottom += m
boffset += dw
ccount += 1
else:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-06-02 17:13:09
|
Revision: 5361
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5361&view=rev
Author: jdh2358
Date: 2008-06-02 10:13:01 -0700 (Mon, 02 Jun 2008)
Log Message:
-----------
Merged revisions 5360 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint
........
r5360 | jdh2358 | 2008-06-02 10:06:41 -0500 (Mon, 02 Jun 2008) | 1 line
added switch_backend bugfix from sf patch 1979402
........
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/__init__.py
trunk/matplotlib/lib/matplotlib/pyplot.py
Property Changed:
----------------
trunk/matplotlib/
Property changes on: trunk/matplotlib
___________________________________________________________________
Name: svnmerge-integrated
- /branches/v0_91_maint:1-5334
+ /branches/v0_91_maint:1-5360
Modified: trunk/matplotlib/lib/matplotlib/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/__init__.py 2008-06-02 15:06:41 UTC (rev 5360)
+++ trunk/matplotlib/lib/matplotlib/__init__.py 2008-06-02 17:13:01 UTC (rev 5361)
@@ -740,7 +740,7 @@
or matplotlib.backends is imported for the first time.
"""
-def use(arg):
+def use(arg, warn=True):
"""
Set the matplotlib backend to one of the known backends.
@@ -752,12 +752,17 @@
will specify a default of pdf output generated by Cairo.
- Note: this function must be called *before* importing pylab
- for the first time; or, if you are not using pylab, it must
- be called before importing matplotlib.backends.
+ Note: this function must be called *before* importing pylab for
+ the first time; or, if you are not using pylab, it must be called
+ before importing matplotlib.backends. If warn is True, a warning
+ is issued if you try and callthis after pylab or pyplot have been
+ loaded. In certain black magic use cases, eg
+ pyplot.switch_backends, we are doing the reloading necessary to
+ make the backend switch work (in some cases, eg pure image
+ backends) so one can set warn=False to supporess the warnings
"""
if 'matplotlib.backends' in sys.modules:
- warnings.warn(_use_error_msg)
+ if warn: warnings.warn(_use_error_msg)
be_parts = arg.split('.')
name = validate_backend(be_parts[0])
rcParams['backend'] = name
Modified: trunk/matplotlib/lib/matplotlib/pyplot.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/pyplot.py 2008-06-02 15:06:41 UTC (rev 5360)
+++ trunk/matplotlib/lib/matplotlib/pyplot.py 2008-06-02 17:13:01 UTC (rev 5361)
@@ -52,12 +52,12 @@
"""
close('all')
global new_figure_manager, draw_if_interactive, show
- matplotlib.use(newbackend)
- reload(backends)
- from backends import new_figure_manager, draw_if_interactive, show
+ matplotlib.use(newbackend, warn=False)
+ reload(matplotlib.backends)
+ from matplotlib.backends import pylab_setup
+ new_figure_manager, draw_if_interactive, show = pylab_setup()
-
def isinteractive():
"""
Return the interactive status
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-06-03 13:37:37
|
Revision: 5372
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5372&view=rev
Author: jdh2358
Date: 2008-06-03 06:36:33 -0700 (Tue, 03 Jun 2008)
Log Message:
-----------
some ports of the old locators and formatters to the new api
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/ticker.py
trunk/matplotlib/matplotlibrc.template
Modified: trunk/matplotlib/lib/matplotlib/ticker.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/ticker.py 2008-06-03 03:16:55 UTC (rev 5371)
+++ trunk/matplotlib/lib/matplotlib/ticker.py 2008-06-03 13:36:33 UTC (rev 5372)
@@ -244,9 +244,7 @@
class OldScalarFormatter(Formatter):
"""
- Tick location is a plain old number. If viewInterval is set, the
- formatter will use %d, %1.#f or %1.ef as appropriate. If it is
- not set, the formatter will do str conversion
+ Tick location is a plain old number.
"""
def __call__(self, x, pos=None):
@@ -557,8 +555,11 @@
def __call__(self, x, pos=None):
'Return the format for tick val x at position pos'
- self.verify_intervals()
- d = abs(self.viewInterval.span())
+
+
+ vmin, vmax = self.axis.get_view_interval()
+ vmin, vmax = mtransforms.nonsingular(vmin, vmax, expander = 0.05)
+ d = abs(vmax-vmin)
b=self._base
if x == 0:
return '0'
@@ -641,17 +642,28 @@
if numticks>2:
step = numsteps*abs(ticks[0]-ticks[1])
else:
- step = numsteps*self.viewInterval.span()/6
+ vmin, vmax = self.axis.get_view_interval()
+ vmin, vmax = mtransforms.nonsingular(vmin, vmax, expander = 0.05)
+ d = abs(vmax-vmin)
+ step = numsteps*d/6.
- self.viewInterval.shift(step)
+ vmin += step
+ vmax += step
+ self.axis.set_view_interval(vmin, vmax)
+
def zoom(self, direction):
"Zoom in/out on axis; if direction is >0 zoom in, else zoom out"
- vmin, vmax = self.viewInterval.get_bounds()
+
+ vmin, vmax = self.axis.get_view_interval()
+ vmin, vmax = mtransforms.nonsingular(vmin, vmax, expander = 0.05)
+ interval = abs(vmax-vmin)
interval = self.viewInterval.span()
step = 0.1*interval*direction
- self.viewInterval.set_bounds(vmin + step, vmax - step)
+
+ self.axis.set_view_interval(vmin + step, vmax - step)
+
def refresh(self):
'refresh internal information based on current lim'
pass
@@ -731,8 +743,8 @@
def __call__(self):
'Return the locations of the ticks'
- self.verify_intervals()
- vmin, vmax = self.viewInterval.get_bounds()
+ vmin, vmax = self.axis.get_view_interval()
+ vmin, vmax = mtransforms.nonsingular(vmin, vmax, expander = 0.05)
if vmax<vmin:
vmin, vmax = vmax, vmin
@@ -755,9 +767,9 @@
def autoscale(self):
'Try to choose the view limits intelligently'
- self.verify_intervals()
- vmin, vmax = self.dataInterval.get_bounds()
+ vmin, vmax = self.axis.get_data_interval()
+
if vmax<vmin:
vmin, vmax = vmax, vmin
@@ -822,7 +834,7 @@
class MultipleLocator(Locator):
"""
Set a tick on every integer that is multiple of base in the
- viewInterval
+ view interval
"""
def __init__(self, base=1.0):
@@ -1141,14 +1153,16 @@
def refresh(self):
'refresh internal information based on current lim'
- d = self.viewInterval.span()
+ vmin, vmax = self.axis.get_view_interval()
+ vmin, vmax = mtransforms.nonsingular(vmin, vmax, expander = 0.05)
+ d = abs(vmax-vmin)
self._locator = self.get_locator(d)
def autoscale(self):
'Try to choose the view limits intelligently'
- self.verify_intervals()
- d = abs(self.dataInterval.span())
+ vmin, vmax = self.axis.get_data_interval()
+ d = abs(vmax-vmin)
self._locator = self.get_locator(d)
return self._locator.autoscale()
@@ -1161,7 +1175,7 @@
try: ld = math.log10(d)
except OverflowError:
- raise RuntimeError('AutoLocator illegal dataInterval range')
+ raise RuntimeError('AutoLocator illegal data interval range')
fld = math.floor(ld)
@@ -1173,13 +1187,9 @@
if d >= 5*base : ticksize = base
elif d >= 2*base : ticksize = base/2.0
else : ticksize = base/5.0
- #print 'base, ticksize, d', base, ticksize, d, self.viewInterval
-
- #print self.dataInterval, d, ticksize
locator = MultipleLocator(ticksize)
- locator.set_view_interval(self.viewInterval)
- locator.set_data_interval(self.dataInterval)
+
return locator
Modified: trunk/matplotlib/matplotlibrc.template
===================================================================
--- trunk/matplotlib/matplotlibrc.template 2008-06-03 03:16:55 UTC (rev 5371)
+++ trunk/matplotlib/matplotlibrc.template 2008-06-03 13:36:33 UTC (rev 5372)
@@ -1,27 +1,22 @@
### MATPLOTLIBRC FORMAT
-# This is a sample matplotlib configuration file. It should be placed
-# in HOME/.matplotlib/matplotlibrc (unix/linux like systems) and
-# C:\Documents and Settings\yourname\.matplotlib (win32 systems)
+# This is a sample matplotlib configuration file - you can find a copy
+# of it on your system in
+# site-packages/matplotlib/mpl-data/matplotlibrc. If you edit it
+# there, please note that it will be overridden in your next install.
+# If you want to keep a permanent local bopy that will not be
+# over-written, place it in HOME/.matplotlib/matplotlibrc (unix/linux
+# like systems) and C:\Documents and Settings\yourname\.matplotlib
+# (win32 systems).
#
-# By default, the installer will overwrite the existing file in the
-# install path, so if you want to preserve your's, please move it to
-# your HOME dir and set the environment variable if necessary.
-#
# This file is best viewed in a editor which supports python mode
-# syntax highlighting
-#
-# Blank lines, or lines starting with a comment symbol, are ignored,
-# as are trailing comments. Other lines must have the format
-#
-# key : val # optional comment
-#
-# Colors: for the color values below, you can either use
-# - a matplotlib color string, such as r, k, or b
-# - an rgb tuple, such as (1.0, 0.5, 0.0)
-# - a hex string, such as ff00ff or #ff00ff
-# - a scalar grayscale intensity such as 0.75
-# - a legal html color name, eg red, blue, darkslategray
+# syntax highlighting # Blank lines, or lines starting with a comment
+# symbol, are ignored, as are trailing comments. Other lines must
+# have the format # key : val # optional comment # Colors: for the
+# color values below, you can either use - a matplotlib color string,
+# such as r, k, or b - an rgb tuple, such as (1.0, 0.5, 0.0) - a hex
+# string, such as ff00ff or #ff00ff - a scalar grayscale intensity
+# such as 0.75 - a legal html color name, eg red, blue, darkslategray
#### CONFIGURATION BEGINS HERE
# the default backend; one of GTK GTKAgg GTKCairo FltkAgg QtAgg TkAgg
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|