Sign up ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How to configure axis dashed on PGFPlots?

%need grid=dashed

enter image description here

share|improve this question

1 Answer 1

up vote 12 down vote accepted

You can use the grid style option (for each grid line), or major grid style (for each major grid line):


\pgfplotsset{grid style={dashed}}




enter image description here

share|improve this answer
If you only want to activate the dashing of the grid on a per-plot basis, then you can put the command in the axis command, i.e. \begin{axis}[grid=major,grid style={dashed}]. – qubyte Nov 23 '11 at 6:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.