Skip to content

updated rangemode within axes.md #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions julia/axes.md
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ plot(
)
```

#### <code>nonnegative</code>, <code>tozero</code>, and <code>normal</code> Rangemode
#### `"nonnegative"`, `"tozero"`, and `"normal"` Rangemode

The axis auto-range calculation logic can be configured using the `rangemode` axis parameter.

Expand All @@ -620,13 +620,11 @@ If `rangemode` is `"normal"` (the default), the range is computed based on the m
```julia
using PlotlyJS

df = dataset(DataFrame, "iris")

plot(
df, x=:sepal_width, y=:sepal_length, facet_col=:species,
kind="scatter", mode="markers",
Layout(yaxis_range=[9, 3]),
)
p1 = PlotlyJS.plot(PlotlyJS.scatter(y=[2,0,1,1,0,2], x=[-3,-2,-1,1,2,3]), Layout(xaxis_rangemode = "normal"))
p2 = PlotlyJS.plot(PlotlyJS.scatter(y=[2,0,1,1,0,2], x=[-3,-2,-1,1,2,3]), Layout(xaxis_rangemode = "nonnegative"))
p = [p1 p2]
PlotlyJS.relayout!(p, title_text="Side by side layout (1 x 2)")
p
```

#### Setting the domain of the axis
Expand Down