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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:11:49+00:00 2026-06-05T13:11:49+00:00

I have a data file which I want to plot with gnuplot. However, for

  • 0

I have a data file which I want to plot with gnuplot. However, for the y-axes I want gnuplot to ignore all points below a certain value. Is there an easy way for doing this, especially that the data file is huge?

  • 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-05T13:11:51+00:00Added an answer on June 5, 2026 at 1:11 pm

    There are (at least) 2 ways without relying on an external tool.

    IGNORE_BELOW=50
    set yrange [IGNORE_BELOW:]  #ignore points below 50, but your yrange will start at 50.
    

    The second way is to use the gnuplot ternary operator in a using statement. Note that gnuplot silently ignores undefined values (1/0) when doing file IO.

    IGNORE_BELOW=50
    filter(x)=(x>=IGNORE_BELOW)?(x):(1/0)
    plot 'mydatafile.dat' u 1:(filter($2))
    

    This assumes you have a space separated datafile and you want to plot the first column on the x-axis and the second column on the y-axis (in typical gnuplot fashion).

    The first way is simplest, but it doesn’t allow you to trim off points that are in the range you want to plot. The second way is a little uglier, but is a lot more general, and can be used to make all sorts of input filters for gnuplot data.

    Of course, if your gnuplot supports pipes and you want to use an external tool to write a filter, you can do that too. Just have to tool accept the datafile as an input and write the modified data to stdout. Then in gnuplot:

    plot "< mytool.ext mydatafile" ...
    

    For this problem, awk would be a great tool.

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

Sidebar

Related Questions

I have a XML-file, which contains the data of a calendar. I want to
I have a xml file which I want to edit using automatic data binding
i have xml file which contains some details i want to pick some value
i have xml file which contains lots of data. now i want to pick
I want to save excel file which export data of grid view. I have
I have a data file which is comprised of rows of data, newline separated.
I have a file data.base which looks like: 1234 XXXX 4321 XXXX 9884 ZZZZ
I have a System.Data.DataTable which is populated by reading a CSV file which sets
I have .zip file which contain csv data. I am reading .zip file using
I have a text file which contains data seperated by '|'. I need to

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.