Mathematica: DiscretePlot type plot with x values from a list

  • Mathematica
  • Thread starter Swamp Thing
  • Start date
  • #1

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

  • #2
29,045
5,319
Try ListPlot with the option Filling->Axis
 
  • #3
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:

Related Threads on Mathematica: DiscretePlot type plot with x values from a list

Replies
1
Views
2K
  • Last Post
Replies
3
Views
14K
  • Last Post
Replies
2
Views
7K
Replies
2
Views
4K
Replies
4
Views
3K
Replies
5
Views
3K
Replies
5
Views
3K
Replies
2
Views
8K
Replies
1
Views
4K
Replies
6
Views
7K
Top