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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:14:43+00:00 2026-06-18T05:14:43+00:00

I have several data files produced from a Fortran code. All the data files

  • 0

I have several data files produced from a Fortran code. All the data files are following the same style regarding their names, that is: data###.out, where ### starts from 001 and ends to 500. I know that in order to read and plot several data files in gnuplot I must use

plot for [i=1:500] sprintf('data00%i.out', i) u 1:2 w d lc rgb 'black'

However, this only works until data009.out. For 010 to 099 it should skip one zero and from 100 to 999 two zeros. How can I obtain this?

  • 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-18T05:14:44+00:00Added an answer on June 18, 2026 at 5:14 am

    To pad with zeroes an integer printed with three digits, the correct format is %03i. Try:

    plot for [i=1:500] sprintf('data%03i.out', i) u 1:2 w d lc rgb 'black'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several large text text files that all have the same structure and
I have to make graphs from several files with data. I already found a
I have several existing XML schema files with a defined data model. I would
I have several tables that I am selecting data from. I am trying to
I have several files with code testing code (which uses a unittest class). Later
I have several classes that are containers of various data that I read from
I have several billion rows of data in CSV files. Each row can have
I have several files with similar data that I need to plot using gnuplot.
I have several possible files which could hold my data; they can be compressed
I have several CSV files in this format, named n-data.csv where n is 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.