From: <js...@us...> - 2009-03-27 21:10:51
|
Revision: 7007 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7007&view=rev Author: jswhit Date: 2009-03-27 21:10:24 +0000 (Fri, 27 Mar 2009) Log Message: ----------- changed name of lightsource class to LightSource to conform to coding guidelines. Modified Paths: -------------- trunk/matplotlib/CHANGELOG trunk/matplotlib/examples/pylab_examples/shading_example.py trunk/matplotlib/lib/matplotlib/colors.py Modified: trunk/matplotlib/CHANGELOG =================================================================== --- trunk/matplotlib/CHANGELOG 2009-03-27 18:11:18 UTC (rev 7006) +++ trunk/matplotlib/CHANGELOG 2009-03-27 21:10:24 UTC (rev 7007) @@ -9,7 +9,7 @@ 2009-03-17 Fix bugs in edge color handling by contourf, found by Jae-Joon Lee. - EF -2009-03-14 Added 'lightsource' class to colors module for +2009-03-14 Added 'LightSource' class to colors module for creating shaded relief maps. shading_example.py added to illustrate usage. - JSW Modified: trunk/matplotlib/examples/pylab_examples/shading_example.py =================================================================== --- trunk/matplotlib/examples/pylab_examples/shading_example.py 2009-03-27 18:11:18 UTC (rev 7006) +++ trunk/matplotlib/examples/pylab_examples/shading_example.py 2009-03-27 21:10:24 UTC (rev 7007) @@ -1,6 +1,6 @@ import numpy as np import matplotlib.pyplot as plt -from matplotlib.colors import lightsource +from matplotlib.colors import LightSource # example showing how to make shaded relief plots # like mathematica @@ -12,7 +12,7 @@ X,Y=np.mgrid[-5:5:0.05,-5:5:0.05] Z=np.sqrt(X**2+Y**2)+np.sin(X**2+Y**2) # creat light source object. -ls = lightsource(azdeg=0,altdeg=65) +ls = LightSource(azdeg=0,altdeg=65) # shade data, creating an rgb array. rgb = ls.shade(Z,plt.cm.copper) # plot un-shaded and shaded images. Modified: trunk/matplotlib/lib/matplotlib/colors.py =================================================================== --- trunk/matplotlib/lib/matplotlib/colors.py 2009-03-27 18:11:18 UTC (rev 7006) +++ trunk/matplotlib/lib/matplotlib/colors.py 2009-03-27 21:10:24 UTC (rev 7007) @@ -955,7 +955,7 @@ rgb[:,:,0]=r; rgb[:,:,1]=g; rgb[:,:,2]=b return rgb -class lightsource(object): +class LightSource(object): """ Create a light source coming from the specified azimuth and elevation. Angles are in degrees, with the azimuth measured This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |