Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

import numpy as np
import holoviews as hv

hv.extension("bokeh")
Loading...
Loading...
Loading...
x = np.linspace(0, 4 * np.pi, 100)
y = np.sin(x)

scatter1 = hv.Scatter((x, y), label="sin(x)")
scatter2 = hv.Scatter((x, y * 2), label="2*sin(x)")
scatter3 = hv.Scatter((x, y * 3), label="3*sin(x)")
example1 = scatter1 * scatter2.options(color="orange") * scatter3.options(color="green")
example2 = (
    scatter1
    * hv.Curve(scatter1)
    * hv.Curve(scatter2).options(line_dash=(4, 4), color="orange")
    * scatter3.options(line_color="green", marker="square", fill_alpha=0, size=5)
    * hv.Curve(scatter3)
)

example1.relabel("Legend Example") + example2.relabel("Another Legend Example")
Loading...