
The data needs to be generated differently or reshaped. The plotting function wants two collections: the set of $x$ values for the points and the set of $y$ values. This returns a vector of points (stored as vectors). Then we can create the $5$ points easily through broadcasting: vs = r.(ts) Let's see this with 5 points, the first and last being identical due to the curve: r(t) = As with plotting of curves, the goal would be to take many points between a and b and from there generate the $x$ values and $y$ values.
#COUNTOUR PLOT VS PARAMETIR CPLOT FULL#
Suppose $r(t) = \langle \sin(t), 2\cos(t) \rangle$ and the goal is to plot the full ellipse by plotting over $0 \leq t \leq 2\pi$. As such, we only discuss the latter.Īn example helps illustrate. The former is convenient for some cases, but typically we will have a function r(t) which is vector-valued, as opposed to a vector of functions. In Plots, parameterized curves can be plotted through two interfaces, here illustrated for $d=2$: plot(f1, f2, a, b) or plot(xs, ys). A parametric plot over $$ is the collection of all points $r(t)$ for $a \leq t \leq b$. A familiar example is the equation for a line that travels in the direction of $\vec$. Let $r(t)$ be a vector-valued function with values in $R^d$, $d$ being $2$ or $3$. We will need to manipulate contours directly, so pull in the Contours package, using import to avoid name collisions and explicitly listing the methods we will use: import Contour: contours, levels, lines, coordinatesįinally, we need some features for vectors: using LinearAlgebra Parametrically described curves in space We will also use the ForwardDiff for derivatives and use the "prime" notation: using ForwardDiff Quiver!(xs_ys()., quiver=Tuple(xs_ys()) kwargs.) These will be described in more detail in the following: xs_ys(vs) = Tuple(eltype(vs) for i in 1:length(vs)] for j in eachindex(first(vs))) We will make use of some helper functions that will simplify plotting. Import Contour: contours, levels, level, lines, coordinates

This covers plotting the typical 2D and 3D plots in Julia with the Plots package.
