Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f383777

Browse files
author
Jeff Whitaker
committed
changed name of lightsource class to LightSource to conform to coding guidelines.
svn path=/trunk/matplotlib/; revision=7007
1 parent 6f5d462 commit f383777

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

CHANGELOG

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
2009-03-17 Fix bugs in edge color handling by contourf, found
1010
by Jae-Joon Lee. - EF
1111

12-
2009-03-14 Added 'lightsource' class to colors module for
12+
2009-03-14 Added 'LightSource' class to colors module for
1313
creating shaded relief maps. shading_example.py
1414
added to illustrate usage. - JSW
1515

examples/pylab_examples/shading_example.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import numpy as np
22
import matplotlib.pyplot as plt
3-
from matplotlib.colors import lightsource
3+
from matplotlib.colors import LightSource
44

55
# example showing how to make shaded relief plots
66
# like mathematica
@@ -12,7 +12,7 @@
1212
X,Y=np.mgrid[-5:5:0.05,-5:5:0.05]
1313
Z=np.sqrt(X**2+Y**2)+np.sin(X**2+Y**2)
1414
# creat light source object.
15-
ls = lightsource(azdeg=0,altdeg=65)
15+
ls = LightSource(azdeg=0,altdeg=65)
1616
# shade data, creating an rgb array.
1717
rgb = ls.shade(Z,plt.cm.copper)
1818
# plot un-shaded and shaded images.

lib/matplotlib/colors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ def hsv_to_rgb(hsv):
955955
rgb[:,:,0]=r; rgb[:,:,1]=g; rgb[:,:,2]=b
956956
return rgb
957957

958-
class lightsource(object):
958+
class LightSource(object):
959959
"""
960960
Create a light source coming from the specified azimuth and elevation.
961961
Angles are in degrees, with the azimuth measured

0 commit comments

Comments
 (0)