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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:51:52+00:00 2026-06-16T04:51:52+00:00

When running the following script, I get an error message: set terminal postscript enhanced

  • 0

When running the following script, I get an error message:

set terminal postscript enhanced color
set output '| ps2pdf - histogram_categorie.pdf'
set auto x
set key off
set yrange [0:20]
set style fill solid border -1
set boxwidth 5
unset border
unset ytic
set xtics nomirror
plot "categorie.dat" using 1:2 ti col with boxes

The error message that I get is

smeik:plots nvcleemp$ gnuplot categorie.gnuplot 

plot "categorie.dat" using 1:2 ti col with boxes
                                            ^
"categorie.gnuplot", line 13: x range is invalid

The content of the file categorie.dat is

categorie   aantal
poussin  13
pupil  9
miniem  15
cadet  15
junior  6
senior  5
veteraan  8

I understand that the problem is that I haven’t defined an x range. How can I make him use the first column as values for the x range? Or do I need to take the row numbers as x range and let him use the first column as labels? I’m using Gnuplot 4.4.

I’m ultimately trying to get a plot that looks the same as the plot I made before this one. That one worked fine, but had numerical data on the x axis.

set terminal postscript enhanced color
set output '| ps2pdf - histogram_geboorte.pdf'
set auto x
set key off
set yrange [0:40]
set xrange [1935:2005]
set style fill solid border -1
set boxwidth 5
unset border
unset ytic
set xtics nomirror
plot "geboorte.dat" using 1:2 ti col with boxes,\
     "geboorte.dat" using 1:($2+2):2 with labels

and the content of the file geboorte.dat is

decennium aantal
1940  2
1950  1
1960  3
1970  2
1980  3
1990  29
2000  30
  • 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-16T04:51:53+00:00Added an answer on June 16, 2026 at 4:51 am

    the boxes style expects that the x-values are numeric. That’s an easy one, we can give it the pseudo-column 0 which is essentially the script’s line number:

    plot "categorie.dat" using (column(0)):2 ti col with boxes
    

    Now you probably want the information in the first column on the plot somehow. I’ll assume you want those strings to become the x-tics:

    plot "categorie.dat" using (column(0)):2:xtic(1) ti col with boxes
    

    *careful here, this might not work with your current boxwidth settings. You might want to consider set boxwidth 1 or plot ... with (5*column(0)):2:xtic(1) ....

    EDIT — Taking your datafiles posted above, I’ve tested both of the above changes to get the boxwidth correct, and both seemed to work.

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

Sidebar

Related Questions

When running script commands like script/console I get the error message: no such file
Running the following line in my script gives me a Permission denied error: $config_out
I got the following error while running my perl script with the negative lookaround
I'm getting the 500 Internal Server Error by running the following script, even though
I am running Sphinx 0.9.9-release (r2117). I get the following error, when I run
I have the following script running successfully. However if I try to use a
Running my script through Devel::NYTProf showed that the following portion of code took up
I have the following line in a script I am running in the Run
I am running following code to create bmp image from pdf using Ghost4j i
I'm trying to figure out how to capture an error message for the following

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.