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

Click For Summary
The discussion focuses on creating vertical lines with dots at the top using specific x-positions and heights, suggesting the use of ListPlot with the Filling->Axis option, which successfully meets the initial requirement. A follow-up question addresses the challenge of visualizing complex numbers in a 3D plot using ListPointPlot3D. The user notes that the Filling->Axis option does not function as intended, as it directs lines downward rather than towards the t-axis. To resolve this, the user modified the data by adding a zero complex number before and after each entry, indicating that ListPointPlot3D may not be the most suitable plotting option for this scenario. The discussion seeks alternative methods for effectively plotting complex numbers as a function of t.
Swamp Thing
Insights Author
Messages
1,045
Reaction score
775
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
Try ListPlot with the option Filling->Axis
 
  • Like
Likes Swamp Thing and DrClaude
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:

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 6 ·
Replies
6
Views
4K