Skip to content

Commit

Permalink
improve set_scale/4 docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pnezis committed Dec 8, 2023
1 parent 932e378 commit 0c94b54
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/tucan/scale.ex
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,9 @@ defmodule Tucan.Scale do
Notice that only continuous scales are supported.
See also `set_x_scale/3` and `set_y_scale/3` wrappers for setting the scale
directly on *x* and *y* axes.
> #### Continuous Scales {: .neutral}
>
> Continuous scales map a continuous domain (numbers or dates) to a continuous
Expand Down Expand Up @@ -349,14 +352,14 @@ defmodule Tucan.Scale do
```tucan
Tucan.scatter(:gapminder, "income", "health", width: 400)
|> Tucan.Scale.set_x_scale(:log)
|> Tucan.Scale.set_scale(:x, :log)
```
Applying pow scale on *x-axis* with arbitrary exponent.
```tucan
Tucan.scatter(:gapminder, "income", "health", width: 400)
|> Tucan.Scale.set_x_scale(:pow, exponent: 0.2)
|> Tucan.Scale.set_scale(:x, :pow, exponent: 0.2)
```
"""
@spec set_scale(vl :: VegaLite.t(), channel :: atom(), scale :: atom(), opts :: keyword()) ::
Expand Down

0 comments on commit 0c94b54

Please sign in to comment.