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

Skip to content

Commit e038afb

Browse files
committed
Use local colorconv rather than scikit-image
1 parent 8aa2a4e commit e038afb

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

doc/users/plotting/colormaps/Lfunction.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66

77
import numpy as np
88
import matplotlib.pyplot as plt
9-
from skimage import color
9+
import colorconv as color
10+
#from skimage import color
11+
# we are using a local copy of colorconv from scikit-image to reduce dependencies.
12+
# You should probably use the one from scikit-image in most cases.
1013
import matplotlib as mpl
1114
from matplotlib import cm
1215

doc/users/plotting/colormaps/grayscale.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
Uses lightness L* as a proxy for grayscale value.
44
'''
55

6-
from skimage import color
6+
import colorconv as color
7+
#from skimage import color
8+
# we are using a local copy of colorconv from scikit-image to reduce dependencies.
9+
# You should probably use the one from scikit-image in most cases.
710
import numpy as np
811
import matplotlib.pyplot as plt
912
from matplotlib import cm
@@ -71,6 +74,7 @@ def plot_color_gradients(cmap_category, cmap_list):
7174
for ax in axes:
7275
ax[0].set_axis_off()
7376
ax[1].set_axis_off()
77+
plt.show()
7478

7579

7680
for cmap_category, cmap_list in cmaps:

doc/users/plotting/colormaps/lightness.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
For each colormap, plot the lightness parameter L* from CIELAB colorspace along the y axis vs index through the colormap. Colormaps are examined in categories as in the original matplotlib gallery of colormaps.
33
'''
44

5-
from skimage import color
5+
import colorconv as color
6+
#from skimage import color
7+
# we are using a local copy of colorconv from scikit-image to reduce dependencies.
8+
# You should probably use the one from scikit-image in most cases.
69
import numpy as np
710
import matplotlib.pyplot as plt
811
from matplotlib import cm
@@ -126,4 +129,4 @@
126129
fig.text(-0.005, 0.55, 'Lightness $L^*$', fontsize=18, transform=fig.transFigure, rotation=90)
127130

128131
fig.tight_layout(h_pad=0.05)
129-
plt.show
132+
plt.show()

0 commit comments

Comments
 (0)