# Mathematica: DiscretePlot type plot with x values from a list

• Mathematica

## Summary:

Is it possible to get something that looks like DiscretePlot, but taking both the X *and* Y values from a list?

## Main Question or Discussion Point

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.

## Answers and Replies

Related MATLAB, Maple, Mathematica, LaTeX News on Phys.org
Dale
Mentor
Try ListPlot with the option Filling->Axis

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:

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: