Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I’m trying to annotate the plot by drawing this dot on it. I specified the exact coordinates the center of the dot should be at, but apparently this isn’t the dots center...

Is there a way to change this without chancing the coordinate a little?

Full picture

Enlarged

\documentclass[11pt, a4paper]{article}

\usepackage[latin1]{inputenc} % niet-ASCII-tekens gebruiken
\usepackage{tikz} % geavanceerde figuren maken
\usepackage[Gray,squaren,thinqspace,thinspace]{SIunits} % elegant eenheden zetten
\usepackage[dutch]{babel} % Nederlands als taal instellen
\usepackage[small,bf,hang]{caption} % bijschriften invoegen
\usepackage{pgfplots} % data plottenf
\pgfplotsset{compat=newest} % meest recente versie pgfplots gebruiken
\usepackage{pgfplotstable} % tabellen uit .csv laden
\usepackage{amsmath} % uitgebreide wiskundige mogelijkheden
\usepackage{pgf} %meer mooie plots
\usepackage{subcaption} %figuren naast elkaar
    \usetikzlibrary{arrows,automata} %mooie pijlen

\begin{document}
\begin{figure}[ht]
\centering
\begin{subfigure}{0.48\linewidth}
\centering
\begin{tikzpicture}
\begin{loglogaxis}[
xlabel=frequentie $f (\hertz)$,
ylabel=transferfunctie $T\ (\frac{\volt}{\volt})$,
grid=both, 
minor grid style={gray!25}, 
major grid style={gray!25},
no marks,
width=\linewidth]
\draw[*-,color=red!50] (axis cs:3e4,1) -- (axis cs:10e4,0.5) node[right,color=black] {$f_\text{\unit{3}{dB}}$};
\addplot [color=red] coordinates {(1e3, 1)
(3e4, 1) % breekpunt
(3*1e5, 0.1)};
\end{loglogaxis}
\end{tikzpicture}
\subcaption{Amplitude bode-plot.\label{BodeAmplitudeTweedeTrap}}
\end{subfigure}%
\hspace{5pt}
\begin{subfigure}{0.48\linewidth}
\centering
\begin{tikzpicture}
\begin{axis}[
xmode=log,
ymode=normal,
xlabel=frequentie $f (\hertz)$,
ylabel=fase $\phi (\degree)$,
ytick={-90,-45,0,45,90},
grid=both, 
minor grid style={gray!25}, 
major grid style={gray!25},
width=\linewidth,
no marks]
\addplot [color=red] coordinates {(1e3, 0)
(3e3,0)
(3e4, -45) % breekpunt
(3e5,-90)
(1e6,-90)};
\end{axis}
\end{tikzpicture}
\subcaption{Fase bode-plot.\label{BodeFrequentieTweedeTrap}}
\end{subfigure}%
\caption{Bode-diagram transferfunctie tweede trap.\label{BodeEersteTrap}}
\end{figure}
\end{document}
share|improve this question
    
It would be helpful if you provided the data needed to reproduce the problem and hence any fixes could be tested to ensure that they work for you. –  Peter Grill May 1 at 20:37
    
I’ll exclude the data-driven plot because it doesn’t add anything to my question. –  opieters May 1 at 20:41
    
Well I can't run the example posted without some data. So if you don't want to provide the data, which is ok, please edit the question to simplify it to and use made up data that you can share so that we can actually run the code posted. –  Peter Grill May 1 at 20:43
    
The is enough data in the plot to support my question. I only deleted the blue curve since I used more then 2000 datapoints for each of then... –  opieters May 1 at 20:45
    
By data driven plot I meant the plot supported by MatLab data, not LaTeX only data ;) –  opieters May 1 at 20:46

1 Answer 1

up vote 7 down vote accepted

The syntax you were using -* is for arrows. If you want a filled circle then it is best to place it as:

\draw[<options>] (axis cs:3e4,1) circle (2pt) ....

enter image description here

Notes:

  • The second plot did not seem related to the question so I have commented it out in the MWE below.

Code:

\documentclass[11pt, a4paper]{article}

\usepackage[latin1]{inputenc} % niet-ASCII-tekens gebruiken
\usepackage{tikz} % geavanceerde figuren maken
\usepackage[Gray,squaren,thinqspace,thinspace]{SIunits} % elegant eenheden zetten
\usepackage[dutch]{babel} % Nederlands als taal instellen
\usepackage[small,bf,hang]{caption} % bijschriften invoegen
\usepackage{pgfplots} % data plottenf
\pgfplotsset{compat=newest} % meest recente versie pgfplots gebruiken
\usepackage{pgfplotstable} % tabellen uit .csv laden
\usepackage{amsmath} % uitgebreide wiskundige mogelijkheden
\usepackage{pgf} %meer mooie plots
\usepackage{subcaption} %figuren naast elkaar
    \usetikzlibrary{arrows,automata} %mooie pijlen

\begin{document}
\begin{figure}[ht]
\centering
\begin{subfigure}{0.48\linewidth}
\centering
\begin{tikzpicture}
\begin{loglogaxis}[
xlabel=frequentie $f (\hertz)$,
ylabel=transferfunctie $T\ (\frac{\volt}{\volt})$,
grid=both, 
minor grid style={gray!25}, 
major grid style={gray!25},
no marks,
width=\linewidth]
\draw[color=red!50,fill=blue!50, fill opacity=0.5] (axis cs:3e4,1) circle (2pt) -- (axis cs:10e4,0.5) node[right,color=black] {$f_\text{\unit{3}{dB}}$};
\addplot [color=red] coordinates {(1e3, 1)
(3e4, 1) % breekpunt
(3*1e5, 0.1)};
\end{loglogaxis}
\end{tikzpicture}
\subcaption{Amplitude bode-plot.\label{BodeAmplitudeTweedeTrap}}
\end{subfigure}%
%\hspace{5pt}
%\begin{subfigure}{0.48\linewidth}
%\centering
%\begin{tikzpicture}
%\begin{axis}[
%xmode=log,
%ymode=normal,
%xlabel=frequentie $f (\hertz)$,
%ylabel=fase $\phi (\degree)$,
%ytick={-90,-45,0,45,90},
%grid=both, 
%minor grid style={gray!25}, 
%major grid style={gray!25},
%width=\linewidth,
%no marks]
%\addplot [color=red] coordinates {(1e3, 0)
%(3e3,0)
%(3e4, -45) % breekpunt
%(3e5,-90)
%(1e6,-90)};
%\end{axis}
%\end{tikzpicture}
%\subcaption{Fase bode-plot.\label{BodeFrequentieTweedeTrap}}
%\end{subfigure}%
%\caption{Bode-diagram transferfunctie tweede trap.\label{BodeEersteTrap}}
\end{figure}
\end{document}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.