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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:28:17+00:00 2026-06-04T07:28:17+00:00

I have two files A and B. Both files contain 2 columns, x and

  • 0

I have two files A and B. Both files contain 2 columns, x and y.

Now, I want to plot a graph for x vs (yA – yB). Does gnuplot provide a command for the same ?

One more thing, lets say xA and xB are not same. How should I plot a graph where x-axis contains all elements which are in both, xA and xB and y-axis is the difference is the corresponding y-components ?

  • 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-04T07:28:19+00:00Added an answer on June 4, 2026 at 7:28 am

    First, preprocess the files with join in bash:

    join <(sort -k1,1 file1) <(sort -k1,1 file2) > file3
    

    Sorting the files is essential, otherwise join would not work.

    Then you can use the result to draw the graph:

    plot '< sort -n file3' using 1:($2-$3) with lines
    

    Again, numeric sorting is needed here, because join uses alphanumeric sorting which makes the lines cross each other.

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

Sidebar

Related Questions

I have two files which both contain a list of words. Is there an
I have two excel files. Among many columns in both these files, they have
I have two projects within one solution. Both projects contain some files that are
I have two XML files. The structure of both XML files is as below:
I have two files, A is a subset of B. Both A and B
I've created two wave files using Audacity. Both have 44100hz sample rate, 32-bit float
I have two paths: /etc/nginx/sites-enabled /opt/nginx/conf/nginx.conf Both contain an .conf file, is it possible
I need to parse xml files from two sources. Both xml files contain the
I have two .bak files These files contain different tables in them, and it
I have two files: file1.txt and file2.txt . Both contains lines in this format:

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.