Mathematica: DiscretePlot type plot with x values from a list

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 3K views
Swamp Thing
Insights Author
Messages
1,065
Reaction score
821
TL;DR
Is it possible to get something that looks like DiscretePlot, but taking both the X *and* Y values from a list?
I would like vertical lines with dots at the top of them, with the x-positions and heights coming from
{{1.2, 3.5}, {2.3, 4.2}, {5.5, 6.7}} for example.
 
Physics news on Phys.org
That's exactly what I needed, thanks.

And another question, if I may: I have used ListPointPlot3D to show some complex numbers as a function of some ##t## that goes along the length of the box:
1585187196967.png


However, the Filling->Axis doesn't help here because it sends each line downwards rather than towards the ##t## axis.

I had to doctor the data and insert ##0 + i0## before and after each complex number to get the above plot -- so ListPointPlot3D is probably the wrong type of plot for this.

What is the best way to do this?
 
Last edited: