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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T17:15:59+00:00 2026-06-03T17:15:59+00:00

My intention is to have loaded variable i in for cycle – I want

  • 0

My intention is to have loaded variable i in for cycle – I want to have it usable for this cycle. Current state is that gnuplot loads var i from the first echo as a string not var.

SPEED=5

echo "plot '< head -n \"\$((SPEED*i))\" `echo ${INFILE}`' using 1:3 ;">> file.plt

for ((i=1;i<="$FRAMES";i++))                                     
do      
    echo  " 
        load '`echo ${file.plt}`';  
        " | gnuplot
done
  • 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-03T17:16:01+00:00Added an answer on June 3, 2026 at 5:16 pm

    I think you can probably do all of this in gnuplot directly…

    if(! exists("N")) N=0
    FRAMES=10
    FILE='myfile.plt'
    SPEED=5
    f(i)=sprintf("< head -n %d ".FILE,i+SPEED)
    plot f(N) using 1:3
    if(N < FRAMES) N=N+1
    if(N < FRAMES) reread
    

    Gnuplot 4.6 makes this even easier:

    do for [N=1:10]{
       FILE='myfile.plt'
       SPEED=5
       f(i)=sprintf("< head -n %d ".FILE,i+SPEED)
       plot f(N) using 1:3
    

    }


    and instead of using head, you can probably use the every datafile modifier (help every for details). I think something like the following:

    NPT=N+SPEED
    plot FILE every ::::NPT using 1:3
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UITableView that is populated with cells of a variable height. I
I have a javascript variable: var foo='<script type=text/javascript>alert(Hello World);<\/script>' The variable is inserted with
I have a project that loads 3rd party modules (in the form of DLLs)
I have a Windows Forms application that currently loads a database on startup. The
So my intention is to have a login in my iOS app that allows
My intention is to have a user initiate a status update from a webpage
I have a dependency injection container setup in my application and I'm thinking that
I have a question regarding dependency injection. say i want to create a class
I have written an application that uses the Tinymce editor. The administrator can create
I have some JavaScript from a 3rd party vendor that is initiating an image

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.