summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hunter <jdh2358@gmail.com>2008-06-24 18:13:40 +0000
committerJohn Hunter <jdh2358@gmail.com>2008-06-24 18:13:40 +0000
commitca27821ea5fcad5e5fdf3431fc96ea0037799945 (patch)
tree06464f005f1933ee88a6f397fe0b671e39508404
parent4c2e06be02a1f1409bee1c3d515fff822d98ad8d (diff)
tagging 98.2v0.98.2
svn path=/trunk/matplotlib/; revision=5667
-rw-r--r--MANIFEST.in1
-rwxr-xr-xdoc/make.py3
-rw-r--r--examples/animation/dynamic_demo_wx.py132
-rw-r--r--examples/user_interfaces/embedding_in_wx4.py5
-rw-r--r--lib/matplotlib/__init__.py2
-rw-r--r--lib/matplotlib/artist.py26
-rw-r--r--lib/matplotlib/scale.py8
7 files changed, 21 insertions, 156 deletions
diff --git a/MANIFEST.in b/MANIFEST.in
index 01917a5ee..739208150 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -15,6 +15,7 @@ include lib/matplotlib/mpl-data/fonts/pdfcorefonts/*
include lib/matplotlib/mpl-data/fonts/afm/*
recursive-include license LICENSE*
recursive-include examples *
+recursive-include doc *
recursive-include src *.cpp *.c *.h
recursive-include CXX *.cxx *.hxx *.c *.h
recursive-include agg24 *
diff --git a/doc/make.py b/doc/make.py
index f0d4d17b4..7cdd7a777 100755
--- a/doc/make.py
+++ b/doc/make.py
@@ -20,8 +20,7 @@ def sf():
def sfpdf():
'push a copy to the sf site'
-
- #os.system('cd build/latex; scp Matplotlib.pdf jdh2358@matplotlib.sf.net:/home/groups/m/ma/matplotlib/htdocs/doc/')
+ os.system('cd build/latex; scp Matplotlib.pdf jdh2358@matplotlib.sf.net:/home/groups/m/ma/matplotlib/htdocs/doc/')
def figs():
os.system('cd users/figures/ && python make.py')
diff --git a/examples/animation/dynamic_demo_wx.py b/examples/animation/dynamic_demo_wx.py
deleted file mode 100644
index 4d3ff6fd5..000000000
--- a/examples/animation/dynamic_demo_wx.py
+++ /dev/null
@@ -1,132 +0,0 @@
-#!/usr/bin/env python
-"""
-Copyright (C) Jeremy O'Donoghue, 2003
-
-License: This work is licensed under the PSF. A copy should be included
-with this source code, and is also available at
-http://www.python.org/psf/license.html
-
-This is a sample showing how to embed a matplotlib figure in a wxPanel,
-and update the contents whenever a timer event occurs. It is inspired
-by the GTK script dynamic_demo.py, by John Hunter (should be supplied with
-this file) but I have assumed that you may wish to embed a figure inside
-your own arbitrary frame, which makes the code slightly more complicated.
-
-It goes without saying that you can update the display on any event, not
-just a timer...
-
-Should you require a toolbar and navigation, inspire yourself from
-embedding_in_wx.py, which provides these features.
-
-Modification History:
-$Log$
-Revision 1.7 2005/06/15 20:24:56 jdh2358
-syncing for 82
-
-Revision 1.6 2004/10/26 18:08:13 astraw
-Converted to use new NavigationToolbar2 (from old Toolbar).
-
-Revision 1.5 2004/06/26 06:37:20 astraw
-Trivial bugfix to eliminate IndexError
-
-Revision 1.4 2004/05/03 12:12:26 jdh2358
-added bang header to examples
-
-Revision 1.3 2004/03/08 22:17:20 jdh2358
-
-* Fixed embedding_in_wx and dynamic_demo_wx examples
-
-* Ported build to darwin
-
-* Tk:
-
- removed default figman=None from nav toolbar since it needs the
- figman
-
- fixed close bug
-
- small changes to aid darwin build
-
-Revision 1.2 2004/02/26 20:22:58 jaytmiller
-Added the "numerix" Numeric/numarray selector module enabling matplotlib
-to work with either numarray or Numeric. See matplotlib.numerix.__doc__.
-
-Revision 1.1 2003/12/30 17:22:09 jodonoghue
-First version of dynamic_demo for backend_wx
-"""
-
-
-import matplotlib
-matplotlib.use('WX')
-from matplotlib.backends.backend_wx import FigureCanvasWx,\
- FigureManager, NavigationToolbar2Wx
-
-from matplotlib.figure import Figure
-import numpy
-from wx import *
-
-
-TIMER_ID = NewId()
-
-class PlotFigure(Frame):
-
- def __init__(self):
- Frame.__init__(self, None, -1, "Test embedded wxFigure")
-
- self.fig = Figure((5,4), 75)
- self.canvas = FigureCanvasWx(self, -1, self.fig)
- self.toolbar = NavigationToolbar2Wx(self.canvas)
- self.toolbar.Realize()
-
- # On Windows, default frame size behaviour is incorrect
- # you don't need this under Linux
- tw, th = self.toolbar.GetSizeTuple()
- fw, fh = self.canvas.GetSizeTuple()
- self.toolbar.SetSize(Size(fw, th))
-
- # Create a figure manager to manage things
- self.figmgr = FigureManager(self.canvas, 1, self)
- # Now put all into a sizer
- sizer = BoxSizer(VERTICAL)
- # This way of adding to sizer allows resizing
- sizer.Add(self.canvas, 1, LEFT|TOP|GROW)
- # Best to allow the toolbar to resize!
- sizer.Add(self.toolbar, 0, GROW)
- self.SetSizer(sizer)
- self.Fit()
- EVT_TIMER(self, TIMER_ID, self.onTimer)
-
- def init_plot_data(self):
- a = self.fig.add_subplot(111)
- self.ind = numpy.arange(60)
- tmp = []
- for i in range(60):
- tmp.append(numpy.sin((self.ind+i)*numpy.pi/15))
- self.X = numpy.array(tmp)
- self.lines = a.plot(self.X[:,0],'o')
- self.count = 0
-
- def GetToolBar(self):
- # You will need to override GetToolBar if you are using an
- # unmanaged toolbar in your frame
- return self.toolbar
-
- def onTimer(self, evt):
- self.count += 1
- if self.count >= 60: self.count = 0
- self.lines[0].set_data(self.ind, self.X[:,self.count])
- self.canvas.draw()
- self.canvas.gui_repaint()
-
-if __name__ == '__main__':
- app = PySimpleApp()
- frame = PlotFigure()
- frame.init_plot_data()
-
- # Initialise the timer - wxPython requires this to be connected to the
- # receivicng event handler
- t = Timer(frame, TIMER_ID)
- t.Start(100)
-
- frame.Show()
- app.MainLoop()
diff --git a/examples/user_interfaces/embedding_in_wx4.py b/examples/user_interfaces/embedding_in_wx4.py
index 8ed536675..26853381d 100644
--- a/examples/user_interfaces/embedding_in_wx4.py
+++ b/examples/user_interfaces/embedding_in_wx4.py
@@ -8,11 +8,6 @@ from numpy import arange, sin, pi
import matplotlib
-# uncomment the following to use wx rather than wxagg
-#matplotlib.use('WX')
-#from matplotlib.backends.backend_wx import FigureCanvasWx as FigureCanvas
-
-# comment out the following to use wx rather than wxagg
matplotlib.use('WXAgg')
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
from matplotlib.backends.backend_wxagg import NavigationToolbar2WxAgg
diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
index d900d939b..1770aa2a2 100644
--- a/lib/matplotlib/__init__.py
+++ b/lib/matplotlib/__init__.py
@@ -89,7 +89,7 @@ host of others.
"""
from __future__ import generators
-__version__ = '0.98.1'
+__version__ = '0.98.2'
__revision__ = '$Revision$'
__date__ = '$Date$'
diff --git a/lib/matplotlib/artist.py b/lib/matplotlib/artist.py
index cbbc569bb..ca771e71a 100644
--- a/lib/matplotlib/artist.py
+++ b/lib/matplotlib/artist.py
@@ -690,37 +690,43 @@ class ArtistInspector:
return lines
-def getp(o, *args):
+def getp(o, property=None):
"""
- .. TODO: What are 's' and 'h' arguments described below?
+ Return the value of handle property. property is an optional string
+ for the property you want to return
- Return the value of handle property s
+ Example usage::
- h is an instance of a class, eg a Line2D or an Axes or Text.
- if s is 'somename', this function returns
+ getp(o) # get all the object properties
+ getp(o, 'linestyle') # get the linestyle property
+
+
+ o is a :class:`Artist` instance, eg
+ :class:`~matplotllib.lines.Line2D` or an instance of a
+ :class:`~matplotlib.axes.Axes` or :class:`matplotlib.text.Text`.
+ If the *property* is 'somename', this function returns
o.get_somename()
getp can be used to query all the gettable properties with getp(o)
Many properties have aliases for shorter typing, eg 'lw' is an
alias for 'linewidth'. In the output, aliases and full property
- names will be listed as:
+ names will be listed as::
property or alias = value
- e.g.:
+ e.g.::
linewidth or lw = 2
"""
insp = ArtistInspector(o)
- if len(args)==0:
+ if property is None:
print '\n'.join(insp.pprint_getters())
return
- name = args[0]
- func = getattr(o, 'get_' + name)
+ func = getattr(o, 'get_' + property)
return func()
def get(o, *args, **kwargs):
diff --git a/lib/matplotlib/scale.py b/lib/matplotlib/scale.py
index 52b34d293..26831ebd8 100644
--- a/lib/matplotlib/scale.py
+++ b/lib/matplotlib/scale.py
@@ -178,9 +178,7 @@ class LogScale(ScaleBase):
*subsx*/*subsy*:
Where to place the subticks between each major tick.
Should be a sequence of integers. For example, in a log10
- scale::
-
- [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
+ scale: ``[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]``
will place 10 logarithmically spaced minor ticks between
each major tick.
@@ -291,9 +289,7 @@ class SymmetricalLogScale(ScaleBase):
*subsx*/*subsy*:
Where to place the subticks between each major tick.
Should be a sequence of integers. For example, in a log10
- scale::
-
- [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
+ scale: ``[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]``
will place 10 logarithmically spaced minor ticks between
each major tick.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback