SourceForge logo
SourceForge logo
Menu

matplotlib-checkins

Revision: 3938
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3938&view=rev
Author: mdboom
Date: 2007年10月12日 07:29:57 -0700 (2007年10月12日)
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.
Revision: 4781
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4781&view=rev
Author: mdboom
Date: 2007年12月20日 09:14:36 -0800 (2007年12月20日)
Log Message:
-----------
Remove Mollweide from options, since it's currently broken anyway.
Modified Paths:
--------------
 branches/transforms/lib/matplotlib/projections/__init__.py
Modified: branches/transforms/lib/matplotlib/projections/__init__.py
===================================================================
--- branches/transforms/lib/matplotlib/projections/__init__.py	2007年12月20日 17:14:03 UTC (rev 4780)
+++ branches/transforms/lib/matplotlib/projections/__init__.py	2007年12月20日 17:14:36 UTC (rev 4781)
@@ -1,4 +1,4 @@
-from geo import AitoffAxes, HammerAxes, MolleweideAxes, LambertAxes
+from geo import AitoffAxes, HammerAxes, LambertAxes
 from polar import PolarAxes
 from matplotlib import axes
 
@@ -25,7 +25,6 @@
 PolarAxes,
 AitoffAxes,
 HammerAxes,
- MolleweideAxes,
 LambertAxes)
 
 def get_projection_class(projection):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4805
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4805&view=rev
Author: efiring
Date: 2008年01月07日 19:11:38 -0800 (2008年1月07日)
Log Message:
-----------
Remove spurious right parenthesis
Modified Paths:
--------------
 branches/transforms/lib/matplotlib/projections/__init__.py
Modified: branches/transforms/lib/matplotlib/projections/__init__.py
===================================================================
--- branches/transforms/lib/matplotlib/projections/__init__.py	2008年01月07日 21:18:00 UTC (rev 4804)
+++ branches/transforms/lib/matplotlib/projections/__init__.py	2008年01月08日 03:11:38 UTC (rev 4805)
@@ -26,8 +26,8 @@
 AitoffAxes,
 HammerAxes,
 LambertAxes)
-)
 
+
 def register_projection(cls):
 projection_registry.register(cls)
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /