SF.net SVN: matplotlib: [5372] trunk/matplotlib

2008-06-03 Thread jdh2358
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= 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,

SF.net SVN: matplotlib: [5373] trunk/toolkits/basemap/examples/wiki_example .py

2008-06-03 Thread jswhit
Revision: 5373
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5373&view=rev
Author:   jswhit
Date: 2008-06-03 09:40:52 -0700 (Tue, 03 Jun 2008)

Log Message:
---
forgot to plot circles in last plot (bluemarble background)

Modified Paths:
--
trunk/toolkits/basemap/examples/wiki_example.py

Modified: trunk/toolkits/basemap/examples/wiki_example.py
===
--- trunk/toolkits/basemap/examples/wiki_example.py 2008-06-03 13:36:33 UTC 
(rev 5372)
+++ trunk/toolkits/basemap/examples/wiki_example.py 2008-06-03 16:40:52 UTC 
(rev 5373)
@@ -42,6 +42,8 @@
 map.drawmapboundary()
 map.drawmeridians(np.arange(0,360,30))
 map.drawparallels(np.arange(-90,90,30))
+# plot filled circles at the locations of the cities.
+map.plot(xc,yc,'wo')
 # plot the names of five cities.
 for name,xpt,ypt in zip(cities,xc,yc):
 plt.text(xpt+5,ypt+5,name,fontsize=9,color='w')


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [5374] trunk/matplotlib/doc/users/ navigation_toolbar.rst

2008-06-03 Thread mdboom
Revision: 5374
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5374&view=rev
Author:   mdboom
Date: 2008-06-03 09:41:53 -0700 (Tue, 03 Jun 2008)

Log Message:
---
Describe polar-plot-specific zooming/panning.

Modified Paths:
--
trunk/matplotlib/doc/users/navigation_toolbar.rst

Modified: trunk/matplotlib/doc/users/navigation_toolbar.rst
===
--- trunk/matplotlib/doc/users/navigation_toolbar.rst   2008-06-03 16:40:52 UTC 
(rev 5373)
+++ trunk/matplotlib/doc/users/navigation_toolbar.rst   2008-06-03 16:41:53 UTC 
(rev 5374)
@@ -47,6 +47,11 @@
 modifier keys 'x', 'y' or 'CONTROL' to constrain the zoom to the x
 axes, the y axes, or aspect ratio preserve, respectively.
 
+With polar plots, the pan and zoom functionality behaves
+differently.  The radius axis labels can be dragged using the left
+mouse button.  The radius scale can be zoomed in and out using the
+right mouse button.
+
 .. image:: ../mpl_data/images/zoom_to_rect.png
:scale: 100
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [5375] trunk/matplotlib/lib/matplotlib

2008-06-03 Thread jdh2358
Revision: 5375
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5375&view=rev
Author:   jdh2358
Date: 2008-06-03 13:28:14 -0700 (Tue, 03 Jun 2008)

Log Message:
---
cleaned up some imports to accord with coding guide

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/artist.py
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/axis.py
trunk/matplotlib/lib/matplotlib/mlab.py

Modified: trunk/matplotlib/lib/matplotlib/artist.py
===
--- trunk/matplotlib/lib/matplotlib/artist.py   2008-06-03 16:41:53 UTC (rev 
5374)
+++ trunk/matplotlib/lib/matplotlib/artist.py   2008-06-03 20:28:14 UTC (rev 
5375)
@@ -1,6 +1,6 @@
 from __future__ import division
 import re, warnings
-from cbook import iterable, flatten
+import matplotlib.cbook as cbook
 from transforms import Bbox, IdentityTransform, TransformedBbox, 
TransformedPath
 from path import Path
 
@@ -507,7 +507,7 @@
 sequence (all Artists are of the same type) and it is your
 responsibility to make sure this is so.
 """
-if iterable(o) and len(o): o = o[0]
+if cbook.iterable(o) and len(o): o = o[0]
 self.o = o
 self.aliasd = self.get_aliases()
 
@@ -757,8 +757,8 @@
 print insp.pprint_setters(prop=args[0])
 return
 
-if not iterable(h): h = [h]
-else: h = flatten(h)
+if not cbook.iterable(h): h = [h]
+else: h = cbook.flatten(h)
 
 
 if len(args)%2:
@@ -776,7 +776,7 @@
 funcName = "set_%s"%s
 func = getattr(o,funcName)
 ret.extend( [func(val)] )
-return [x for x in flatten(ret)]
+return [x for x in cbook.flatten(ret)]
 
 def kwdoc(a):
 return '\n'.join(ArtistInspector(a).pprint_setters(leadingspace=2))

Modified: trunk/matplotlib/lib/matplotlib/axes.py
===
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-06-03 16:41:53 UTC (rev 
5374)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-06-03 20:28:14 UTC (rev 
5375)
@@ -7,25 +7,25 @@
 import matplotlib
 rcParams = matplotlib.rcParams
 
-from matplotlib import artist as martist
-from matplotlib import axis as maxis
-from matplotlib import cbook
-from matplotlib import collections as mcoll
-from matplotlib import colors as mcolors
-from matplotlib import contour as mcontour
-from matplotlib import dates as mdates
-from matplotlib import font_manager
-from matplotlib import image as mimage
-from matplotlib import legend as mlegend
-from matplotlib import lines as mlines
-from matplotlib import mlab
-from matplotlib import patches as mpatches
-from matplotlib import quiver as mquiver
-from matplotlib import scale as mscale
-from matplotlib import table as mtable
-from matplotlib import text as mtext
-from matplotlib import ticker as mticker
-from matplotlib import transforms as mtransforms
+import matplotlib.artist as martist
+import matplotlib.axis as maxis
+import matplotlib.cbook as cbook
+import matplotlib.collections as mcoll
+import matplotlib.colors as mcolors
+import matplotlib.contour as mcontour
+import matplotlib.dates as mdates
+import matplotlib.font_manager as font_manager
+import matplotlib.image as mimage
+import matplotlib.legend as mlegend
+import matplotlib.lines as mlines
+import matplotlib.mlab as mlab
+import matplotlib.patches as mpatches
+import matplotlib.quiver as mquiver
+import matplotlib.scale as mscale
+import matplotlib.table as mtable
+import matplotlib.text as mtext
+import matplotlib.ticker as mticker
+import matplotlib.transforms as mtransforms
 
 iterable = cbook.iterable
 is_string_like = cbook.is_string_like

Modified: trunk/matplotlib/lib/matplotlib/axis.py
===
--- trunk/matplotlib/lib/matplotlib/axis.py 2008-06-03 16:41:53 UTC (rev 
5374)
+++ trunk/matplotlib/lib/matplotlib/axis.py 2008-06-03 20:28:14 UTC (rev 
5375)
@@ -3,25 +3,20 @@
 """
 from __future__ import division
 
-from artist import Artist, setp
-from cbook import silent_list, popall, CallbackRegistry
-from lines import Line2D, TICKLEFT, TICKRIGHT, TICKUP, TICKDOWN
-from matplotlib import rcParams
-from patches import bbox_artist
-from ticker import NullFormatter, FixedFormatter, ScalarFormatter
-from ticker import NullLocator, FixedLocator, AutoLocator
+from matplotlib  import rcParams
+import matplotlib.artist as artist
+import matplotlib.cbook as cbook
+import matplotlib.font_manager as font_manager
+import matplotlib.lines as mlines
+import matplotlib.patches as mpatches
+import matplotlib.scale as mscale
+import matplotlib.text as mtext
+import matplotlib.ticker as mticker
+import matplotlib.transforms as mtransforms
+import matplotlib.units as munits
 
-from font_manager import FontProperties
-from text import Text, TextWithDash
-from transforms import Affine2D, Bbox, blended_transform_factory, \
-  

SF.net SVN: matplotlib: [5376] trunk/matplotlib/examples

2008-06-03 Thread jdh2358
Revision: 5376
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5376&view=rev
Author:   jdh2358
Date: 2008-06-03 13:30:38 -0700 (Tue, 03 Jun 2008)

Log Message:
---
renamed pylab examples dir to fix import breaks

Added Paths:
---
trunk/matplotlib/examples/api_examples/
trunk/matplotlib/examples/pylab_examples/

Removed Paths:
-
trunk/matplotlib/examples/api/
trunk/matplotlib/examples/pylab/

Copied: trunk/matplotlib/examples/api_examples (from rev 5375, 
trunk/matplotlib/examples/api)

Copied: trunk/matplotlib/examples/pylab_examples (from rev 5375, 
trunk/matplotlib/examples/pylab)


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [5377] trunk/matplotlib/examples

2008-06-03 Thread jdh2358
Revision: 5377
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5377&view=rev
Author:   jdh2358
Date: 2008-06-03 13:33:41 -0700 (Tue, 03 Jun 2008)

Log Message:
---
api does not need to be renamed since it doesnt clash

Added Paths:
---
trunk/matplotlib/examples/api/

Removed Paths:
-
trunk/matplotlib/examples/api_examples/

Copied: trunk/matplotlib/examples/api (from rev 5376, 
trunk/matplotlib/examples/api_examples)


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [5378] trunk/matplotlib/examples/README.txt

2008-06-03 Thread jdh2358
Revision: 5378
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5378&view=rev
Author:   jdh2358
Date: 2008-06-03 13:34:52 -0700 (Tue, 03 Jun 2008)

Log Message:
---
updated readme

Modified Paths:
--
trunk/matplotlib/examples/README.txt

Modified: trunk/matplotlib/examples/README.txt
===
--- trunk/matplotlib/examples/README.txt2008-06-03 20:33:41 UTC (rev 
5377)
+++ trunk/matplotlib/examples/README.txt2008-06-03 20:34:52 UTC (rev 
5378)
@@ -7,7 +7,7 @@
 Probably the most common way people use matplotlib is with the
 procedural interface, which follows the matlab/IDL/mathematica
 approach of using simple procedures like "plot" or "title" to modify
-the current figure.  These examples are included in the "pylab"
+the current figure.  These examples are included in the "pylab_examples"
 directory.  If you want to write more robust scripts, eg for
 production use or in a web application server, you will probably want
 to use the matplotlib API for full control.  These examples are found
@@ -31,7 +31,7 @@
   * misc - some miscellaneous examples.  some demos for loading and
 working with record arrays
 
-  * pylab - the  interface to matplotlib similar to matlab
+  * pylab_examples - the  interface to matplotlib similar to matlab
 
   * tests - tests used by matplotlib developers to check functionality
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [5379] trunk/py4science/examples

2008-06-03 Thread jdh2358
Revision: 5379
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5379&view=rev
Author:   jdh2358
Date: 2008-06-03 13:57:02 -0700 (Tue, 03 Jun 2008)

Log Message:
---
added sphinx template for doc unit

Added Paths:
---
trunk/py4science/examples/sphinx_template/
trunk/py4science/examples/sphinx_template/README.txt
trunk/py4science/examples/sphinx_template/_static/
trunk/py4science/examples/sphinx_template/_templates/
trunk/py4science/examples/sphinx_template/build/
trunk/py4science/examples/sphinx_template/conf.py
trunk/py4science/examples/sphinx_template/index.rst
trunk/py4science/examples/sphinx_template/make.py
trunk/py4science/examples/sphinx_template/model/
trunk/py4science/examples/sphinx_template/model/index.rst
trunk/py4science/examples/sphinx_template/model/introduction.rst
trunk/py4science/examples/sphinx_template/model/next_steps.rst
trunk/py4science/examples/sphinx_template/model/sphinx_helpers.rst
trunk/py4science/examples/sphinx_template/simulations/
trunk/py4science/examples/sphinx_template/simulations/code/
trunk/py4science/examples/sphinx_template/simulations/code/elegant.py
trunk/py4science/examples/sphinx_template/simulations/code/hairy.py
trunk/py4science/examples/sphinx_template/simulations/code/make.py
trunk/py4science/examples/sphinx_template/simulations/finale.rst
trunk/py4science/examples/sphinx_template/simulations/index.rst
trunk/py4science/examples/sphinx_template/simulations/introduction.rst
trunk/py4science/examples/sphinx_template/simulations/preliminary.rst

Added: trunk/py4science/examples/sphinx_template/README.txt
===
--- trunk/py4science/examples/sphinx_template/README.txt
(rev 0)
+++ trunk/py4science/examples/sphinx_template/README.txt2008-06-03 
20:57:02 UTC (rev 5379)
@@ -0,0 +1,26 @@
+sphinx template sampledoc
+=
+
+This is the top level build directory for the sphinx sampledoc
+documentation.  All of the documentation is written using sphinx, a
+python documentation system built on top of ReST.  This directory
+contains
+
+
+* model - A document describing a model
+
+* simulations - A document describing the simulations -- contains a
+  code subdir with python scripts and a make.py file to build them
+  into PNGs
+
+* make.py - the build script to build the html or PDF docs.  Do
+  `python make.py html` or `python make.py latex` for PDF
+
+* index.rst - the top level include document for sampledocs document
+
+* conf.py - the sphinx configuration
+
+* _static - used by the sphinx build system
+
+* _templates - used by the sphinx build system
+

Added: trunk/py4science/examples/sphinx_template/conf.py
===
--- trunk/py4science/examples/sphinx_template/conf.py   
(rev 0)
+++ trunk/py4science/examples/sphinx_template/conf.py   2008-06-03 20:57:02 UTC 
(rev 5379)
@@ -0,0 +1,161 @@
+# -*- coding: utf-8 -*-
+#
+# sampledoc documentation build configuration file, created by
+# sphinx-quickstart on Tue Jun  3 12:40:24 2008.
+#
+# This file is execfile()d with the current directory set to its containing 
dir.
+#
+# The contents of this file are pickled, so don't put values in the namespace
+# that aren't pickleable (module imports are okay, they're removed 
automatically).
+#
+# All configuration values have a default value; values that are commented out
+# serve to show the default value.
+
+import sys, os
+
+# If your extensions are in another directory, add it here. If the directory
+# is relative to the documentation root, use os.path.abspath to make it
+# absolute, like shown here.
+#sys.path.append(os.path.abspath('some/directory'))
+
+# General configuration
+# -
+
+# Add any Sphinx extension module names here, as strings. They can be 
extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+#extensions = []
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General substitutions.
+project = 'sampledoc'
+copyright = '2008, John D. Hunter, Cast of Thousands'
+
+# The default replacements for |version| and |release|, also used in various
+# other places throughout the built documents.
+#
+# The short X.Y version.
+version = '0.1'
+# The full version, including alpha/beta/rc tags.
+release = '0.1'
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+today_fmt = '%B %d, %Y'
+
+# List of documents that shouldn't be included in the build.
+#unused_docs = []
+
+# List of directories, relativ