0

I would like to reproduce some scheme of Strogatz book with tiks or ps-plot. I've tried the whole afternoon and there is always something that goes wrong.

My code is

 \begin{tikzpicture} \begin{axis}[ clip=false, xmin=0,xmax=9, xlabel= $x$, ylabel=, ymin=-1.5,ymax=1.5, axis lines=middle, %axis x line=middle, %axis y line=left, % axis x line=middle, xtick={0, 3.14, 6.28}, xticklabels={$0$,$\pi$,$2\pi$} ] \addplot[domain=0:8,samples=200,blue]{sin(deg(x))}node[left,pos=1.1]{$\sin x$}; \end{axis} \draw node[fill=black,circle]{} (0,0) \end{tikzpicture} 

However, it doesn't put the node on the right place.

2
  • 2
    I think it would help if we could see one of those images. Commented Sep 29, 2024 at 20:13
  • 1
    please make your code a complete small document that produces some output and also show an image of the desired output. Commented Sep 29, 2024 at 20:43

1 Answer 1

2

Like this??

enter image description here

\documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ clip=false, xmin=0,xmax=9, xlabel= $x$, ylabel=, ymin=-1.5,ymax=1.5, axis lines=middle, %axis x line=middle, %axis y line=left, % axis x line=middle, xtick={0, 3.14, 6.28}, xticklabels={$0$,$\pi$,$2\pi$} ] \addplot[domain=0:8,samples=200,blue]{sin(deg(x))} node[pos=1,right]{$\sin x$} node[pos=0,fill=black, circle]{}; \end{axis} % \draw node[fill=black,circle]{} (0,0); \end{tikzpicture} \end{document} 

If you draw outside the axis environment it uses a different coordinate system...

1
  • If you make it black and white it will be very similar to Strogatz book, which if am not mistaken was also the author of The Joy of TeX! Commented Sep 30, 2024 at 6:40

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.