[texhax] Drawing graphs with TikZ

Tom Backer Johnsen backer at psych.uib.no
Sun Dec 2 20:33:34 CET 2007


Matthew Leingang wrote:
> On Dec 2, 2007, at 5:28 AM, Tom Backer Johnsen wrote:
> 
>> Tom Backer Johnsen wrote:
>>> \documentclass{article}
>>> \usepackage{tikz}
>>> \begin{document}
>>> \begin{tikzpicture}
>>>     \path ( 0:2) node [shape=circle,draw] {}
>>>           ( 0:1) node [shape=circle,draw] {}
>>>           ( 0:0) node [shape=circle,draw] {}
>>>           ( 1,1) node [shape=rectangle,draw] {}
>>>           (-1,1) node [shape=rectangle,draw] {};
>>>
>>> \end{tikzpicture}
>>> \end{document}
>>>
>>> This results in a figure nothing like the one in the manual, where  
>>> the
>>> circles are all along a horizontal line (rather than vertical) with
>>> the squares above and somewhat to the left of the sequence of the
>>> circles.  As far As I am able to see, this is an exact  
>>> reproduction of
>>> the example.
>>>
>>> Can anyone point at my error?
>> It is really strange.  So often, when you do any kind of programming
>> you see your error, but not before the question is out.  In this case
>> it is the colons in the circle that yields the unexpected results
>> without any kind of message.
> 
> Dear Tom,
> 
> TikZ has a very flexible syntax for specifying coordinates; your code  
> didn't cause an error because it's not erroneous!  The coordinate  
> specification (x,y) is for Cartesian coordinates, and (theta:r) is  
> for polar coordinates.  So your coordinate (0:2) is 2 cm along the  
> polar line theta=0, i.e, the point with cartesian coordinates (2,0).
> 
> There is a very friendly mailing list just for pgf and tikz users:
> 
> 	https://lists.sourceforge.net/lists/listinfo/pgf-users
> 
> Take care and good luck.

Thank you for the information!  I'll have a look at that list.

Tom
> 
> --Matt
> 
> --
> Matthew Leingang
> Preceptor in Mathematics
> Harvard University
> 
> http://www.math.harvard.edu/~leingang/vCard.vcf
> 
> 
> 
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
> 
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org


-- 
+----------------------------------------------------------------+
| Tom Backer Johnsen, Psychometrics Unit,  Faculty of Psychology |
| University of Bergen, Christies gt. 12, N-5015 Bergen,  NORWAY |
| Tel : +47-5558-9185                        Fax : +47-5558-9879 |
| Email : backer at psych.uib.no    URL : http://www.galton.uib.no/ |
+----------------------------------------------------------------+


More information about the texhax mailing list