# Plots.jl - Controlling dash pattern with PGFPlotsx Backend

**URL:** https://discourse.julialang.org/t/plots-jl-controlling-dash-pattern-with-pgfplotsx-backend/55332
**Category:** General Usage
**Tags:** plotting, pgfplotsx
**Created:** [February 15, 2021, 4:21pm UTC](https://discourse.julialang.org/t/plots-jl-controlling-dash-pattern-with-pgfplotsx-backend/55332 "2021-02-15T16:21:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Kevin\_Kleinbeck](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevin_kleinbeck/32/21278_2.png) [@Kevin\_Kleinbeck](https://discourse.julialang.org/u/Kevin_Kleinbeck)
#### Post date: [February 15, 2021, 4:21pm UTC](https://discourse.julialang.org/t/plots-jl-controlling-dash-pattern-with-pgfplotsx-backend/55332/1 "2021-02-15T16:21:36Z")

</div>

I encountered following problem. The default settings of pgfplots produce dashed lines which are indistinguishable from dotted lines at larger line widths. Consider the MWE

```julia
using Plots
pgfplotsx()
plot(x -> sin(x), line = (3, :dash))
plot!(x -> cos(x), line = (3, :dot))

```

Due to the line width of 3 the dashes are practically equal to the dots (problem vanishes at `line = 1`). This shouldn’t be a problem, since within LaTeX the dashed lines can be controlled with the `dash pattern` option and we can pass extra keyword arguments to LaTeX / PGFPlots. However, the needed .tex code should look like

`dashed, dash pattern = on 8pt off 2pt`

but using

`plot(x -> sin(x), line = (3, dash), dash_pattern = "on 8pt off 2pt")`

results in tex code of the form

`dash pattern ={on 8pt off 2pt}, dashed`

Right now I don’t know whether the additional curly brackets are the problem or the order of the options; however is there a way to control these?
