# Line caps and joins in Plots

**URL:** https://discourse.julialang.org/t/line-caps-and-joins-in-plots/39826
**Category:** Visualization
**Tags:** plots
**Created:** [May 20, 2020, 12:28pm UTC](https://discourse.julialang.org/t/line-caps-and-joins-in-plots/39826 "2020-05-20T12:28:24Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sgaure](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sgaure/32/14779_2.png) [@sgaure](https://discourse.julialang.org/u/sgaure)
#### Post date: [May 20, 2020, 12:28pm UTC](https://discourse.julialang.org/t/line-caps-and-joins-in-plots/39826/1 "2020-05-20T12:28:24Z")

</div>

I have looked around in the Plots package and am unable to find out how to set the line cap style, and line join style. A simple example is this:

```julia
using Plots
pyplot()
plot([0 0.5; 0.5 1], [1 1; 1 1], linewidth=10)

```

That’s two horizontal lines, one from 0 to 0.5, the other from 0.5 to 1. I do not want rounded line endings, in particular not the overlapping one. Is there a capstyle=:square or similar? Similarly with an angle between the lines, like in:

`plot([0 0.5; 0.5 1], [1 1; 1 2], linewidth=10)`

Is there a joinstyle=:miter or similar?

---

<div class="post-metadata">

### Author: ![hannaekfa](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hannaekfa/32/5251_2.png) [@hannaekfa](https://discourse.julialang.org/u/hannaekfa)
#### Post date: [February 22, 2024, 5:14pm UTC](https://discourse.julialang.org/t/line-caps-and-joins-in-plots/39826/2 "2024-02-22T17:14:15Z")

</div>

Thank you for bringing this up. It has been a while, but I have the same question ( however I am using the gr() backend).

It would be great to have a way to have sharp (square) edges on the lines.

---

<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 23, 2024, 4:28pm UTC](https://discourse.julialang.org/t/line-caps-and-joins-in-plots/39826/3 "2024-02-23T16:28:48Z")

</div>

Fyi, in Plots.jl’s, using `Shape()` and [this algorithm](https://gamedev.stackexchange.com/questions/154068/calculating-the-geometry-of-a-thick-3-way-miter-joint), you can create sharp joins like these:

![Plots_mitter_joins](https://global.discourse-cdn.com/julialang/original/3X/a/c/ac8d247ba0d067a194c59bafecb272d377d7704b.png)
