Graphics, Figures & Tablesfunction isn´t shown

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Anasus
Posts: 3
Joined: Sat Jan 09, 2010 10:10 pm

function isn´t shown

Post by Anasus »

When I compile this I only get the background grid, but the two functions doesn´t appear. Still they are in this code, what should I do?
Thank you very much,
Anasus

Code: Select all

\documentclass[10pt]{article}
\usepackage{pgf,tikz}
\usetikzlibrary{arrows}
\pagestyle{empty}
\begin{document}
\definecolor{cqcqcq}{rgb}{0.75,0.75,0.75}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\draw [color=cqcqcq,dash pattern=on 2pt off 2pt, xstep=1.0cm,ystep=1.0cm] (-0.56,-0.94) grid (12.54,7.32);
\draw[->,color=black] (-0.56,0) -- (12.54,0);
\foreach \x in {,1,2,3,4,5,6,7,8,9,10,11,12}
\draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$};
\draw[color=black] (11.25,0.05) node [anchor=south west] { Geschwindigkeit};
\draw[->,color=black] (0,-0.94) -- (0,7.32);
\foreach \y in {,1,2,3,4,5,6,7}
\draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$};
\draw[color=black] (0.06,7.05) node [anchor=west] { Reibung};
\draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$};
\clip(-0.56,-0.94) rectangle (12.54,7.32);
\draw[line width=2.8pt] plot[raw gnuplot, id=func0] function{set samples 100; set xrange [-0.46320000000000006:12.444]; plot 8*\pi*0.03*x};
\draw plot[raw gnuplot, id=func1] function{set samples 100; set xrange [-0.46320000000000006:12.444]; plot sin(x)};
\draw[color=black] (-0.49,-0.38) node {$f$};
\draw[color=black] (-0.46,-0.77) node {$g$};
\end{tikzpicture}
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

function isn´t shown

Post by localghost »

You have to enable shell escape to let the compiler call Gnuplot. See the documentation of your LaTeX distribution how to do that. A forum search may also yield helpful stuff. Check the log file for according messages.


Best regards
Thorsten
Post Reply