Skip to content

Commit

Permalink
add note about setting limits (#370)
Browse files Browse the repository at this point in the history
* Add note about setting limits

* add example

---------

Co-authored-by: t-bltg <tf.bltg@gmail.com>
  • Loading branch information
IanButterworth and t-bltg authored Dec 26, 2023
1 parent 7e6b0af commit a4744f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ Here is a list of the main high-level functions for common scenarios:
```
<img src="https://github.com/JuliaPlots/UnicodePlots.jl/raw/unicodeplots-docs/3.x/lineplot3.png" width="450"><br>


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`:
```julia
p = Plot(; xlim=(-1, 3), ylim=(-1, 3))
lineplot!(p, 1:2)

One can adjust the plot `height` and `width` to the current terminal size by using `height=:auto` and/or `width=:auto`.

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

0 comments on commit a4744f3

Please sign in to comment.