mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-07 11:28:14 +08:00
Merge pull request #1671 from jwiggins/fix-cubehelix-ref
Replace cubehelix with the viridis colormap in the RAG drawing example
This commit is contained in:
@@ -8,6 +8,7 @@ the `rag_draw` method.
|
||||
"""
|
||||
from skimage import data, segmentation
|
||||
from skimage.future import graph
|
||||
from skimage.util.colormap import viridis
|
||||
from matplotlib import pyplot as plt, colors
|
||||
|
||||
|
||||
@@ -31,9 +32,8 @@ plt.title("RAG with edge weights less than 30, color "
|
||||
plt.imshow(out)
|
||||
|
||||
plt.figure()
|
||||
plt.title("All edges drawn with cubehelix colormap")
|
||||
cmap = plt.get_cmap('cubehelix')
|
||||
out = graph.draw_rag(labels, g, img, colormap=cmap,
|
||||
plt.title("All edges drawn with viridis colormap")
|
||||
out = graph.draw_rag(labels, g, img, colormap=viridis,
|
||||
desaturate=True)
|
||||
|
||||
plt.imshow(out)
|
||||
|
||||
Reference in New Issue
Block a user