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 8462959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:19:39+00:00 2026-06-10T14:19:39+00:00

I have imported a csv file into a list with this stmt: data1 =

  • 0

I have imported a csv file into a list with this stmt:

data1 = Take[Import["D:\\_reports\\optim_5_60_b_2.csv", "CSV"],   5]

Which gives:

{{178, 8, 9, 1}, {152, 2, 8, 1}, {378, 8, 9, 2},
 {343, 3, 7.5`, 2}, {143, 3, 7.5`, 1}}

I would like to create a plot where the x-axis is based on the first field:

178,152,378,343,143,373,743,352

And the plot creates a line for each subsequent field, so the 2nd field is:

8,2,8,3,3,3,3,2

This would be the first line on the y-axis, the other y-axis values would be plotted in the same manner. I would like the first y-plot to be plotted in red, and the second in blue, and the third in green.

  • 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-06-10T14:19:41+00:00Added an answer on June 10, 2026 at 2:19 pm

    And an alternative version:

    data = {{178, 8, 9, 1}, {152, 2, 8, 1}, {378, 8, 9, 2},
       {343, 3, 7.5, 2}, {143, 3, 7.5, 1}};
    
    x = data[[All, 1]];
    
    ListLinePlot[
     Transpose[
      Sort[MapThread[Function[xpt, {xpt, #} & /@ #2][#1] &,
        {x, Rest /@ data}]]], PlotStyle -> {Red, Blue, Green},
     PlotMarkers -> {Automatic, 10}, AxesOrigin -> {Min@x, Automatic}]
    

    enter image description here

    Similarly, but easier to read:

    ListLinePlot[
     Transpose[
      Sort[Table[Map[{data[[i, 1]], #} &, Rest[data[[i]]]],
        {i, Length[data]}]]], PlotStyle -> {Red, Blue, Green},
     PlotMarkers -> {Automatic, 10}, AxesOrigin -> {Min@x, Automatic}]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very large CSV file that I imported into a sqlite table.
I have tried to import several csv files into one file. However, the new
just started learning Rails and have managed to import a csv file into a
I have imported a JSF/Facelets project from SVN into Netbeans. Any change which I
I am trying to import data into rails (3.1) and I have created this
I have a project where a client can import an excel file, csv, or
I have a need to import a number of CSV files into corresponding tables
I've been working on this simple code that puts a CSV file into a
I have a CSV file to be imported to MYSQL database. The problem is
I have imported a csv file containing spatial area information in varchar, then converted

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.