1

I have 5 curves of functions that I want to put in the same TikZ graphic. The functions are:

$$f(x)= 1.5e6(s^(-1/0.06)-1)^(1-0.06)$$
$$g(x)= 10^7(s^(-1/0.412)-1)^(1-0.412)$$
$$h(x)= (1-s^2)*(1-s^(5/3))$$
$$w(x)= (1+(s^(-16.67) - 1)^(1.880) /4)^(-0.5)$$
$$z(x)= (1+(s^(-2.429) -1)^(1.1760))^(-1)$$

I tried

   \documentclass[10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{pgf,tikz}
\usetikzlibrary{arrows}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\draw[->,color=black] (0,0) -- (1,0);
\foreach \x in {}
\draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$};
\clip(0,0) rectangle (1,1);
\draw[smooth,samples=100,domain=1.0E-4:1.0] plot(\x,{1500000*((\x)^((-1)/0.06)-1)^(1-0.06)});
\draw[smooth,samples=100,domain=1.0E-4:1.0] plot(\x,{10000000*((\x)^((-1)/0.41)-1)^(1-0.41)});
\draw[smooth,samples=100,domain=1.0E-4:1.0] plot(\x,{(1-(\x))^2*(1-(\x)^(5/3))});
\draw[smooth,samples=100,domain=1.0E-4:1.0] plot(\x,{(1+((\x)^(-16.67)-1)^1.88/4)^(-0.5)});
\draw[smooth,samples=100,domain=1.0E-4:1.0] plot(\x,{(1+((\x)^(-2.43)-1)^1.18)⁻^1});
\end{tikzpicture}
\end{document}

but the file not compile in pdf. Olso, i want to make x only beween 0 and 1, and finally, how i can put captions on the graph with the color and beside the name of the function for each curve. Thank's for the help.

  • Why do you have doman as 1.0E-4:1.0? What is ⁻^1 supposed to be? – cfr Oct 22 '15 at 21:48
  • Right now it is really not clear which functions you are trying to plot. Typesetting $z(x)= (1+(s^(-2.429) -1)^(1.1760))^(-1)$, for example, gives a nonsense result. So although I can reproduce the errors (or, at least, although I can certainly produce errors), I have no idea what would count as correcting those errors. – cfr Oct 22 '15 at 22:01
  • For example, should the last one be $z(x)= (1+(s^{-2.429}-1)^{1.1760})^{-1}$? – cfr Oct 22 '15 at 22:03
  • Look up the syntax for \pgfmathparse (which is what is being used here) starting on page 928 of the pgf manual (v3.0.1a). – John Kormylo Oct 23 '15 at 0:16
  • Why you're adding circuitikz tag? – CroCo Oct 23 '15 at 20:02

Your Answer

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

Browse other questions tagged or ask your own question.