# In plots, how do I add error bars in both x and y direction

**URL:** https://discourse.julialang.org/t/in-plots-how-do-i-add-error-bars-in-both-x-and-y-direction/126886
**Category:** Visualization
**Created:** [March 12, 2025, 6:45pm UTC](https://discourse.julialang.org/t/in-plots-how-do-i-add-error-bars-in-both-x-and-y-direction/126886 "2025-03-12T18:45:31Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Torkel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/torkel/32/5030_2.png) [@Torkel](https://discourse.julialang.org/u/Torkel)
#### Post date: [March 12, 2025, 6:45pm UTC](https://discourse.julialang.org/t/in-plots-how-do-i-add-error-bars-in-both-x-and-y-direction/126886/1 "2025-03-12T18:45:31Z")

</div>

I can plot error bars in y axis, but if I want in x axis as well. I.e. something like this:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/c/1/c12a532b6c92c4c6f72cdc5cffc9cc05cce23c20.png)

Very much ideally I would be interested in how to do this in Plots.jl.

---

<div class="post-metadata">

### Author: ![Torkel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/torkel/32/5030_2.png) [@Torkel](https://discourse.julialang.org/u/Torkel)
#### Post date: [March 12, 2025, 6:50pm UTC](https://discourse.julialang.org/t/in-plots-how-do-i-add-error-bars-in-both-x-and-y-direction/126886/2 "2025-03-12T18:50:25Z")

</div>

The answer is the `xerr` argument (and there is an `yerr` as well).
