From 24cd6f4338871301a0fbb5b7ebc760c6abca5fb8 Mon Sep 17 00:00:00 2001
From: Jonathan Fogel <77300605+fogeljonathan@users.noreply.github.com>
Date: Wed, 12 Apr 2023 13:04:39 -0400
Subject: [PATCH] updated rangemode within axes.md
Incorrectly displayed rangemode on site. Title was displaying html brackets, and example was a copy of a previous example. Added an example according to previous conventions that displays normal and nonnegative types on the x axis of a simple plot.
---
julia/axes.md | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/julia/axes.md b/julia/axes.md
index e5dc0ea..7ee1afd 100644
--- a/julia/axes.md
+++ b/julia/axes.md
@@ -611,7 +611,7 @@ plot(
)
```
-#### nonnegative, tozero, and normal Rangemode
+#### `"nonnegative"`, `"tozero"`, and `"normal"` Rangemode
The axis auto-range calculation logic can be configured using the `rangemode` axis parameter.
@@ -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