7

How can I change the default coordinate system of TikZ, so the Y coordinates go downwards, instead of upwards. This is because in the picture I'm trying to draw it is more natural to reference points this way.

I was trying to use negative values in the declaration, but some drawing commands don't really like it, like the grid, where horizontal lines simply don't get drawn this way:

\begin{tikzpicture}[x=1cm,y=-1cm]
\draw (0, 0) grid (7, 7);
\end{tikzpicture}

Result:

non-working grids

3
  • 1
    See this one: tex.stackexchange.com/questions/79161/… and also the linked tex.stackexchange.com/questions/55540/…
    – percusse
    Nov 28, 2012 at 22:15
  • @percusse: there might be other problems with negative values (although grid was the first problem I encountered), and those links only deal with the grids. The yscale=1 however seems to have no bad side effects (at least for the cases I need)
    – SztupY
    Nov 28, 2012 at 22:21
  • Any other command is OK with y=-1cm but the grid :) So it's an unlucky start I would say :)
    – percusse
    Nov 28, 2012 at 22:24

1 Answer 1

10

You could use yscale=-1:

\documentclass{article}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}[yscale=-1]
\draw (0, 0) grid (7, 7);
\node at (7,7) {A};
\end{tikzpicture}

\end{document}

enter image description here

0

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.