Skip to content

Commit

Permalink
Merge pull request #5611 from kthyng/update-colormap-user-page
Browse files Browse the repository at this point in the history
Update colormap user page
  • Loading branch information
tacaswell committed Dec 3, 2015
1 parent e74ae79 commit 896d089
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 185 deletions.
13 changes: 0 additions & 13 deletions doc/users/colormaps.rst
Expand Up @@ -126,19 +126,6 @@ extension on this idea at [mycarta-jet]_.

.. plot:: users/plotting/colormaps/lightness.py


:math:`L^*` function
====================

There are multiple approaches to finding the best function for :math:`L^*`
across a colormap. Linear gives reasonable results (*e.g.*, [mycarta-banding]_,
[mycarta-lablinear]_). However, the Weber-Fechner law, and more generally and
recently, Stevens' Law, indicates that a logarithmic or geometric relationship
might be better (see effort on this front at [mycarta-cubelaw]_).

.. plot:: users/plotting/colormaps/Lfunction.py


Grayscale conversion
====================

Expand Down
168 changes: 0 additions & 168 deletions doc/users/plotting/colormaps/Lfunction.py

This file was deleted.

7 changes: 3 additions & 4 deletions doc/users/plotting/colormaps/grayscale.py
Expand Up @@ -3,8 +3,6 @@
Uses lightness L* as a proxy for grayscale value.
'''

import colorconv as color

from colormaps import cmaps

#from skimage import color
Expand All @@ -14,6 +12,7 @@
import matplotlib.pyplot as plt
from matplotlib import cm
import matplotlib as mpl
from colorspacious import cspace_converter

mpl.rcParams.update({'font.size': 14})
mpl.rcParams['font.sans-serif'] = ('Arev Sans, Bitstream Vera Sans, '
Expand Down Expand Up @@ -48,8 +47,8 @@ def plot_color_gradients(cmap_category, cmap_list):
# Get rgb values for colormap
rgb = cm.get_cmap(plt.get_cmap(name))(x)[np.newaxis,:,:3]

# Get colormap in CIE LAB. We want the L here.
lab = color.rgb2lab(rgb)
# Get colormap in CAM02-UCS colorspace. We want the lightness.
lab = cspace_converter("sRGB1", "CAM02-UCS")(rgb)
L = lab[0,:,0]
L = np.float32(np.vstack((L, L, L)))

Expand Down

0 comments on commit 896d089

Please sign in to comment.