Skip to content

List / chart of default colors? #1939

Answered by Fil
Hvass-Labs asked this question in Q&A
Dec 6, 2023 · 1 comments · 10 replies
Discussion options

You must be logged in to vote

The recommended way to do this is to reuse the scale that the first plot computes:

const chart1 = Plot.plot({………});
const chart2 = Plot.plot({………, color: chart1.scale("color")});

The color schemes are described in https://observablehq.com/plot/features/scales#color-scales

Replies: 1 comment 10 replies

Comment options

Fil
Dec 6, 2023
Collaborator

You must be logged in to vote
10 replies
@Hvass-Labs
Comment options

@Hvass-Labs
Comment options

@mbostock
Comment options

@mbostock
Comment options

@Hvass-Labs
Comment options

Answer selected by mbostock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants