8000 Update colormap user page by kthyng · Pull Request #5611 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Update colormap user page #5611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 3, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
removed Lfunction since it is outdated and also removed that part fro…
…m the docs. Changed grayscale plot to use colorspacious CAM02-UCS instead of CIELAB
  • Loading branch information
kthyng committed Dec 3, 2015
commit de5906ff842caafc13183d00ea8512acf7fcfe86
13 changes: 0 additions & 13 deletions doc/users/colormaps.rst
Original file line number Diff line number Diff line change
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 gi 8000 ves 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
157 changes: 0 additions & 157 deletions doc/users/plotting/colormaps/Lfunction.py

This file was deleted.

7 changes: 3 additions & 4 deletions doc/users/plotting/colormaps/grayscale.py
Original file line number Diff line number Diff line change
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})

Expand All @@ -37,8 +36,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