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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:04:46+00:00 2026-05-27T07:04:46+00:00

I have a datafile listing bandwidth for each machine on a network, but down

  • 0

I have a datafile listing bandwidth for each machine on a network, but down and up. It looks like:

""  0   1   2   3
"Machine 1 D"   320 768 1287    1318
"Machine 1 U"   119 245 561 491

Where the first column is the data key, and there’s 24 columns representing hours of data. I’d like to generate two histograms,(A) a rowstack that shows the total bandwidth of all the machines for each hour, and (B) a columnstack that shows each machine’s hourly usage. So, in graph A, the hours would appear on the x axis, and each machine’s usage would stack up cumulatively. In graph B, the machine names would appear on the x axis, and the usage during each hour would stack up cumulatively.

And, for extra credit, I’d like to graph the data twice, alternating rows (once for upload, once down). The trick here, is to preserve the first row as it contains column titles.

Does anyone know how to do this? I can get some results, but can’t seem to get the key/xtics/titles etc to show correctly.

EDIT: Ok, so here’s an example of what I have for a columnstack –

reset
set style fill solid noborder
file = '..\test\example.dat'
col = 24
set style data histogram
set style histogram columnstacked
plot \
    for [i=2:col+1] \
    file \
        u i title columnhead

Which generates something like:

sample graph

So, for example, how do I create a key with the column(1) fields?

  • 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-27T07:04:46+00:00Added an answer on May 27, 2026 at 7:04 am

    In the end, I discovered a number of things. First, using iteration in gnuplot seems rather buggy – it works, but constrains other options. Second, I reported a bug where the “every” statement is incompatible with using columnheaders. Third, I can’t column/rowstack and declare the x axis as a time/date value. That left me basically writing out the plot long-hand.

    columnstacked:

    set xtics ("midnight" 0, "1a" 1, ...)
    plot file u 3:key(1) notitle, '' u 4, ...
    

    rowstacked:

    plot file u 3:xtic(1) t "midnight", u 4 t "1a", ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a datafile that looks like this #index name1 name2 name3 1 2
I have a datafile that looks like this: 1 1.0 0 2 1.5 0
I have a data file that looks like the following example. I've added '%'
I have some VTK-files, which look like this: # vtk DataFile Version 1.0 Line
I have a large datafile in the following format below: ENST00000371026 WDR78,WDR78,WDR78, WD repeat
I have a huge datafile (~4GB) that I am passing through R (to do
I have successfully downloaded an sqlite datafile from my testing app on my provisioned
I have a situation where the only way to generate a certain datafile is
I have the following datafile: x y 1 50.583 2 27.842 3 19.156 4
We have a job which runs every morning in CruiseControl.net to import a datafile

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.