Mathematica Connecting Plot Points

In summary, the conversation discusses how to plot a set of points and connect them with a line in older versions of Mathematica, but this option is no longer available in version 8. Instead, the new function ListLinePlot can be used. The conversation also mentions how to plot in 3D, using the ListPlot3D function.
  • #1
brydustin
205
0
Given a set of points in a list how can you not only plot them (which I know how to do) but how can you connected a line between each successive pair of points.


i.e. { {Point1},{Point2},{Point3},...{PointN} } so that Point 1 has a straight line connecting to Point2, 2 to 3, 3 to 4,... K to K+1,..., and N-1 to N.

Where each point has x,y, and z "space" components.
 
Physics news on Phys.org
  • #3
I meant how do I do this in 3-dimensions, your response was restricted to two-dimensions and it doesn't appear to work in three.

For example,
RandomWalk = RandomReal[{-1, 1}, {30, 3}];
ListPlot[Accumulate[RandomWalk],PlotJoined->True]
causes an error, whereas
RandomWalk = RandomReal[{-1, 1}, {30, 2}];
ListPlot3D[Accumulate[RandomWalk],PlotJoined->True]
does not.
Bill Simpson said:
In older versions of Mathematica

ListPlot[{{1,1},{2,2},{3,1}},PlotJoined->True]

In version 8 according to http://reference.wolfram.com/mathematica/ref/ListPlot.html there is no longer a PlotJoined option for ListPlot and they have apparently replaced this with a new function ListLinePlot

http://reference.wolfram.com/mathematica/tutorial/PlottingListsOfData.html
 
Last edited:

1. What is Mathematica Connecting Plot Points?

Mathematica Connecting Plot Points is a feature in the Mathematica software that allows you to connect data points in a scatter plot with a line, making it easier to visualize the relationship between the data.

2. How do I use Mathematica Connecting Plot Points?

To use Mathematica Connecting Plot Points, simply plot your data points using the Plot function and then add the option "Joined -> True" to your code. This will connect the points with a line.

3. Can I customize the line in Mathematica Connecting Plot Points?

Yes, you can customize the line by adding additional options such as "PlotStyle" and "PlotMarkers" to your code. This allows you to change the color, thickness, and style of the line, as well as add markers to the data points.

4. Can I connect only certain points in my scatter plot?

Yes, you can specify which points you want to connect by using the "Joined -> {list of points}" option. This allows you to connect only specific points in your scatter plot, while leaving others unconnected.

5. Is Mathematica Connecting Plot Points available in all versions of Mathematica?

Yes, Mathematica Connecting Plot Points is a built-in feature in all versions of Mathematica. However, the specific options and syntax may vary slightly between versions.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
261
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
Replies
6
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
569
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
Back
Top