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

  • Home
  • SEARCH
  • 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 6358511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:23:22+00:00 2026-05-24T23:23:22+00:00

Hi I want to plot multiple (x,y) coordinates in a single graph. Say I

  • 0

Hi I want to plot multiple (x,y) coordinates in a single graph. Say I have a data file which has the contents like the following:

 x      y
0.0    0.5
0.12   0.1
0.16   0.4
0.2    0.35
0.31   0.8
0.34   0.6
0.38   1.0
0.46   0.2
0.51   0.7
0.7    0.9

could I have a some more data in this file like,

 x     y       x1     y1
0.0    0.5    0.04    0.7   
0.12   0.1    0.08    0.74 
0.16   0.4    0.12    0.85
0.2    0.35   0.16    0.9
0.31   0.8    0.2     0.53
0.34   0.6    0.24    0.31
0.38   1.0    0.28    0.87
0.46   0.2    0.32    0.20
0.51   0.7    0.36    0.45
0.7    0.9    0.4     0.64

and plot the graph on gnuplot where (x,y) and (x1,y1) would all be in a single curve? Thank you.

  • 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-24T23:23:23+00:00Added an answer on May 24, 2026 at 11:23 pm

    gnuplot can only plot column format data as far as I know. That said, you will have to plot it in after transpose your data as follows:

    x  0.000000 y  0.500000 x  0.120000 y  0.100000  ...
    x1 0.040000 y1 0.700000 x1 0.080000 y1 0.740000  ...
    

    and plot data us 1:2, data us 3:4, data us 5:6.

    To transpose the data, you can either change your program to write it in this way, or use following awk script:

    awk '{for (i=1;i<=NF;i++) arr[NR,i]=$i;} END{for (i=1;i<=NF;i=i+2) {for (j=1;j<=NR;j++) {printf "%f %f ",arr[j,i],arr[j,i+1]} print ""}}' datafile
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've following data: I want to plot a graph shows for all x the
I want to have multiple lines on the same plot. Multiple data points. In
I want to use core-plot for drawing line graph dynamically. data won't come at
I have 6 vectors which I want to plot. How I can make each
I have multiple sets of xy pairs that I want to plot. I want
I want to plot some data into a web graph control(preferably javascript or php).
I have created a map which allows the user to plot multiple markers with
I want to plot multiple data sets on the same scatter plot: cases =
I want to plot a simple histogram, using raw data. ie, I have a
I have some data that I want to plot in MATLAB. The data consists

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.