Question: MWE:

```
\documentclass[]{article}
\usepackage{tikz}
\usetikzlibrary{calc,intersections,through,backgrounds}

\begin{document}

\begin{tikzpicture}[scale=0.5]
\draw[<->] (0,8.5) node[above]{P}--(0,0)--(8.5,0) node[right]{Q};
\draw[name path=D] (0,0) plot [domain=0:8] (\x,8-\x) node[above right, pos = 0.9]{D};
\draw[name path=S] (0,0) plot [domain=0:7.5] (\x,2+\x) node[right]{$S$};
\draw[name path=S1] (0,0) plot [domain=0:7.5] (\x,\x) node[right]{$S + $ sub};
\end{tikzpicture}

\end{document}

```

Note that in the 3rd line of Tikz code, I've used pos = 0.9, which as I understand should place it 9/10 of the way along the line. Instead, I get this:

[![enter image description here](https://i.stack.imgur.com/Krgrf.png)](https://i.stack.imgur.com/Krgrf.png)

Any idea why?

Answer: 
To set the distance between ticks on the y-axis, add `\OrdBode{<value>}` *before* `\semilog...`. In your case, `\OrdBode{20}`. Then change the last two arguments to the `\semilog` macro, which sets the lower and upper limit of the axis. To maintain the same overall height, reduce the `yscale` of the `tikzpicture` to half.

`bodegraph` also has a `\UnitedB` macro that will add labels to the axes. Add also before `\semilog...`. If you only want the y-label, redefine the `\Unity` macro instead of issuing `\UnitedB`, see comments in code below. To change the default position of the y-label, modify the `semilog label y` style, as shown below.

For the second set of ticklabels, note that the x-coordinates of the ticks are the exponents. So in your case, the left side of the axis, where the x-value is `10^(-2)`, the coordinate actually used by TikZ is `-2`. Because the y-axis is linear, not logarithmic, the coordinates are the same as the values, so `-40` for the lower end, `20` for the upper. (In other words, the four values passed to `\semilog` are the x- and y-limits in terms of the coordinates TikZ actually use.)

Hence, you can place a series of nodes at, for example, `x=-3`, and `y={-40, -20, 0, 20}`. 

[![enter image description here](https://i.stack.imgur.com/HTUy8.png)](https://i.stack.imgur.com/HTUy8.png)

```
\documentclass{article}
\usepackage{bodegraph} % loads tikz

\begin{document}
\begin{tikzpicture}[
  yscale=1/30,xscale=7/5, % changed y-scale
  semilog label y/.append style={above right} % change anchor of y-label
]
    \UnitedB % add labels to axes
   %\renewcommand\Unity{dB} % use this instead of \UnitedB if you only want the y-label
    \OrdBode{20} % ytick every 20
    \semilog{-2}{3}{-40}{20} % changed y-limits

   \node [above right,font=\tiny,red] at (-3,20) {lin}; % add label for second axis
   % add new ticklabels
   \foreach [count=\i from -2] \y  in {-40,-20,0,20}
       \node [font=\tiny,red] at (-3,\y) {$10^{\i}$};
\end{tikzpicture}
\end{document}

```
You can always look up a command from the corresponding style file and use it as a basis to create your own command. I did that for `\semilog` with the result.

```
\documentclass{article}
\usepackage{bodegraph}
\usepackage{tikz}

\newcommand{\semilogLabelY}[5][]{ %based on \semilogNS from bodegraph.sty
\pgfmathtruncatemacro{\Valsuivante}{#4+\valpas}
\foreach \yy in  {#4,\Valsuivante,...,#5}{
\pgfmathtruncatemacro{\ylabel}{\yy/10}
\node[semilog label y, node distance=0.3em]at ({#2-1},\yy) {$10^{\ylabel}$};
}}

\begin{document}
    \begin{tikzpicture}[yscale=2/30,xscale=7/5]
    \semilog{-2}{3}{-20}{10}
    \semilogLabelY{-2}{3}{-20}{10}
    \end{tikzpicture}
\end{document}

```

[![enter image description here](https://i.stack.imgur.com/DtvIn.png)](https://i.stack.imgur.com/DtvIn.png)