Mathematica Mastering Mathematica Plotting: Tips and Tricks for Visualizing Your Data

AI Thread Summary
The discussion revolves around plotting data in Mathematica from a dataset with three columns. Initially, the user attempted to flatten the data into a single list using Flatten and Partition but felt lost in the process. However, they quickly found a more efficient method to extract individual columns for plotting. The solution involved using the Table function to create column1 from the data, which can be simplified with the syntax column1 = data[[All,1]]. This highlights the importance of knowing efficient data manipulation techniques in Mathematica for visualizing relationships between multiple data columns.
Moonshine
Messages
31
Reaction score
0
I have some data I imported into Mathematica. It has three columns. I want to plot col1 vs. col2, col2 vs. col3, and col1 vs. col3.

I started out doing this

Flatten[Partition[data, 3]]

to get one long list. I'm kind of lost. Any help is appreciated!
 
Physics news on Phys.org
Nevermind, I figured out you could do this almost immediately after posting that

column1 = Table[data[[i, 1]], {i, 1, Length[data]}]
 
A shortcut for that is:
column1 = data[[All,1]]
 

Similar threads

Replies
6
Views
4K
Replies
4
Views
5K
Replies
1
Views
3K
Replies
1
Views
2K
Replies
2
Views
3K
Back
Top