# Logarithmic plot using tikz ung pgfplots

I want to draw a logarithmic plot of wavelength and frequency. The x and y axes show an exponential plot. I want the representation to be a simple number. How do I change the labels on the axes?

Since the wavelength λ = c/f

the graph should get along without a data set, because one end value and one start value of the equation should be enough. How do you realize something like this?

c = speed of light = 299792458 m/s

I have added an example in the appendix.

\documentclass{article}
\usepackage{mwe}
\usepackage{pgfplots}
\usepackage{siunitx}

\begin{document}
\begin{tikzpicture}
\begin{axis}$width=0.9\textwidth, title=Umrechnung Frequenz in Wellenlänge, xlabel={Frequenz f \[\unit{\MHz}$},
ylabel={Wellenlänge $\lambda$ $\unit{\m}$},
xmin=0, xmax=1000,
ymin=0, ymax=300,
domain=0:1000,
restrict y to domain=0:300,
grid=both
\]
\end{axis}
\end{tikzpicture}
\end{document} • Welcome to TeX.SE! Sep 8, 2022 at 11:01
• Please convert you code snippet to a compilable minimal working example (MWE) in order to help others help you. Sep 8, 2022 at 11:21

Hmmm...

1. log axis can't start from 0.
2. $...$ is a command for displayed math, not a square bracket. Use square brackets when needed
3. You must give a \pgfplotsset{compat...} to avoid surprises
4. package mwe is not for MWEs (yeah, I know...)
5. why limiting y?
6. Adjust the formula, I just put 300/x to put something there.
\documentclass{article}
\usepackage{pgfplots}\pgfplotsset{compat=1.18}
\usepackage{siunitx}

\begin{document}
\begin{tikzpicture}
\begin{loglogaxis}[
width=0.9\textwidth,
title=Umrechnung Frequenz in Wellenlänge,
xlabel={Frequenz $f$ [\unit{\MHz}]},
ylabel={Wellenlänge $\lambda$ [\unit{\m}]},
xmin=1, xmax=1000,
ymin=1, ymax=300,
domain=1:1000,
log basis y  = 10,
grid=both
] 