# Labelling tikz nodes AND edges

The following is a snippet of the original. It works..,

\documentclass[12pt]{article}
\usepackage{tikz} % drawing support
\usetikzlibrary{trees,arrows,decorations.markings}
\definecolor{darkgreen}{rgb}{0,.5,0}
\begin{document}
\begin{tikzpicture}[yscale=-1,scale=1,label/.style={postaction={decorate,decoration={ markings, mark=at position .5 with \node #1;}} }]
\node at (0,0) (node0) [inner sep=0pt,minimum width=1mm,circle,draw=blue] {1};                       % node#1
\end{tikzpicture}
\end{document}

The label style is primarily for edges which don't appear in the snippet above. However, I'd like to label the nodes, too: change the \node line to:

\node at (0,0) (node0) [inner sep=0pt,minimum width=1mm,circle,draw=blue] [label=60:X] {1};                       % node#1

which is intended to put the letter "X" at a 60 degree angle from the node.

Tikz then "blesses" me with a

Package tikz Error: A node must have a (possibly empty) label text.

I've tried numerous combinations of [] {} etc, and haven't gotten the code to work.

-
I think to call label a custom style is bad as there's already a label: check on the manual. A more correct way (at least it works ;) ) to do that (I mean using the library markings) is my style insert node. –  Claudio Fiandrino Sep 12 '13 at 15:29
Thank you for your hint. I'm now using –  user21497 Sep 12 '13 at 16:16
\tikzstyle{edgelabel}=[style={postaction={decorate,decoration={ markings, mark=at position .5 with \node #1;}} }] –  user21497 Sep 12 '13 at 16:17
Don't use the obsolete tikzstyle, see Should \tikzset or \tikzstyle be used to define TikZ styles? –  Claudio Fiandrino Sep 13 '13 at 6:13