74 lines
1.8 KiB
TeX
74 lines
1.8 KiB
TeX
%!tikz editor 1.0
|
|
\documentclass{article}
|
|
\usepackage{tikz}
|
|
\usepackage[graphics, active, tightpage]{preview}
|
|
\usepackage{circuitikz}
|
|
\PreviewEnvironment{tikzpicture}
|
|
|
|
%!tikz preamble begin
|
|
\usepackage{pgfplots}
|
|
%!tikz preamble end
|
|
|
|
|
|
\begin{document}
|
|
%!tikz source begin
|
|
\begin{tikzpicture}[line cap=round,line join=round,x=1cm,y=1cm,scale=3]
|
|
\tikzset{
|
|
every pin/.style={fill=yellow!50!white,rectangle,rounded corners=3pt,font=\tiny},
|
|
small dot/.style={fill=black,circle,scale=0.3},}
|
|
\begin{axis}[
|
|
x=2cm,y=2cm,
|
|
axis lines=middle,
|
|
axis line style = {-latex},
|
|
xmin=-2.5,
|
|
xmax=2.5,
|
|
ymin=-0.5,
|
|
ymax=4,
|
|
%ytick={1,2},
|
|
%yticklabels={1,2},
|
|
xtick=\empty,
|
|
xlabel=$x$,
|
|
ylabel=$y$,
|
|
extra x ticks={0.5},
|
|
extra x tick style={
|
|
tick label style={anchor=north}},
|
|
extra x tick labels={$\frac{1}{2}$},
|
|
extra y ticks={0.25},
|
|
extra y tick style={
|
|
tick label style={anchor=east}},
|
|
extra y tick labels={$\frac{1}{4}$},
|
|
enlargelimits = true,
|
|
]
|
|
|
|
|
|
|
|
\draw [thick, dashed] (axis cs: -0.05,1) -- (axis cs: 0.5,1);
|
|
\draw [thick, dashed] (axis cs: 0.5,-0.05) -- (axis cs: 0.5,1);
|
|
|
|
|
|
\addplot[domain=-2:2, blue, line width=1,samples=2000] {x^2};
|
|
|
|
\addplot[color=blue!80!black, only marks, style={mark=*}] coordinates {(0.5,2)};
|
|
|
|
\draw [ultra thin, dashed] (axis cs: -.05,1/4) -- (axis cs: 1/2,1/4);
|
|
\draw [thick, dashed] (axis cs: 0.5,1) -- (axis cs: 0.5,2);
|
|
|
|
|
|
|
|
\scriptsize{ \node () at (axis cs:2.4,1.8) {$\displaystyle y=\left\{ \begin{array}{rl}
|
|
\frac{x^2-\frac{1}{4}}{x-\frac{1}{2}} & \text{für}\; x \neq \frac{1}{2}\\ \\
|
|
2 & \text{für}\; x = \frac{1}{2}\\
|
|
\end{array}
|
|
\right .$};}
|
|
|
|
% \draw[] (axis cs:1.3, 0.1) -- (axis cs:1.3, -0.1);
|
|
% \node () at (axis cs:1.3,-0.25) {$x_0$};
|
|
|
|
% \draw[] (axis cs:1.14,-0.05) -- (axis cs:1.14, 0.05);
|
|
% \node () at (axis cs:0.33,-0.45) {$\frac{1}{\pi}$};
|
|
|
|
\end{axis}
|
|
\end{tikzpicture}
|
|
%!tikz source end
|
|
|
|
\end{document} |