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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:05:17+00:00 2026-05-25T02:05:17+00:00

A quick question about a gnuplot. I have two graphs, ploted from file, like

  • 0

A quick question about a gnuplot.
I have two graphs, ploted from file, like this:

plot "t2" using 1:75 with linespoints title "crop 20",\
"t2" using 1:11 with linespoints title "crop 30"

Now I want to identify points on both graphs if they have identical height e.g Y coordinate.
It could be a different colour, or a perfect solution would be to draw a line between them.

Any ideas?
Thanks a lot.

EDIT

Thanks for the reply Sunhwan Jo, method suggested works fine, as long as similar values appear in the same order. See the image
enter image description here

Two graphs share several more points in the same height, but its not picked up due to length difference.

  • 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-25T02:05:18+00:00Added an answer on May 25, 2026 at 2:05 am

    You may use external program to filter out data points that have same data in two different column (here I’ve examined if 75th and 11th column has same entry).

    plot "t2" using 1:75 with linespoints title "crop 20",\
         "t2" using 1:11 with linespoints title "crop 30",\
         "< awk '{if ($75==$11) print $0}' t2" us 1:11 with lines points title "crop 20/30"
    

    EDIT:

    Okay, above will not work if you would like to show the data points that have same data in different rows. AWK script will be more elaborated. I have tried as below, hope this helps.

    Here’s test data.

    0      0.0      0.0
    1      0.3      0.6
    2      1.6      1.6
    3      0.3      1.5
    4      0.6      3.6
    5      0.3      4.3
    6      0.3      0.7
    7      5.5      5.5
    8      6.6      6.6
    9      5.2      5.2
    10     8.3      8.3
    11     2.7      5.0
    12     2.8      8.3
    13     3.3      2.8
    14     7.9      3.9
    15     9.9      7.9
    16    15.3     15.3
    17    14.7     14.7
    18     3.8     18.1
    19    18.1     12.1
    

    And the gnuplot command (note some obvious difference in column designation):

    plot 'test.dat' us 1:2 w lp title "1", \
         'test.dat" us 1:3 w lp title "2", \
         "< awk '{ind[NR]=$1; arr1[NR]=$2; arr2[NR]=$3} END{for (i=1; i<=NR; i++) {for (j=1; j<=NR; j++) {if (arr1[i]==arr2[j]) print ind[i], arr1[i]}}}' test.dat' test.dat" us 1:2 w lp title '1==2'
    

    Resulting plot:

    enter image description here

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

Sidebar

Related Questions

I have a quick question about fetching results from a weakly typed cursor and
I have a quick question about jQuery selectors. Is doing this: $('.class_el_1, .class_el_2').hide(); The
I have a quick question about programming using Vim. I sometimes make a silly
I have a quick question about using logical operators in an if statement. Currently
I have a quick question about namespace scope: I have two namespaces, A and
Quick Python question: How do I access data from a nested list like this:
Quick question about the Dijit.Form.DateTextBox http://docs.dojocampus.org/dijit/form/DateTextBox This page contains the following: also validates against
Quick question about general MVC design principle in PHP, using CodeIgniter or Kohana (I'm
Quick question about cursors (in particular Oracle cursors). Let's say I have a table
Quick question about android market application updates. If I have an app on the

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.