# Plots.jl increase spacing along axes

**URL:** <https://discourse.julialang.org/t/plots-jl-increase-spacing-along-axes/76392>\
**Category:** New to Julia\
**Tags:** plotting, plots\
**Created:** [February 14, 2022, 7:18am UTC](https://discourse.julialang.org/t/plots-jl-increase-spacing-along-axes/76392 "2022-02-14T07:18:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rwik\_Dutta](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rwik_dutta/32/33796_2.png) [@Rwik\_Dutta](https://discourse.julialang.org/u/Rwik_Dutta)\
**Post date:** [February 14, 2022, 7:18am UTC](https://discourse.julialang.org/t/plots-jl-increase-spacing-along-axes/76392/1 "2022-02-14T07:18:35Z")

</div>

I have made a bar graph using Plots.jl.  
One of the axes contains String type data.

Here are the two things I would like to do:

1. The bars are too close by. I would like to change the “spacing” between values of an axis.  
This is a problem I always face with Julia plots. How do I scale the axes?

2. The String axis does not show all the data. I would like the ticks to represent each and every String.

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [February 14, 2022, 10:06am UTC](https://discourse.julialang.org/t/plots-jl-increase-spacing-along-axes/76392/2 "2022-02-14T10:06:36Z")

</div>

For 1., use `plot()` keyword `bar_width`.  
For 2., use `xticks`.

Example:

```julia
using Plots; gr()
x, y = 'a':'z', rand(1:10, 26)
bar(x, y, xticks=(0.5:length(x)-0.5, x), xtickfontsize=5, bar_width=0.5, widen=false)

```

 ![Plots_bar_xticks_and_bar_width](https://global.discourse-cdn.com/julialang/original/3X/5/0/5056a2d21045dd62fb1b8c4435857687798e647b.png)
