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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:01:09+00:00 2026-05-25T16:01:09+00:00

extending the question I had asked earlier which can be found here, plotting multiple

  • 0

extending the question I had asked earlier which can be found here, plotting multiple (x,y) co-ordinates in a single curve with gnuplot. I am trying to plot the bezier curves in gnuplot using 2 different files. Each (x,y) from the first file forms a bezier curve passing through the points from the second file. The first file has the co-ordinates 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.69   0.9    

The second file has the co-ordinates as the following:

 x      y
0.00   0.7
0.04   0.74073082208
0.08   0.85926917792 
0.12   0.9 
0.16   0.9
0.2    0.9  
0.24   0.749720623086
0.28   0.874229601255
0.32   0.74073082208
0.36   0.8 
0.4    0.721178508605 
0.44   0.878821491395
0.48   0.761772990545
0.52   0.700774803388
0.56   0.723771273415
0.6    0.789508073675
0.64   0.864014272269
0.68   0.896743348931

Now, how do I merge these two files to plot a single graph. These two files don’t have the same number of rows, but I guess that doesn’t matter. The first curve would be between (x1,y1) and (x2,y2) from the first file which would continue till (x10,y10). In the curve between (x1,y1) and (x2,y2); the points (x1,y1), (x2,y2) and (x3,y3) from the second file lie.

I followed this link http://t16web.lanl.gov/Kawano/gnuplot/datafile3-e.html to sort and concatenate the two files but got some weird lines which is totally wrong. These values should actually plot Bezier curves but not getting the graph. I have written the following gnuplot script to plot the concatenated data:

set term x11 persist
set title "Animation curves"
set xlabel "Time (secs.)"
set ylabel "Parameter"
set x2label "Phoneme1" offset -35
set pointsize 2
set key off
set style line 2 lt 0 lc 1 lw 2
set xrange [0.0:1.0]
set yrange [0.0:1.3]

plot [0.0:0.8] "< cat -n file1.dat" u 1:2 smooth csplines ls 1, "" u 1:(0.0):(0):(1.3) w vectors nohead ls 2, "" u ($1+0.005):(1):(sprintf("P %d", $0)) w labels, \
           "file1.dat" u 1:2 with points, \
           "file2.dat" u 1:2 with points, \    

I got the following error:

plot "< cat -n file1.dat" u 1:2 smooth csplines ls 1, "" u 1:(0.0):(0):(1.3) w vectors    nohead ls 2, "" u ($1+0.005):(1):(sprintf("P %d", $0)) w labels, "file1.dat" u 1:2 with points, "file2.dat" u 1:2 with points,                  
                          ^
"plot.gp", line 21: Cannot smooth: no data within fixed xrange!
  • 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-25T16:01:10+00:00Added an answer on May 25, 2026 at 4:01 pm

    The script below works on my machine. Maybe this is even what you are looking for…

    set term x11 persist
    set title "Animation curves"
    set xlabel "Time (secs.)"
    set ylabel "Parameter"
    set x2label "Phoneme1" offset -35
    set pointsize 2
    set key off
    set style line 2 lt 0 lc 1 lw 2
    set xrange [0.0:1.0]
    set yrange [0.0:1.3]
    
    plot [0.0:0.8] "< cat file1.dat file2.dat | sort -n" u 1:2 smooth csplines ls 1, \
                             "" u 1:(0):(0):2 w vectors nohead ls 2, \
                             "" u ($1 + 0.005):(1):(sprintf("P %d", $0)) w labels, \
                             "file1.dat" u 1:2 w p, \
                             "file2.dat" u 1:2 w p 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am extending a class defined in a library which I cannot change: public
I had asked some questions about developing an online judge sometime ago on stackoverflow
The responses I've got to this question have solved the problem I had in
Extending a previous question about JavaScript and jQuery, I'm trying to make an array
This question is related to extending class methods in Ruby, perhaps more specifically in
Expanding this question on how I learnt to pass from problem description to code
Expanding on this question , what is the best way to develop against both
When extending classes, I find it very descriptive to use the base ( MyBase
I'm new to extending Drupal, though I've done similar kinds of things for other
I'm extending the functionality of a class with a subclass, and I'm doing some

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.