# How to adjust the range of the coordinate axis when using UnicodePlots.jl to plot a graph?

**URL:** <https://discourse.julialang.org/t/how-to-adjust-the-range-of-the-coordinate-axis-when-using-unicodeplots-jl-to-plot-a-graph/99483>\
**Category:** General Usage\
**Tags:** unicodeplots\
**Created:** [May 27, 2023, 1:01pm UTC](https://discourse.julialang.org/t/how-to-adjust-the-range-of-the-coordinate-axis-when-using-unicodeplots-jl-to-plot-a-graph/99483 "2023-05-27T13:01:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![WuSiren](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wusiren/32/42529_2.png) [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Post date:** [May 27, 2023, 1:01pm UTC](https://discourse.julialang.org/t/how-to-adjust-the-range-of-the-coordinate-axis-when-using-unicodeplots-jl-to-plot-a-graph/99483/1 "2023-05-27T13:01:38Z")

</div>

How to adjust the range of the coordinate axis when using UnicodePlots.jl to plot a graph?

As shown in the figure, I hope that the x-axis range can be from 1 to 201. Is it possible to achieve this?

![image](https://global.discourse-cdn.com/julialang/original/3X/2/b/2b66ee932129baab384fbc9c647c35088e6ad4b3.png)

---

<div class="post-metadata">

**Author:** ![t-bltg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/t-bltg/32/25526_2.png) [@t-bltg](https://discourse.julialang.org/u/t-bltg)\
**Post date:** [May 27, 2023, 1:10pm UTC](https://discourse.julialang.org/t/how-to-adjust-the-range-of-the-coordinate-axis-when-using-unicodeplots-jl-to-plot-a-graph/99483/2 "2023-05-27T13:10:14Z")

</div>

Use `xlim` and / or `ylim`, those keywords are described in [UnicodePlots.jl/README.md at master · JuliaPlots/UnicodePlots.jl · GitHub](https://github.com/JuliaPlots/UnicodePlots.jl/blob/master/README.md).

---

<div class="post-metadata">

**Author:** ![WuSiren](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wusiren/32/42529_2.png) [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Post date:** [May 27, 2023, 1:27pm UTC](https://discourse.julialang.org/t/how-to-adjust-the-range-of-the-coordinate-axis-when-using-unicodeplots-jl-to-plot-a-graph/99483/3 "2023-05-27T13:27:41Z")

</div>

Thanks! I have realized it with the following code. But is this the only way? And, can I keep the `ylim` default?

```julia
p = Plot([NaN], [NaN]; xlim=(1, 201), ylim=(0,300))
lineplot!(p, [1:201;])

```
