Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6330973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:58:14+00:00 2026-05-24T17:58:14+00:00

I have a CSV file with 5 columns and about 2*10 4 rows that

  • 0

I have a CSV file with 5 columns and about 2*104 rows that I need to visualise.

I’ve imported the file like so:

data = Import["res.csv", "CSV"];`

Now, I’m going to want to generate a lot of visuals from this – all 5 dimensions on a single plot as well as various cross sections.

My questions:

If I want to select, say columns 1, 4 and 5 from my data and feed them to ListPlot3D how would I do that?

And, values in columns can be grouped. So if I wanted to ListPlot3D colums 1, 2, 4 and 5, but I want to group columns 1 and 2 on the same axis, how would I tell Mathematica to do that?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T17:58:15+00:00Added an answer on May 24, 2026 at 5:58 pm

    I hate to disagree with a fellow poster especially after it has been accepted, but the Transpose is unnecessary. Almost everything you’re asking for can be done within the context of Part:

    ListPlot3D[ data[[All, {1, 4, 5}]] ]
    

    Since matrices are stored row-wise within Mathematica, [[All, {1, 4, 5}]] can be read [[rows, columns]]. More specifically, All indicates here that you want all rows, but you can specify specific rows as well. Another construct that may be of interest is Span which is used to specify groups of indices, and if your CSV file contains a header row, you can strip it from your data using

    ListPlot3D[ data[[ 2 ;; , {1, 4, 5}]] ]
    

    As to your second requirement, to use both columns 1 and 2 as the x coordinate, then it is simply

    ListPlot3D[ {data[[All, {2, 4, 5}]], data[[All, {1, 4, 5}]]} ]
    

    and you change All to 2;; if you wish to strip off the header row.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a CSV data file with rows that may have lots of columns
I have a csv file with 350,000 rows, each row has about 150 columns.
I have a .csv file that is frequently updated (about 20 to 30 times
I have a CSV file that holds about 200,000 - 300,000 records. Most of
Whenever I import a text file with about 2 million rows and 2 columns
I have a csv file that has 2 columns separated by a comma -
I have a .csv file in my matlab folder with 38 columns and about
I have several excel files carrying 90 columns and about 500 rows, each file
I have a CSV file that has only 1 column, but has close to
How to read and import .csv file in groovy on grails. I have .csv

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.