Sloped text nodes along paths in a slanted scope seem off. Is there any way to fix this?



    \begin{scope}[every node/.append style={yslant=\yslant,xslant=\xslant}, yslant=\yslant,xslant=\xslant]
        \draw (-0.5,5) -- (-0.5,2) node [midway, below, sloped] {weaker control flow};
        \draw (-0.5,5) -- (2,5) node [midway, above, sloped] {well-formedness};
        \draw (-0.5,5) -- (-2,2.5) node [midway, above, sloped] {number of exits};

enter image description here

Edit: I don't just need the axes, here's the whole figure:

enter image description here

  • My advice is to use rotate instead of slanting. From what I can tell, the effect of slanting is x'=x(y) + xslanty and y'= y(x) + yslantx, so the results depend on which slant is performed first. Oct 29, 2013 at 14:59
  • 1
    Excuse the pun but y slant?
    – percusse
    Oct 29, 2013 at 15:02
  • I have a complex figure similar to this: tex.stackexchange.com/questions/12689/… Can I do this using rotation?
    – thpani
    Oct 29, 2013 at 20:32
  • The advantage of slant in the mentioned example is that it turns a rectangle into a parallelogram. You could just draw a parallelogram, in which case you wouldn't need either slant or rotate. Oct 30, 2013 at 12:36
  • Then again, if you want 3d text, you need xslant. Nov 2, 2013 at 15:35

2 Answers 2


Is this sort of where you are headed?




\draw [->] (0,0,0) -- (5,0,0) node[midway,sloped,above,xslant=-0.5] {well-formedness};
\draw [->] (0,0,0) -- (0,5,0) node[midway,sloped,above,xslant=0.5] {weaker control flow};
\draw [<-] (0,0,5) -- (0,0,0) node[midway,sloped,above] {number of exits};
\path (2,1,0) node[rectangle,draw=black,rotate=30,xslant=-0.5] {test};


new trial

  • I don't just need the axes, the code I posted was just an MWE. I've updated my question.
    – thpani
    Nov 1, 2013 at 16:23
  • I have better luck with xslant than yslant Nov 1, 2013 at 23:41

With PSTricks.


enter image description here

  • You really like pstricks :D Tell me, are the direction of the axis manually set? I see numbers in your code. :P
    – Alenanno
    Oct 30, 2013 at 21:50
  • @Alenanno: Yes. It was manually set up because I was not using the 3D package. Oct 30, 2013 at 21:53
  • sorry, i'm really looking for a TikZ solution
    – thpani
    Nov 1, 2013 at 16:22

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.