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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:48:07+00:00 2026-06-05T21:48:07+00:00

I am trying to plot a graph using gnuplot. I have six text files.

  • 0

I am trying to plot a graph using gnuplot. I have six text files. Each text file contains two columns. The first column represents time in seconds (a floating point number). The second one is a sequence number. I want to plot the graph of time vs. sequence number in a single graph for all six files. I am using this file to do that.

set terminal png
set output 'akamai.png'

set xdata time
set timefmt "%S"
set xlabel "time"

set autoscale

set ylabel "highest seq number"
set format y "%s"

set title "seq number over time"
set key reverse Left outside
set grid

set style data linespoints

plot "print_1012720" using 1:2 title "Flow 1", \
plot "print_1058167" using 1:2 title "Flow 2", \
plot "print_193548"  using 1:2 title "Flow 3", \ 
plot "print_401125"  using 1:2 title "Flow 4", \
plot "print_401275"  using 1:2 title "Flow 5", \
plot "print_401276"  using 1:2 title "Flow 6"

Where my files are:

  • print_1012720
  • print_1058167
  • print_193548
  • print_401125
  • print_401275
  • print_401276

It is giving a strange error as below:

“plot.plt”, line 24: undefined variable: plot

Am I doing something wrong? Is it possible to plot the input data from different files in the same graph?

  • 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-05T21:48:08+00:00Added an answer on June 5, 2026 at 9:48 pm

    You’re so close!

    Change

    plot "print_1012720" using 1:2 title "Flow 1", \
    plot "print_1058167" using 1:2 title "Flow 2", \
    plot "print_193548"  using 1:2 title "Flow 3", \ 
    plot "print_401125"  using 1:2 title "Flow 4", \
    plot "print_401275"  using 1:2 title "Flow 5", \
    plot "print_401276"  using 1:2 title "Flow 6"
    

    to

    plot "print_1012720" using 1:2 title "Flow 1", \
         "print_1058167" using 1:2 title "Flow 2", \
         "print_193548"  using 1:2 title "Flow 3", \ 
         "print_401125"  using 1:2 title "Flow 4", \
         "print_401275"  using 1:2 title "Flow 5", \
         "print_401276"  using 1:2 title "Flow 6"
    

    The error arises because gnuplot is trying to interpret the word “plot” as the filename to plot, but you haven’t assigned any strings to a variable named “plot” (which is good – that would be super confusing).

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

Sidebar

Related Questions

I'm trying to plot a graph in real time using GNUplot and C++. Does
I'm (trying to) using JSON with PHP. I want to plot a graph using
I'm trying to plot two data sets with gnuplot. They are both (x, y,
I'm trying to make a plot with pylab/matplotlib, and I have two different sets
I'm trying to plot a graph in matplotlib using numpy and meshgrid. I want
I am trying to plot two box-plots in the same plot, each within the
I'm trying plot markers in a specific city using google Geochart when the region
I'm currently trying to use the core-plot library to graph some data I get
I'm trying to show an intercept on a line graph using the ggplot vline
I'm trying to plot two sets of data wrt to time on the same

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.