In R it's easy to do something like
x <- seq(0, 2*pi, 0.01)
plot(sin(x), cos(3*x), type='line')
to get the plot
How can I make such a plot using tikz/pgfplots?
In R it's easy to do something like
x <- seq(0, 2*pi, 0.01)
plot(sin(x), cos(3*x), type='line')
to get the plot
How can I make such a plot using tikz/pgfplots?
It is also easy with pgfplots
\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.12}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot+[domain=0:360,samples=101,no marks] ({sin(x)},{cos(3*x)});
\end{axis}
\end{tikzpicture}
\end{document}
\pgfplotsset{trig format plots=rad} in the preamble would reconfigure all plots to use radians. In this case, one could also write domain=0:2*pi to get the same outcome.
– Christian Feuersänger
Aug 22 '15 at 15:13
compat key as assume version or somoething along those lines? That would make the users aware that there are compatibility options and also assume version=newest becomes a literal.
– percusse
Aug 22 '15 at 15:36
compat is an established best-practise and people are used to it. And since assume version=newest sounds as if that would be a good idea, I would even more say that I would rather discourage people from it and not at the alias (newest is often a bad idea, see http://tex.stackexchange.com/questions/139690/dos-and-donts-of-pgfplotssetcompat-newest/139695#139695). With this reasoning, I would rather not follow the suggestion. If in doubt, let us discuss it by email.
– Christian Feuersänger
Aug 22 '15 at 18:44
compat. I was thinking along the lines of no marks and no markers situation. I don't think you should replace anything because it is well established. I'll think about it a little more on this. For the newest, I agree it is a little bit abused by the newcomers.
– percusse
Aug 23 '15 at 08:28
~syntax you use in the title. – daleif Aug 22 '15 at 11:36