I know that you can make a dashed line in pgfplots using the \addplot[dashed]
option. However, the line that produces isn't dashed the way I'd like.
I found \pgfsetdash
in the documentation for PGF, but I can't figure out how to use it on just one \addplot
. If I include it anywhere within the tikzpicture environment, it changes all of the lines, including the axes. I thought that adding a second \pgfsetdash
would change the style, but it doesn't seem to have an effect.
Any advice for creating custom dash styles in PGF plots?
Best Answer
You can use the key
dash pattern=<pattern>
to define a dash pattern in an\addplot
: