# Bars in plot do not fully extend to x axis

**URL:** <https://discourse.julialang.org/t/bars-in-plot-do-not-fully-extend-to-x-axis/59735>\
**Category:** General Usage\
**Tags:** question, plotting\
**Created:** [April 21, 2021, 1:11pm UTC](https://discourse.julialang.org/t/bars-in-plot-do-not-fully-extend-to-x-axis/59735 "2021-04-21T13:11:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Post date:** [April 21, 2021, 1:11pm UTC](https://discourse.julialang.org/t/bars-in-plot-do-not-fully-extend-to-x-axis/59735/1 "2021-04-21T13:11:27Z")

</div>

I recently received the following warning in Plots:

```julia
┌ Warning: Indices Base.OneTo(3) of attribute `seriescolor` does not match data indices 1:17.
└ @ Plots /home/dfish/.julia/packages/Plots/SVksJ/src/utils.jl:102
┌ Info: Data contains NaNs or missing values, and indices of `seriescolor` vector do not match data indices.
│ If you intend elements of `seriescolor` to apply to individual NaN-separated segements in the data,
│ pass each segment in a separate vector instead, and use a row vector for `seriescolor`. Legend entries 
│ may be suppressed by passing an empty label.
│ For example,
│ plot([1:2,1:3], [[4,5],[3,4,5]], label=["y" ""], seriescolor=[1 2])
└ @ Plots /home/dfish/.julia/packages/Plots/SVksJ/src/utils.jl:104

```

After making the necessary fixes, the bars do not extend to the x-axis. How can I fix that?

```julia
using Plots 

bar(["a" "b" "c"], [2.34596e-5 7.51904e-5 0.000517363], 
     fillcolor=[:darkred :grey :darkgreen], alpha=.7,grid=false, xaxis=font(14), yaxis=font(14), 
     leg=false, yscale=:log10, ylabel="Seconds (log10)", xrotation=45, size=(800,400))

```

 ![temp](https://global.discourse-cdn.com/julialang/original/3X/5/6/5617883463f51672843e2cb5a44d94d0b688f558.png)

---

<div class="post-metadata">

**Author:** ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Post date:** [April 21, 2021, 1:32pm UTC](https://discourse.julialang.org/t/bars-in-plot-do-not-fully-extend-to-x-axis/59735/2 "2021-04-21T13:32:53Z")

</div>

I finally found the solution [here](https://github.com/JuliaPlots/Plots.jl/issues/2922). Log scale requires `fillrange`.

```julia
bar(["a" "b" "c"], [2.34596e-5 7.51904e-5 0.000517363], 
     fillcolor=[:darkred :grey :darkgreen], alpha=.7,grid=false, xaxis=font(14), yaxis=font(14), 
     fillrange=1e-5, leg=false, yscale=:log10, ylabel="Seconds (log10)", xrotation=45, size=(800,400))

```
