Math & Science ⇒ draw a graph
draw a graph
I am a newbie to latex and also to this forum.
I have to draw in vector format as in the attached figure. I kindly ask for suggestions.
Thanks
I have to draw in vector format as in the attached figure. I kindly ask for suggestions.
Thanks
- Attachments
-
- Fig009.jpg (90.64 KiB) Viewed 6436 times
NEW: TikZ book now 40% off at Amazon.com for a short time.
- Stefan Kottwitz
- Site Admin
- Posts: 10320
- Joined: Mon Mar 10, 2008 9:44 pm
draw a graph
Welcome to the forum!
What is the math formula for that graph you want to draw?
Stefan
What is the math formula for that graph you want to draw?
Stefan
LaTeX.org admin
draw a graph
I don't know it, so I was wondering if anyone on the forum knows it. (parametric also should work well with asymptote)
Thanks for the welcome and for the help.
Thanks for the welcome and for the help.
- Stefan Kottwitz
- Site Admin
- Posts: 10320
- Joined: Mon Mar 10, 2008 9:44 pm
draw a graph
It looks like a copy from a book, so perhaps there is some math context for parametrization?
Stefan
Stefan
LaTeX.org admin
draw a graph
unfortunately no, it's just an example
- Stefan Kottwitz
- Site Admin
- Posts: 10320
- Joined: Mon Mar 10, 2008 9:44 pm
draw a graph
Ok, then here is a similar example:
Put in what you think the formula may be.
Seems the figure is from Landau and Lifshitz, Mechanics, Vol. 1, figure 9 in 14. Motion in a central field. That may explain how to (re)produce it.
It's also seen as figure 6.1 (Open path of a particle) from the paper KAM Stability of The Kepler Problem with a General Relativistic Correction Term by Majed Sofiani.
Stefan
Code: Select all
\documentclass[border=10pt]{standalone}
\usepackage{pgfplots}
\usepgfplotslibrary{polar}
\begin{document}
\begin{tikzpicture}
\begin{polaraxis}[
domain = 0:1440,
samples = 1000,
]
\addplot[thick, blue] {sin(1.1*x)^2};
\legend{$\sin(1.1x)^2$}
\end{polaraxis}
\end{tikzpicture}
\end{document}
Seems the figure is from Landau and Lifshitz, Mechanics, Vol. 1, figure 9 in 14. Motion in a central field. That may explain how to (re)produce it.
It's also seen as figure 6.1 (Open path of a particle) from the paper KAM Stability of The Kepler Problem with a General Relativistic Correction Term by Majed Sofiani.
Stefan
LaTeX.org admin
- Stefan Kottwitz
- Site Admin
- Posts: 10320
- Joined: Mon Mar 10, 2008 9:44 pm
draw a graph
Here's a drawing repeating ellipses. This seems to come close, elliptic movements repeated.
You can compare the formula to the equation 3.2 in the appendix of the article I linked above.
With an arrow decoration macro from the pgfplots author Christian Feuersänger:
Stefan
Code: Select all
\documentclass[border=10pt]{standalone}
\usepackage{pgfplots}
\usepgfplotslibrary{polar}
\begin{document}
\begin{tikzpicture}
\begin{polaraxis}[
domain = 0:360,
samples = 100,
]
\foreach \w in {0,30,...,360} {
\addplot[thick, blue] {(1*(1-0.8^2)/(1+0.8*cos(x+\w))};}
\end{polaraxis}
\end{tikzpicture}
\end{document}
With an arrow decoration macro from the pgfplots author Christian Feuersänger:
Code: Select all
\documentclass[border=10pt]{standalone}
\usepackage{pgfplots}
\usepgfplotslibrary{polar}
\usepgfplotslibrary{colormaps}
\usetikzlibrary{decorations.markings}
\tikzset{
set arrow inside/.code={\pgfqkeys{/tikz/arrow inside}{#1}},
set arrow inside={end/.initial=>, opt/.initial=},
/pgf/decoration/Mark/.style={
mark/.expanded=at position #1 with
{
\noexpand\arrow[\pgfkeysvalueof{/tikz/arrow inside/opt}]{\pgfkeysvalueof{/tikz/arrow inside/end}}
}
},
arrow inside/.style 2 args={
set arrow inside={#1},
postaction={
decorate,decoration={
markings,Mark/.list={#2}
}
}
},
}
\begin{document}
\begin{tikzpicture}
\begin{polaraxis}[
domain = 0:360,
samples = 100,
]
\foreach \w in {0,30,...,360} {
\addplot[thick, blue] {(1*(1-0.8^2)/(1+0.8*cos(x+\w))} [arrow inside={end=stealth,opt={black, scale=1.05}}{0.5}];}
\end{polaraxis}
\end{tikzpicture}
\end{document}
LaTeX.org admin
- Stefan Kottwitz
- Site Admin
- Posts: 10320
- Joined: Mon Mar 10, 2008 9:44 pm
draw a graph
And with the option
Stefan
hide axis
:Code: Select all
\begin{polaraxis}[
domain = 0:360,
samples = 100,
hide axis,
]
...
LaTeX.org admin
draw a graph
I have no words for the help you have given me. Thank you so much