SF.net SVN: matplotlib: [3937] branches/transforms

2007-10-12 Thread mdboom
Revision: 3937
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3937&view=rev
Author:   mdboom
Date: 2007-10-12 05:27:25 -0700 (Fri, 12 Oct 2007)

Log Message:
---
First pass through all of the examples -- not all working yet,
though.  (See PASSED_DEMOS).

Modified Paths:
--
branches/transforms/PASSED_DEMOS
branches/transforms/examples/to_numeric.py
branches/transforms/lib/matplotlib/axes.py
branches/transforms/lib/matplotlib/collections.py
branches/transforms/lib/matplotlib/figure.py
branches/transforms/lib/matplotlib/patches.py
branches/transforms/lib/matplotlib/path.py
branches/transforms/lib/matplotlib/projections/polar.py
branches/transforms/lib/matplotlib/pyplot.py
branches/transforms/lib/matplotlib/quiver.py
branches/transforms/lib/matplotlib/table.py
branches/transforms/lib/matplotlib/widgets.py
branches/transforms/src/_backend_agg.cpp

Modified: branches/transforms/PASSED_DEMOS
===
--- branches/transforms/PASSED_DEMOS2007-10-11 22:09:18 UTC (rev 3936)
+++ branches/transforms/PASSED_DEMOS2007-10-12 12:27:25 UTC (rev 3937)
@@ -148,63 +148,63 @@
 pcolor_log.py  O
 pcolor_nonuniform.py   O
 pcolor_small.pyO
-pick_event_demo2.py
-pick_event_demo.py
-pie_demo.py
-plotfile_demo.py
-polar_bar.py
-polar_demo.py
-polar_legend.py
-polar_scatter.py
-poly_editor.py
-poormans_contour.py
+pick_event_demo2.pyO
+pick_event_demo.py O
+pie_demo.pyO
+plotfile_demo.py   O
+polar_bar.py   O
+polar_demo.py  O
+polar_legend.pyO
+polar_scatter.py   O
+poly_editor.py [NEEDS OVERHAUL]
+poormans_contour.pyO
 printing_in_wx.py
-print_stdout.py
-psd_demo.py
+print_stdout.py[BROKEN?]
+psd_demo.pyO
 pstest.py
 pylab_with_gtk.py
-pythonic_matplotlib.py
-quadmesh_demo.py
-quiver_demo.py
-rc_traits.py
-scatter_custom_symbol.py
-scatter_demo2.py
-scatter_demo.py
-scatter_masked.py
-scatter_profile.py
-scatter_star_poly.py
-set_and_get.py
-shared_axis_across_figures.py
-shared_axis_demo.py
-simple3d_oo.py
-simple3d.py
-simple_plot_fps.py
-simple_plot.py
-specgram_demo.py
-spy_demos.py
-stem_plot.py
-step_demo.py
-stock_demo.py
-strip_chart_demo.py
-subplot_demo.py
-subplots_adjust.py
-subplot_toolbar.py
-system_monitor.py
-table_demo.py
-tex_demo.py
-text_handles.py
-text_rotation.py
-text_themes.py
-tex_unicode_demo.py
-toggle_images.py
-to_numeric.py
+pythonic_matplotlib.py O
+quadmesh_demo.py   [MASKED VALUES NOT QUITE RIGHT]
+quiver_demo.py [SEGFAULTS]
+rc_traits.py   [N/A]
+scatter_custom_symbol.py O
+scatter_demo2.py   O
+scatter_demo.pyO
+scatter_masked.py  O
+scatter_profile.py O
+scatter_star_poly.py   O [SOME BUGS IN TRUNK -- FIXED ON BRANCH]
+set_and_get.py O
+shared_axis_across_figures.py O
+shared_axis_demo.pyO
+simple3d_oo.py [PUNTING ON 3D FOR NOW]
+simple3d.py[PUNTING ON 3D FOR NOW]
+simple_plot_fps.py O
+simple_plot.py O
+specgram_demo.py   O
+spy_demos.py   O
+stem_plot.py   O
+step_demo.py   O
+stock_demo.py  O
+strip_chart_demo.py[REQUIRES GTK]
+subplot_demo.pyO
+subplots_adjust.py O
+subplot_toolbar.py O
+system_monitor.py  O
+table_demo.py  
+tex_demo.pyO
+text_handles.pyO
+text_rotation.py   O   
+text_themes.py O   
+tex_unicode_demo.pyO
+toggle_images.py   [???]
+to_numeric.py  [REQUIRES PIL]
 transoffset.py
-two_scales.py
-unicode_demo.py
-vertical_ticklabels.py
-vline_demo.py
-webapp_demo.py
-wxcursor_demo.py
-xcorr_demo.py
-zoom_window.py
-zorder_demo.py
+two_scales.py  O
+unicode_demo.pyO
+vertical_ticklabels.py O
+vline_demo.py  O
+webapp_demo.py 
+wxcursor_demo.py   
+xcorr_demo.py  O   
+zoom_window.py O
+zorder_demo.py O

Modified: branches/transforms/examples/to_numeric.py
===
--- branches/transforms/examples/to_numeric.py  2007-10-11 22:09:18 UTC (rev 
3936)
+++ branches/transforms/examples/to_numeric.py  2007-10-12 12:27:25 UTC (rev 
3937)
@@ -17,7 +17,7 @@
 s = agg.tostring_rgb()
 
 # get the width and the height to resize the matrix
-l,b,w,h = agg.figure.bbox.get_bounds()
+l,b,w,h = agg.figure.bbox.bounds
 w, h = int(w), int(h)
 
 

Modified: branches/transforms/lib/matplotlib/axes.py
===
--- branches/transforms/lib/matplotlib/axes.py  2007-10-11 22:09:18 UTC (rev 
3936)
+++ branches/transforms/lib/matplotlib/axes.py  2007-10-12 12:27:25 UTC (rev 
3937)
@@ -1196,9 +1196,9 @@
   len(self.lines)==0 and
   len(self.patches)==0)):
 
-if scalex:

SF.net SVN: matplotlib: [3938] branches/transforms/lib/matplotlib/ projections/__init__.py

2007-10-12 Thread mdboom
Revision: 3938
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3938&view=rev
Author:   mdboom
Date: 2007-10-12 07:29:57 -0700 (Fri, 12 Oct 2007)

Log Message:
---
Forgot the __init__.py

Added Paths:
---
branches/transforms/lib/matplotlib/projections/__init__.py

Added: branches/transforms/lib/matplotlib/projections/__init__.py
===
--- branches/transforms/lib/matplotlib/projections/__init__.py  
(rev 0)
+++ branches/transforms/lib/matplotlib/projections/__init__.py  2007-10-12 
14:29:57 UTC (rev 3938)
@@ -0,0 +1,39 @@
+from polar import PolarAxes
+from matplotlib import axes
+
+class ProjectionRegistry(object):
+def __init__(self):
+self._all_projection_types = {}
+
+def register(self, *projections):
+for projection in projections:
+name = projection.name
+self._all_projection_types[name] = projection
+
+def get_projection_class(self, name):
+return self._all_projection_types[name]
+
+def get_projection_names(self):
+names = self._all_projection_types.keys()
+names.sort()
+return names
+projection_registry = ProjectionRegistry()
+
+projection_registry.register(
+axes.Axes,
+PolarAxes)
+
+def get_projection_class(projection):
+if projection is None:
+projection = 'rectilinear'
+
+try:
+return projection_registry.get_projection_class(projection)
+except KeyError:
+raise ValueError("Unknown projection '%s'" % projection)
+
+def projection_factory(projection, figure, rect, **kwargs):
+return get_projection_class(projection)(figure, rect, **kwargs)
+
+def get_projection_names():
+return projection_registry.get_projection_names()


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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [3939] branches/transforms

2007-10-12 Thread mdboom
Revision: 3939
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3939&view=rev
Author:   mdboom
Date: 2007-10-12 10:30:17 -0700 (Fri, 12 Oct 2007)

Log Message:
---
More progress on examples.

Modified Paths:
--
branches/transforms/PASSED_DEMOS
branches/transforms/examples/collections_demo.py
branches/transforms/examples/simple_plot_fps.py
branches/transforms/lib/matplotlib/axes.py
branches/transforms/lib/matplotlib/axis.py
branches/transforms/lib/matplotlib/colorbar.py
branches/transforms/lib/matplotlib/contour.py
branches/transforms/lib/matplotlib/text.py
branches/transforms/lib/matplotlib/ticker.py
branches/transforms/lib/matplotlib/transforms.py
branches/transforms/src/_backend_agg.cpp

Modified: branches/transforms/PASSED_DEMOS
===
--- branches/transforms/PASSED_DEMOS2007-10-12 14:29:57 UTC (rev 3938)
+++ branches/transforms/PASSED_DEMOS2007-10-12 17:30:17 UTC (rev 3939)
@@ -16,10 +16,10 @@
 arctest.py O
 arrow_demo.py  O
 axes_demo.py   O
-axes_props.py  [SOMETHING FUNNY ABOUT DASHED LINES]
+axes_props.py  O
 axhspan_demo.pyO
 axis_equal_demo.py  O
-backend_driver.py
+backend_driver.py  [N/A]
 barchart_demo.pyO
 barcode_demo.py O
 barh_demo.py   [BROKEN IN TRUNK]
@@ -29,14 +29,14 @@
 broken_barh.py O
 clippath_test.py   O
 clippedline.py O
-collections_demo.py -- [NEEDS ADDITIONAL WORK]
+collections_demo.pyO
 colorbar_only.py   O
 color_by_yvalue.py O
 color_demo.py  O
 colours.py [???]
-contour_demo.py
-contourf_demo.py
-contour_image.py
+contour_demo.pyO
+contourf_demo.py   [FLOATING POINT EXCEPTION]
+contour_image.py   [FLOATING POINT EXCEPTION]
 coords_demo.py O
 coords_report.py   O
 csd_demo.pyO

Modified: branches/transforms/examples/collections_demo.py
===
--- branches/transforms/examples/collections_demo.py2007-10-12 14:29:57 UTC 
(rev 3938)
+++ branches/transforms/examples/collections_demo.py2007-10-12 17:30:17 UTC 
(rev 3939)
@@ -87,7 +87,7 @@
 a = fig.add_subplot(2,2,3)
 
 col = collections.RegularPolyCollection(fig.dpi, 7,
-sizes = N.fabs(xx) / 10.0, offsets=xyo,
+sizes = N.fabs(xx)*10.0, offsets=xyo,
 transOffset=a.transData)
 trans = transforms.Affine2D().scale(fig.dpi/72.0)
 col.set_transform(trans)  # the points to pixels transform

Modified: branches/transforms/examples/simple_plot_fps.py
===
--- branches/transforms/examples/simple_plot_fps.py 2007-10-12 14:29:57 UTC 
(rev 3938)
+++ branches/transforms/examples/simple_plot_fps.py 2007-10-12 17:30:17 UTC 
(rev 3939)
@@ -21,11 +21,13 @@
 #savefig('simple_plot')
 
 import time
-
+from matplotlib import transforms
+
 frames = 100.0
 t = time.clock()
 ion()
 for i in xrange(int(frames)):
+transforms.CATCH = True
 part = i / frames
 axis([0.0, 1.0 - part, -1.0 + part, 1.0 - part])
 show()

Modified: branches/transforms/lib/matplotlib/axes.py
===
--- branches/transforms/lib/matplotlib/axes.py  2007-10-12 14:29:57 UTC (rev 
3938)
+++ branches/transforms/lib/matplotlib/axes.py  2007-10-12 17:30:17 UTC (rev 
3939)
@@ -1110,7 +1110,6 @@
 # and the data in xydata
 # MGDTODO: This isn't always the most efficient way to do this... in
 # some cases things should use update_datalim_bounds
-
 if not ma.isMaskedArray(xys):
 xys = npy.asarray(xys)
 self.update_datalim_numerix(xys[:, 0], xys[:, 1])

Modified: branches/transforms/lib/matplotlib/axis.py
===
--- branches/transforms/lib/matplotlib/axis.py  2007-10-12 14:29:57 UTC (rev 
3938)
+++ branches/transforms/lib/matplotlib/axis.py  2007-10-12 17:30:17 UTC (rev 
3939)
@@ -91,16 +91,18 @@
 self._size = size
 
 self._padPixels = self.figure.dpi * self._pad * (1/72.0)
+self._locTransform = Affine2D()
+
+self.tick1line = self._get_tick1line()
+self.tick2line = self._get_tick2line()
+self.gridline = self._get_gridline()
 
-
-self.tick1line = self._get_tick1line(loc)
-self.tick2line = self._get_tick2line(loc)
-self.gridline = self._get_gridline(loc)
-
-self.label1 = self._get_text1(loc)
+self.label1 = self._get_text1()
 self.label = self.label1  # legacy name
-self.label2 = self._get_text2(loc)
+self.label2 = self._get_text2()
 
+self.update_position(loc)
+