(Edit: See below)

I am trying to draw a simple picture containing a root system, Weyl chambers and root/weight lattice using pstricks. I am essentially trying to construct something like figures 6.5, 6.6 and 6.7 (pages 193-196) in these lecture notes. I have been able to do most of it:

        %Weyl Chambers

        \psline{->}(0,0)(2,0) \psline{->}(0,0)(-2,0)
        \psline{->}(0,0)(-1,1.732) \psline{->}(0,0)(1,-1.732)
        \psline{->}(0,0)(1,1.732) \psline{->}(0,0)(-1,-1.732)

        %Fundamental Weights


enter image description here

but I have problems constructing the weight lattice, like the ones in the lecture notes. Is there a simple way to include this? (It's the lattice spanned by the fundamental weights, the small arrows).

A small bonus question (sorry for asking two questions at once). Many people seem to like TikZ, but I have never used it. Would such a drawing be simpler to draw using TikZ?

Edit: cmhughes has given a very good and useful answer, but as I have written in the comment I still have a small problem with it. What I want is, given two vectors $a = (a_1, a_2)$ and $b = (b_1,b_2)$, to construct the lattice $n_1 a + n_2 b$ where $n_1$ and $n_2$ are integers. Using multido, I can only make this work if the components of $a$ and $b$ are integers and can be decomposed into square lattices (as in cmhughes example). In other words, figure 6.5 seems to be harder to construct in a simple way than figure 6.6. Is there a simple way to do this?

  • multido can also handle non integer. (see documentation). You can also use \psplot and then use the postscript loop. My problem: I am not a mathematician and most of your explanation I can't understand ;-) – Marco Daniel Oct 3 '11 at 12:40
  • @Marco Oh you are right, thanks a lot. Half of the problem solved! I still need to construct a lattice where the red/white sub-lattices aren't square lattices (see figure 6.5 in the lecture notes). But I can try to do it myself now. And good point, I will try to use less mathematical terminology in the future. :) – Heidar Oct 3 '11 at 12:55
  • Do you know the package pst-cox. – Marco Daniel Oct 3 '11 at 13:33
  • 1
    @Heidar: Would you like me to post code for Figure 6.5? I think my code could be adapted. – cmhughes Oct 3 '11 at 19:41
  • 1
    @Dilaton Thanks for letting me know, I will definitely check it out! – Heidar Apr 3 '14 at 7:53

Below is a replication of Figure 6.6 in your linked document. Note the use of multido




%\psgrid % very useful when constructing!


enter image description here

If you need the arrows to be on top of the dots, simply change their ordering in the code.


I have recreated Figure 6.5 below. As previously, I imagine that there are more clever/elegant/robust ways to achieve it; I've often found that trying to shortcut can cost me more time than going the long way round. Here is the process I used:

  • found the equation of the lines that the dots lie on
  • plotted the dots on the lines
  • clipped everything outside of the hexagon

AFAIK, \psdot can not take algebraic expressions, so I had to use RPN. If someone knows better, please let me know.

enter image description here




%\psgrid % very useful when constructing!

% plot the lines

% shaded region

 % clip everything outside of the hexagon
% plot the HOLLOW dots
        % ordered pair: (\nx, 0.5\nx + \nb)
        \psdot[linecolor=red,dotsize=0.4,dotstyle=o](!\nx\space dup 0.5 mul \nb\space add)

% plot the SOLID dots
        % ordered pair: (\nx, 3/2*\nx+\nb)
        \psdot[linecolor=red,dotsize=0.4](!\nx\space dup 2 div 3 mul \nb\space add)

% other stuff


  • 2
    I don't doubt that there are cleverer ways of achieving this- I look forward to seeing them! – cmhughes Oct 3 '11 at 5:18
  • 3
    It is also possible to specify the nodes using polar coordinates (if you so wish) using (r;t). For this you need \SpecialCoor and \degrees[n], depending on your preference. – Werner Oct 3 '11 at 5:55
  • 1
    cmhughes: Just curious, how long did it take you or would it have taken you if you had put this code together from scratch to the end? I am wondering because I am learning tikz package currently and have not created anything with it yet, but would like to know on average how long would it take one to create something like this as a benchmark, so I can record my progress from how long it takes me when I make my first task and as I get better, I can track my speed to see if I am also getting faster (i.e., length of time it is taking me to complete the job). – night owl Oct 3 '11 at 7:19
  • 1
    @cmhughes: Rather use linestyle=none than linecolor=white to clip the diagram; you'll notice the white line overlaid on the dashed lines which isn't ideal. Similarly for the shaded region: linewidth=0pt -> linestyle=none. Also, you don't need \pstVerb to use the variables \nb and \nx; you can use them directly in the ps coordinates: \psdot[..](!\nx\space dup .5 mul \nb\space add). Finally, I'd rather just use \psline instead of plotting the 2 lines using \psplot since that requires the addition of the pst-plot package. – Werner Oct 4 '11 at 4:18
  • 1
    @Werner: Thanks for your feedback- I've implemented all of your suggestions except removing the pst-plot package (got some errors without it, even after removing \psplot). @Heidar- you're welcome! – cmhughes Oct 4 '11 at 4:52

Your original version of the question asked if this would be simpler in TikZ. That got me thinking about how to do it, and I didn't notice that you'd edited that out until I'd gotten most of the way there. So you can have this solution anyway!

Here's the result:

Roots with TikZ

Here's the code:



\pgfmathsetmacro\bx{2 * cos(120)}
\pgfmathsetmacro\by{2 * sin(120)}
\pgfmathsetmacro\lax{2*\ax/3 + \bx/3}
\pgfmathsetmacro\lay{2*\ay/3 + \by/3}
\pgfmathsetmacro\lbx{\ax/3 + 2*\bx/3}
\pgfmathsetmacro\lby{\ay/3 + 2*\by/3}

\foreach \k in {1,...,6} {
  \draw[blue,dashed] (0,0) -- +(\k * 60 + 30:5.5);
\fill[blue!25] (0,0) -- (30:4 * \lby) -- (0,4 * \lby) -- cycle;
\clip (90:5) \foreach \k in {1,...,6} { -- ++([rotate=\k * 60 + 60]90:5) };
\foreach \na in {-3,...,2} {
  \foreach \nb in {-3,...,2} {
    \node[circle,fill=red] at (\na * \ax + \nb * \bx, \na * \ay + \nb * \by) {};
    \node[circle,draw=red] at (\lax + \na * \ax + \nb * \bx, \lay + \na * \ay + \nb * \by) {};
    \node[circle,draw=red] at (\lbx + \na * \ax + \nb * \bx, \lby + \na * \ay + \nb * \by) {};
\draw[gray,->] (0,0) -- (\ax,\ay) node[below left] {\(\alpha_1\)};
\draw[gray,->] (0,0) -- (\bx,\by) node[right] {\(\alpha_2\)};
\draw[->] (0,0) -- (\lax,\lay) node[below] {\(\lambda_1\)};
\draw[->] (0,0) -- (\lbx,\lby) node[below right] {\(\lambda_2\)};
\node at (0:5) {\(\rho_2\)};
\node at (120:5) {\(\rho_1\)};
\node at (180:5) {\(\rho_{12}\)};
\node at (-120:5) {\(\rho_{121} = \rho_{212}\)};
\node at (-60:5) {\(\rho_{21}\)};

The idea is to try to follow the idea as much as possible. So we define the key coordinates (\ax,\ay) and (\bx,\by) then the lambdas in terms of them. We draw a segment of the lattice using the \foreachs to iterate over a chunk of the integers, and clip against a hexagonal region to only show that part that we want (the point of clipping is to avoid having to compute exactly which nodes to draw; if I weren't so lazy, I could figure it out beforehand).

Then there's a few labels to put in, and arrows to draw, but that's quite simple.

  • 1
    I have re-edited my question, and put that part back again. Your drawing looks amazing, I will definitely start learning TikZ since it seems to be more straightforward. Thanks a lot. – Heidar Oct 3 '11 at 20:12
  • By the way, a few hours ago I found your "braids" package. I have been looking for something like that for a few month now, really nice work. Looking forward to try it out. – Heidar Oct 3 '11 at 20:15
  • 1
    TikZ is the only one that I learnt so I can't speak to the comparison. It's certainly simpler for me. Let me know how you get on with the braids package - I'm interested in feedback and knowing how it could be improved. – Loop Space Oct 3 '11 at 20:49

If you are ok with TikZ, you can try the rank-2-roots package.

enter image description here

\foreach \system in {A,B,G}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.