or
tikz
निरंजन
For example if I have -

```
\documentclass[border=0.5cm]{standalone}
\usepackage{tikz}

\begin{document}
	\begin{tikzpicture}
		\draw (-1,0) -- (0,2) -- (1,0) -- cycle;
	\end{tikzpicture}
\end{document}
```

producing an equilateral triangle, can I also have an environment which will divide/multiply/add/subtract every coordinate of the picture to give us the same picture in different sizes? eg. something like -

```
\documentclass[border=0.5cm]{standalone}
\usepackage{tikz}

\begin{document}
	\begin{tikzmath}{x*2}
		\begin{tikzpicture}
		\draw (-1,0) -- (0,2) -- (1,0) -- cycle;
		\end{tikzpicture}
	\end{tikzmath}
\end{document}
```
The environment should force the interpretation of all the x coordinates being multiplied by two. Is there any package to achieve this?
Top Answer
marmot
This is what `scale` does. Note that nodes and pics require `transform shape` if you add `scale` to the options of the `tikzpicture` to be effective.



```
\documentclass[border=0.5cm]{standalone}
\usepackage{tikz}

\begin{document}
	\begin{tikzpicture}
		\draw (-1,0) -- (0,2) -- (1,0) -- cycle;
	\end{tikzpicture}
	\begin{tikzpicture}[scale=2]
		\draw (-1,0) -- (0,2) -- (1,0) -- cycle;
	\end{tikzpicture}
\end{document}
```


![Screen Shot 2020-03-15 at 10.11.39 PM.png](/image?hash=3beec76531035c0409d1a5ff8f04c65486f68fbdd06c083efd2ead9ceeeb7703)
Can I multiply all the co-ordinates in my tikzpicture to get a larger (or smaller) picture?
निरंजन replying to samcarter
Cool. Thank you :)
samcarter
```
\documentclass[border=0.5cm,tikz]{standalone}
\begin{document}
	\begin{tikzpicture}[xscale=2]
		\draw (-1,0) -- (0,2) -- (1,0) -- cycle;
	\end{tikzpicture}
\end{document}
```
samcarter replying to निरंजन
If you want to add 1 to your x coordinates, you could do `[xshift=1cm]`, this will shift the picture (you probably won't see the effect unless you are using avsolute coordinates because the position on the page will compensate the shift). If you want to scale it only in one dimension `[xscale=2]`
samcarter replying to निरंजन
You can use `transform shape` like this `[scale=2, transform shape]`
निरंजन
Let's say I want to add 1 to all my x coordinates and lengthen the picture, but notice that I am not changing the height here.
निरंजन
What is `transform shape`? Where to add it?
निरंजन
What about other operations? What if I want to add subtract 0.5 from each of my coordinate?