2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-26 06:48:04 +02:00
LaTeX-examples/tikz/hard-limit-function/hard-limit-function.tex
Martin Thoma 7740f0147f Remove trailing spaces
The commands

find . -type f -name '*.md' -exec sed --in-place 's/[[:space:]]\+$//' {} \+

and

find . -type f -name '*.tex' -exec sed --in-place 's/[[:space:]]\+$//' {} \+

were used to do so.
2015-10-14 14:25:34 +02:00

29 lines
923 B
TeX

\documentclass[varwidth=false, border=2pt]{standalone}
\usepackage{pgfplots}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
axis x line=middle,
axis y line=middle,
grid = major,
width=16cm,
height=8cm,
grid style={dashed, gray!30},
xmin=-1, % start the diagram at this x-coordinate
xmax= 1, % end the diagram at this x-coordinate
ymin= 0, % start the diagram at this y-coordinate
ymax= 1.2, % end the diagram at this y-coordinate
xlabel=x,
ylabel=y,
/pgfplots/xtick={-1, -0.5, ..., 1}, % make steps of length 0.5
/pgfplots/ytick={0, 0.5, ..., 1}, % make steps of length 0.5
tick align=outside,
enlargelimits=false]
% plot the function
\addplot[domain=-1:1, blue, ultra thick,samples=500] {x < 0 ? 0 : 1};
\end{axis}
\end{tikzpicture}
\end{document}