I have the following nodes in my tikzpicture :
\node (A) at (15, -5) {A};
\node (canal) at (15, -15) {Canal};
I want to connect the south west of (A) by drawing a vertical line in
direction of (canal).
I did not find a way of doing that !
If i do
\draw [->] (A.south west) to (canal);
the line is not vertical (normal as it connects to the center of (canal))
If i do
\draw [->] (A.south west) to (canal.north west);
The line is not vertical as the width of (A) and (canal) are not identical
What I need is a way to say : draw a vertical line from A.south west in
direction of (canal).
Is it possible to do that ?
thanks !!!
You can add a minimum width to the two nodes to make them the same size.
\node[minimum width=1.25cm] (A) at (15, -5) {A};
\node[minimum width=1.25cm] (canal) at (15, -15) {Canal};
Now
\draw [->] (A.south west) to (canal.north west);
will do what you expect.
Alan
> I have the following nodes in my tikzpicture :
>
> \node (A) at (15, -5) {A};
> \node (canal) at (15, -15) {Canal};
>
> I want to connect the south west of (A) by drawing a vertical line in
> direction of (canal).
Yes, but how long should this line be? Depending on the answer to that
question, you may want to try either polar coordinates, e.g., (270:1cm),
or perpendiculars, e.g., (A |- canal).
-- Alain.
> Hi,
>
> I have the following nodes in my tikzpicture :
>
> \node (A) at (15, -5) {A};
> \node (canal) at (15, -15) {Canal};
>
> I want to connect the south west of (A) by drawing a vertical line in
> direction of (canal).
\draw[->] (A.south west) -- (canal.north -| A.south west);
--
Paul Gaborit - <http://perso.mines-albi.fr/~gaborit/>
Super ! it works as I need.
If I understand well, (canal.north -| A.south west) means the point that
is at intersection of
- the horizontal line passing through the north point of canal
with
- the vertical line passing through the south west point of A
?
Thanks a lot
--
Le stade rennais m'a tuer©
Yep but it is not what I want.
Thanks for your reply.
The line should stop ... when it reaches (canal).
The solution proposed by Paul Gaborit works well.
> If I understand well, (canal.north -| A.south west) means the point
> that is at intersection of
>
> - the horizontal line passing through the north point of canal
> with
> - the vertical line passing through the south west point of A
>
> ?
Exactly.
Thanks a lot.
I did not catch that when reading the doc.
Sorry, it wasn't entirely clear that this wasn't what you wanted,
otherwise I would have suggested what Paul did.
Alan