16 Mar 20:04
Incorrect placed labels for inplicite positioned nodes
Martin Scharrer <mailinglists <at> scharrer-online.de>
2010-03-16 19:04:57 GMT
2010-03-16 19:04:57 GMT
Hi,
I recently run into this:
Draw a line from one coordinate to another and place a node N between them
and a label L above it.
\draw (0,0) -- (1,0) node [midway,label=above:L] (N) {N}; %
works fine! However the implicit positioning (see pgf manual, section "15.9
Placing Nodes on a Line or Curve Implicitly"), which I normally use, places
the label in the wrong position (too low).
\draw (0,0) -- node [label=above:L] (N) {N} (1,0); % labels incorrectly
placed
Here a minimal example of this issue. I used the example code from the above
mentioned manual section 15.9 as base and only added labels and a little
more distance:
%&pdflatex
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[near end,L/.style={label={above:{.}}}]
\draw (0cm,4cm) -- (3cm,4cm) node[L]{A};
\draw (0cm,3cm) -- node[L]{B} (3cm,3cm);
\draw (0cm,2cm) -- node[midway,L] {C} (3cm,2cm);
\draw (0cm,1cm) -- (3cm,1cm) node[midway,L] {D} ;
\end{tikzpicture}
\end{document}
Nodes (A) and (D) have correctly placed labels (because of the explicit
coordinates). The label of node (B) is too low and the one of (C) is also
too low and at the wrong position along the line.
It seems to me that the wrong labels are (vertical) placed according to the
line, not the node!
It's not an issue with a wrong/different 'node distance' value. I tested
this.
The way I understand the PGF docu it should work also for the implicit case.
Is my understanding wrong or is this a bug in PGF/TikZ?
--
--
View this message in context: http://old.nabble.com/Incorrect-placed-labels-for-inplicite-positioned-nodes-tp27923042p27923042.html
Sent from the pgf-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
RSS Feed