3

I want to plot two functions about each other without any coordinate system. Can you please show me how/ give me a hint, how I can achieve this.

\begin{tikzpicture}
\begin{axis}[
    domain=0.125:1000,
    xmin=-10, xmax=1000,
    ymin=0, ymax=3,
    samples=400,
   % axis y line=center,
    %axis x line=middle,
]
    \addplot+[mark=none] {1+0.003*sin(x)+0.02*sin(x^2)+0.1*cos(5*x)+0.07236*cos(x)+0.1*sin(x*100)+0.068*cos(x*57)};
    \addplot+[mark=none] {1};
\end{axis}
\end{tikzpicture}
  • 1
    axis lines=none? – esdd Nov 3 '15 at 17:16
  • at which point in the code exactly? \begin{axis}[ lines=none, ... ] leads to an error – d4rty Nov 3 '15 at 17:22
  • 1
    For example \begin{axis}[axis lines=none, ...] But you have to use axis lines instead lines. – esdd Nov 3 '15 at 17:29
  • I think hide axis should work – Jake Nov 3 '15 at 17:48
  • 1
    @esdd Would you like to write up an answer? – Torbjørn T. Nov 3 '15 at 20:24
3

You can use axis lines=none as an option of the axis environment. Note that this option is only an alias for hide axis. So you get the same result with both.

\documentclass[margin=5pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.12}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
  axis lines=none,% 
  domain=0.125:1000,
  xmin=-10, xmax=1000,
  ymin=0, ymax=3,
  samples=400,
]
  \addplot+[mark=none]
    {1+0.003*sin(x)+0.02*sin(x^2)+0.1*cos(5*x)+0.07236*cos(x)+0.1*sin(x*100)+0.068*cos(x*57)};
  \addplot+[mark=none] {1};
\end{axis}
\end{tikzpicture}
\end{document}

Result:

enter image description here

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.