1

I want to plot

enter image description here

But I'm getting this

enter image description here

Here is the code I'm using:

\documentclass[border=3mm,tikz]{standalone} 
\begin{document}
\begin{tikzpicture}[baseline=0cm,xscale=.1,yscale=.01,nodes={scale=.9}]
   \draw[->,thick] (0,-0.5) -- (50,0) node[right] {$x$} coordinate (x axis);
  \draw[->,thick] (0,-0.5) -- (0,400) node[left] {$y$} coordinate (y axis);
  \foreach \x/\xtext in {10/100,20/200,30/300,40/400}
\draw (\x cm,1pt) -- (\x cm,-1pt) node[anchor=north] {$\xtext$};
\foreach \y/\ytext in {100/1\cdot 10^{15},200/2\cdot 10^{15},300/3\cdot 10^{15}}
\draw (1pt,\y cm) -- (-1pt,\y cm) node[anchor=east] {$\ytext$};
    \begin{scope}[ultra thick]
    \draw[blue] plot[id=onedotone,smooth,domain=-0:37.7,samples=100] function{1.1**(10*x)/10000000000000} node[above] {$1.1^x$};
    \draw[green] plot[id=xfive,smooth,domain=-0:50,samples=100] function{10*(10*x)**5/10000000000000} node[above,xshift=5mm] {$10*x^5$};
    \end{scope}
  \end{tikzpicture}
\end{document} 
2
  • 2
    plot function needs gnuplot do you have it installed?
    – Ignasi
    Feb 7 '18 at 11:59
  • 2
    Note that your .log file says Package pgf Warning: Plot data file 'test.onedotone.table' not found. on input line 16. Package pgf Warning: Plot data file 'test.xfive.table' not found. on input line 17. You need gnuplot installed as @Ignasi said, and you also need to run the document with shell escape enabled, e.g. pdflatex --shell-escape filename. Feb 7 '18 at 12:09
2

I suggest you use the pgfplots to draw it, like

\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}

\begin{document}

\begin{tikzpicture}
\draw[->,thick] (0,0) -- (7.8,0) node[right] {$x$} coordinate (x axis);
\draw[->,thick] (0,0) -- (0,6.25) node[left] {$y$} coordinate (y axis);

\begin{axis}[
legend pos=north west,
ymajorgrids=true,
%    ymin=0
]

% green plot
\addplot[domain=0:500,samples=50,green] plot(\x,10*\x^5);
%blue plot
\addplot[domain=0:375,samples=50,blue] plot(\x,1.10^\x);
\legend{$10 \cdot x^5$,$1.10^x$}
\end{axis}

\end{tikzpicture}

\end{document}

The result I have is

enter image description here

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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