TeX - LaTeX Asked on July 30, 2021
I am trying to set up a semilogxaxis
in pgfplots
. The image I am trying to generate is
but my code below is generating
documentclass[tikz]{standalone}
usepackage{pgfplots}
pgfplotsset{compat = 1.9}
begin{document}
begin{tikzpicture}
begin{semilogxaxis}[
ylabel = Gain db,
xlabel = Frequency Hz,
ytick = {0, 100},
xtickten = {2, 3, 4, 5, 6}]
end{semilogxaxis}
end{tikzpicture}
end{document}
Is it this, what you are looking for?
Disclaimer: I'm a newbie with pgfplots
.
documentclass[tikz]{standalone}
usepackage{pgfplots}
pgfplotsset{compat = 1.9}
begin{document}
begin{tikzpicture}
begin{semilogxaxis}[
axis x line=center,
axis y line=left,
xmajorgrids=true,
xlabel style={below=3ex},
enlarge x limits,
ymax = 150,
ytick = {100},
ylabel = Gain db,
xlabel = Frequency Hz,
]
addplot coordinates {(1e2,100) (1e3,100) (1e4,80) (1e5,20) (1e6,0)};
node[above] at (axis cs:5e3,90) {$-6$};
node[above] at (axis cs:5e4,50) {$-12$};
node[above] at (axis cs:5e5,10) {$-6$};
end{semilogxaxis}
end{tikzpicture}
end{document}
Correct answer by Henri Menke on July 30, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP