Hi Ihor, the legend uses nodes by itsself, and it reconfigures these nodes.
The legend style is /pgfplots/every axis legend/.style={% cells={anchor=center}, inner xsep=3pt,inner ysep=2pt,nodes={inner sep=2pt,text depth=0.15em}, anchor=north east,% shape=rectangle,% fill=white,% draw=black, at={(0.98,0.98)}, }, In particular, the style "nodes" affects your nodes as well. You need to reset the node-specific options to their default, for example \pgfdeclareplotmark{e} {\filldraw[fill=white,draw=black] (0pt,0pt) circle [radius=3pt] node[text depth=0pt] {\scriptsize e};} Kind regards Christian Am 10.03.2014 10:40, schrieb Ihor Rokach: > Hello, > > I am trying to define a custom mark using \pgfdeclareplotmark. In the > example shown below letter e in the legend is a bit shifted with > respect to the center of the circle. It is placed properly, however, > in each mark in the plot itself. How could I fix it? I am using the > latest versions of PGF and Pgfplots, MikTeX 2.9 on Windows XP 32. > > --------------------------------------------- start of the example --- > \documentclass{article} > \usepackage{pgfplots} > > \pgfplotsset{compat=newest} > > \pgfdeclareplotmark{e} > {\filldraw[fill=white,draw=black] (0pt,0pt) circle [radius=3pt] node > {\scriptsize e};} > > \begin{document} > \thispagestyle{empty} > \begin{tikzpicture} > \begin{axis}[] > \addplot[mark=e] coordinates {(0,1) (1,0)}; > \addlegendentry{test} > \end{axis} > \end{tikzpicture} > \end{document} > > --------------------------------------------- end of the example --- > > With best wishes > , > ========= > Ihor > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/13534_NeoTech > > > _______________________________________________ > Pgfplots-features mailing list > Pgfplots-features@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pgfplots-features ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ Pgfplots-features mailing list Pgfplots-features@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pgfplots-features