1

I have a problem with the scale of my graphic. i need that it's a real scale(symmetric).

\begin{tikzpicture}[scale=1]
\begin{axis}[
  axis x line=middle, axis y line=left,
  y axis line style={Stealth-},x axis line style={-Stealth},
  xmin=1,xmax=710,
  ymax=2,ymin=-2000,      
  ytick={-100,-200,...,-2000},
  xtick={100,200,...,700}]
\end{axis}
\end{tikzpicture}

enter image description here

Matias Tevez
  • 239
  • 1
  • 6

1 Answers1

2

If you want the axes lengths to be real scale, say x=7cm and y=20cm, you can use the keys x=7cm/700, y=20cm/2000 for your axes. I don't think, though, it looks nice this way, using fewer ytiks seems better for me.

\documentclass[border=5pt]{standalone}
\usepackage{pgfplots}
\usetikzlibrary{arrows.meta}
\pgfplotsset{compat=1.16}

\begin{document}

\begin{tikzpicture}
\begin{axis}[
  axis x line=middle, axis y line=left,
  y axis line style={Stealth-}, x axis line style={-Stealth},
  xmin=1,xmax=710,
  ymax=2,ymin=-2000,      
  ytick={-100,-200,...,-2000},
  xtick={100,200,...,700},
  x=7cm/700,
  y=20cm/2000,]
\end{axis}
\end{tikzpicture}

\end{document}

enter image description here

AboAmmar
  • 46,352
  • 4
  • 58
  • 127