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
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?