Skip to content

Commit e1feadf

Browse files
committed
axis: line is (more) useful for categorical axes
1 parent 983e834 commit e1feadf

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

CHANGELOG.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,20 +71,21 @@ Diverging scales now support a *symmetric* option, which defaults to true, to en
7171

7272
Diverging color scales now also support transformations via four new scale types: *diverging-sqrt*, *diverging-pow*, *diverging-log*, and *diverging-symlog*, corresponding to the *sqrt*, *pow*, *log*, and *symlog* quantitative scale types respectively. (The above choropleth uses a *diverging-log* scale to show relative change.)
7373

74-
The new axis *line* option, which defaults to false, can be used to show a continuous line along the *x* or *y* axis. Using a rule to annotate a meaningful value, such as zero, is generally preferred over the *line* option.
74+
The new axis *line* option, which defaults to false, can be used to show a continuous line along the *x* or *y* axis. For continuous scales, a rule annotating a meaningful value, such as zero, is generally preferred over the *line* option.
7575

76-
<img width="640" alt="an empty plot showing horizontal and vertical lines along the x and y axes, respectively" src="https://user-images.githubusercontent.com/230541/130158604-2b157912-e131-4736-bba0-0c7403818cf0.png">
76+
<img width="640" alt="an empty plot showing horizontal and vertical lines along ordinal x and y axes, respectively" src="https://user-images.githubusercontent.com/7001/130227092-5f02f326-ac9b-478a-8eff-f11ec737f30e.png">
7777

7878
```js
7979
Plot.plot({
8080
grid: true,
81-
line: true,
8281
inset: 6,
8382
x: {
84-
domain: [0, 1]
83+
line: true,
84+
domain: [..."ABCDEFGH"]
8585
},
8686
y: {
87-
domain: [0, 1]
87+
line: true,
88+
domain: [..."abcdefg"]
8889
}
8990
})
9091
```

0 commit comments

Comments
 (0)