yorick:earth#
Aliases: matplotlib:gist_earth, gist_earth
| collection | category | license | authors | source |
|---|---|---|---|---|
| yorick | Miscellaneous | BSD-3-Clause | David Munro | https://github.com/LLNL/yorick |
from cmap import Colormap
cm = Colormap("yorick:earth") # case insensitive
import matplotlib.pyplot as plt
from cmap import Colormap
plt.imshow(data, cmap=Colormap("yorick:earth").to_mpl())
import plotly.express as px
from cmap import Colormap
px.imshow(data, color_continuous_scale=Colormap("yorick:earth").to_plotly())
import napari
from cmap import Colormap
napari.imshow(data, colormap=Colormap("yorick:earth").to_napari())
napari.run()
background: #000000;
background: linear-gradient(90deg, #000000 0%, #01002B 0.39%, #010038 0.78%, #05006E 2.75%, #050274 3.14%, #133078 10.98%, #1C4D7A 16.47%, #23627C 20.78%, #308080 28.24%, #459A49 45.88%, #4A9B46 46.67%, #69A34E 52.16%, #76A652 54.51%, #78A652 54.9%, #B7B75E 69.8%, #C0A465 78.43%, #C1A367 78.82%, #C2A46A 79.22%, #C4A46F 80%, #C6A574 80.78%, #C8A779 81.57%, #D7B298 86.67%, #D9B59D 87.45%, #DBB8A2 88.24%, #DEBBA7 89.02%, #DFBCAA 89.41%, #E0BDAD 89.8%, #ECD3CE 94.12%, #F1DCDA 95.69%, #F3E1E0 96.47%, #FCF8F8 99.61%, #FDFBFB 100%);
import altair as alt
from cmap import Colormap
# df: a DataFrame with columns x, y and value
alt.Chart(df).mark_rect().encode(
x="x:O",
y="y:O",
color=alt.Color(
"value:Q", scale=alt.Scale(range=Colormap("yorick:earth").to_altair())
),
)
from bokeh.plotting import figure, show
from cmap import Colormap
p = figure()
p.image(
image=[data], x=0, y=0, dw=1, dh=1,
color_mapper=Colormap("yorick:earth").to_bokeh(),
)
show(p)
from vispy import app, scene
from cmap import Colormap
canvas = scene.SceneCanvas(show=True)
view = canvas.central_widget.add_view()
scene.visuals.Image(data, cmap=Colormap("yorick:earth").to_vispy(), parent=view.scene)
view.camera = scene.PanZoomCamera(aspect=1)
view.camera.set_range()
app.run()
import pygfx as gfx
from cmap import Colormap
image = gfx.Image(
gfx.Geometry(grid=gfx.Texture(data, dim=2)),
gfx.ImageBasicMaterial(
clim=(data.min(), data.max()), map=Colormap("yorick:earth").to_pygfx()
),
)
gfx.show(image)
import pyqtgraph as pg
from cmap import Colormap
view = pg.image(data)
view.setColorMap(Colormap("yorick:earth").to_pyqtgraph())
pg.exec()
import ee
from cmap import Colormap
ee.Initialize(project="my-project") # your Google Cloud project
elevation = ee.Image("CGIAR/SRTM90_V4")
image = elevation.visualize(
min=0, max=3000, palette=Colormap("yorick:earth").to_gee()
)
See also usage with external libraries.
yorick:earth
yorick:earth
Perceptual lightness#
Lightness (J′) measured in CAM02 Uniform Color Space (CAM02-UCS)