这是我的代码:
\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.3}
\begin{document}
\begin{tikzpicture}
\begin{axis}[xticklabel pos=right,
extra y ticks = {7},
extra y tick labels = {$e$},
extra y tick style={grid=major,yticklabel pos=right}
]
\addplot coordinates { (1,1) (42,23) };
\end{axis}
\end{tikzpicture}
\end{document}
我希望右侧出现额外的勾号。但上面的代码不起作用。
有什么想法为什么不行?
版本:
This is pdfTeX, Version 3.1415926-1.40.11 (Web2C 2010)
*File List*
article.cls 2007/10/19 v1.4h Standard LaTeX document class
size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
tikz.sty 2010/10/13 v2.10 (rcs-revision 1.76)
pgf.sty 2008/01/15 v2.10 (rcs-revision 1.12)
pgfrcs.sty 2010/10/25 v2.10 (rcs-revision 1.24)
everyshi.sty 2001/05/15 v3.00 EveryShipout Package (MS)
pgfrcs.code.tex
pgfcore.sty 2010/04/11 v2.10 (rcs-revision 1.7)
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
graphics.sty 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
pdftex.def 2011/01/28 v0.05d Graphics/color for pdfTeX
pgfsys.sty 2010/06/30 v2.10 (rcs-revision 1.37)
pgfsys.code.tex
pgfsyssoftpath.code.tex 2008/07/18 (rcs-revision 1.7)
pgfsysprotocol.code.tex 2006/10/16 (rcs-revision 1.4)
xcolor.sty 2007/01/21 v2.11 LaTeX color extensions (UK)
color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
pgfcore.code.tex
pgfcomp-version-0-65.sty 2007/07/03 v2.10 (rcs-revision 1.7)
pgfcomp-version-1-18.sty 2007/07/23 v2.10 (rcs-revision 1.1)
pgffor.sty 2010/03/23 v2.10 (rcs-revision 1.18)
pgfkeys.sty
pgfkeys.code.tex
pgffor.code.tex
tikz.code.tex
pgfplots.sty 2010/07/14 Version 1.4.1 (git show 1.4.1-1-g64c9e95 )
supp-pdf.mkii
pdftexcmds.sty 2011/04/16 v0.15 Utilities of pdfTeX for LuaTeX (HO)
infwarerr.sty 2010/04/08 v1.3 Providing info/warning/message (HO)
ifluatex.sty 2010/03/01 v1.3 Provides the ifluatex switch (HO)
ltxcmds.sty 2011/04/18 v1.20 LaTeX kernel commands for general use (HO)
ifpdf.sty 2011/01/30 v2.3 Provides the ifpdf switch (HO)
epstopdf-base.sty 2010/02/09 v2.5 Base part for package epstopdf
grfext.sty 2010/08/19 v1.1 Managing graphics extensions (HO)
kvdefinekeys.sty 2011/04/07 v1.3 Defining keys (HO)
kvoptions.sty 2010/12/23 v3.10 Keyval support for LaTeX options (HO)
kvsetkeys.sty 2011/04/07 v1.13 Key value parser (HO)
etexcmds.sty 2011/02/16 v1.5 Prefix for e-TeX command names (HO)
epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live