# AlgebraOfGraphics plots with error bars and different line styles

**URL:** <https://discourse.julialang.org/t/algebraofgraphics-plots-with-error-bars-and-different-line-styles/139325>\
**Category:** New to Julia\
**Tags:** makie, algebraofgraphics\
**Created:** [September 10, 2026, 7:19am UTC](https://discourse.julialang.org/t/algebraofgraphics-plots-with-error-bars-and-different-line-styles/139325 "2026-09-10T07:19:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahmah](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mahmah/32/214326_2.png) [@mahmah](https://discourse.julialang.org/u/mahmah)\
**Post date:** [September 10, 2026, 7:19am UTC](https://discourse.julialang.org/t/algebraofgraphics-plots-with-error-bars-and-different-line-styles/139325/1 "2026-09-10T07:19:35Z")

</div>

I’m enjoying AlgebraOfGraphics a lot, thank you so much for this package. I have a problem though: I want to use `visual(Errorbars) + visual(Lines)` in a figure that also specifies `LineStyle`. I understand that `LineStyle` should be part of the aesthetic mapping of `Errorbars` for this to work, but what would be the way to circumvent this?

If not yet documented, maybe this could be added somewhere, because line plots with different line styles and error bars are a rather common case, unless I’m biased by my bubble 🙂

Thanks!

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [September 10, 2026, 7:35am UTC](https://discourse.julialang.org/t/algebraofgraphics-plots-with-error-bars-and-different-line-styles/139325/2 "2026-09-10T07:35:00Z")

</div>

Do you mean something other than

```julia
mapping([1, 2, 3], [4, 5, 3]) * visual(Lines) + mapping([1, 2, 3], [4, 5, 3], [0.5, 0.6, 0.7]) * visual(Errorbars, linestyle = :dash) |> draw

```

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

---

<div class="post-metadata">

**Author:** ![mahmah](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mahmah/32/214326_2.png) [@mahmah](https://discourse.julialang.org/u/mahmah)\
**Post date:** [September 10, 2026, 12:26pm UTC](https://discourse.julialang.org/t/algebraofgraphics-plots-with-error-bars-and-different-line-styles/139325/3 "2026-09-10T12:26:23Z")

</div>

Thanks, that was perfect! I forgot this can be done in two ways, the one you mentioned being more flexible.
