Skip to content

Commit a4744f3

Browse files
add note about setting limits (#370)
* Add note about setting limits * add example --------- Co-authored-by: t-bltg <tf.bltg@gmail.com>
1 parent 7e6b0af commit a4744f3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@ Here is a list of the main high-level functions for common scenarios:
6161
```
6262
<img src="https://github.com/JuliaPlots/UnicodePlots.jl/raw/unicodeplots-docs/3.x/lineplot3.png" width="450"><br>
6363

64-
64+
These mutating methods cannot update the limits of the axes (xlims & ylims) as plots are drawn onto a fixed canvas. The limits must be set by the plotting function that creates the figure or by creating an empty `Plot`:
65+
```julia
66+
p = Plot(; xlim=(-1, 3), ylim=(-1, 3))
67+
lineplot!(p, 1:2)
68+
6569
One can adjust the plot `height` and `width` to the current terminal size by using `height=:auto` and/or `width=:auto`.
6670

6771
You can reverse/flip the `Plot` axes by setting `xflip=true` and/or `yflip=true` on plot creation.

0 commit comments

Comments
 (0)