# How to create a plot of vectors emanating from the x axis?

I am trying to make a plot that looks something like the image seen below:

So far I have the following code:

ListPointPlot3D[
Table[{i, Cos[i], Sin[i]}, {i, -4 \[Pi], 4 \[Pi], 0.2}],
AxesStyle -> Thick, AxesLabel -> {"x", "y", "z"}, Filling -> Axis,
AxesOrigin -> {0, 0, 0}, Boxed -> False]


which yields the output:

My problem is that the 'stalks'/'stems' of the points are all originating from the projection of the points onto the xy plane. Is there a way for me to get the stems to originate from the x axis alone so that it mimics the first photo attached?

Any help would be greatly appreciated!

• Graphics3D[{Red, Arrowheads -> 1/100, Arrow /@ Table[{{i, 0, 0}, {i, Cos[i], Sin[i]}}, {i, -4 \[Pi], 4 \[Pi], \[Pi]/12}]}, Axes -> True, AxesStyle -> Thick, AxesLabel -> {"x", "y", "z"}, AxesOrigin -> {0, 0, 0}, PlotRange -> {{-4 \[Pi], 4 \[Pi]}, {-2, 2}, {-2, 2}}, ViewPoint -> {2 \[Pi], -1, 1}, Boxed -> False ] Commented Jul 21, 2020 at 9:33

You can use Graphics3D

Graphics3D[{Green, Tube[{{0, 0, 0}, {2 Pi, 0, 0}}, .04],
Table[{Sphere[{i, Cos[i], Sin[ i]}, .05],
Tube[{{i, 0, 0}, {i, Cos[ i], Sin[ i]}}, .04]},
{i, 0, 2 Pi, 2 Pi/30}]},
ImageSize -> Large, Boxed -> False]


or

Graphics3D[{Green, Tube[{{0, 0, 0}, {2 Pi, 0, 0}}, .04],
{Sphere[{#, Cos[ #], Sin[ #]}, .05],
Tube[{{#, 0, 0}, {#, Cos[ #], Sin[ #]}}, .04]} & /@
Subdivide[0, 2 Pi, 30]},
ImageSize -> Large, Boxed -> False]


Alternatively, you can use ParametricPlot3D

Show[ParametricPlot3D[{t, v Cos[t], v Sin[t]}, {t, 0, 2 Pi}, {v, 0, 1},
MeshFunctions -> {#4 &}, Mesh -> 30,
MeshStyle -> {Green, Tube[.05]},
PlotStyle -> None, Boxed -> False, Axes -> False],
ParametricPlot3D[{t, 0, 0}, {t, 0, 2 Pi}, PlotStyle -> {Green, Tube[.05]}]]


Update: "make the ends of the tubes arrow heads? So that they resemble vectors emanating from the x axis."

Show[Normal[ParametricPlot3D[{t, v Cos[t], v Sin[t]}, {t, 0, 2 Pi}, {v, 0, 1},
MeshFunctions -> {#4 &}, Mesh -> 30, MeshStyle -> Green,
PlotStyle -> None, Boxed -> False, Axes -> False]] /.
Line[x_] :> {Arrowheads[.05], Arrow[Tube[SortBy[x, Abs@ #[[2]] &], .05]]},
ParametricPlot3D[{t, 0, 0}, {t, 0, 2 Pi},
PlotStyle -> {Green, Tube[.05]}], ImageSize -> Large]


• These all work perfectly, thanks so much! Just out of interest, do you know of any way to use the parametricPlot3D method you've done and make the ends of the tubes arrow heads? So that they resemble vectors emanating from the x axis. Commented Jul 25, 2020 at 11:24
• @Salah, please see the update.
– kglr
Commented Jul 27, 2020 at 0:34