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

  • Home
  • SEARCH
  • 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 8773129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:12:59+00:00 2026-06-13T18:12:59+00:00

I’m plotting 2 data sets via gnuplot. Values of the first one are from

  • 0

I’m plotting 2 data sets via gnuplot. Values of the first one are from ~2 million to ~3 million. Values of the second are from 1000 to 2000.

After plotting from file and checking show variables all GPVAL_Y2_MIN is set to the correct value, but GPVAL_Y2_MAX is wrong. Its weird that GPVAL_Y_MAX is also wrong, however if plotting only the first set I get a relatively good value.

I’d like to set different ranges for yrange and y2range, but I cannot tell the possible values in advance. Of course I would like to fill the output screen as much as possible.

How could I do that?

EDIT: added currently used code

#!/usr/bin/gnuplot
reset
# Get max and min value
plot 'test.dat' every ::1 using 3, '' every ::1 using 4
y1_max = GPVAL_Y_MAX;
y1_min = GPVAL_Y_MIN;
y2_max = GPVAL_Y2_MAX;
y2_min = GPVAL_Y2_MIN;
set terminal png size 1024, 768 #output format png
set format y "%.1s %c"
# show png in a window without save
set output '| display png:-'
set yrange [y1_min:y1_max]
set y2range [y2_min:y2_max]
plot 'test.dat' every ::1 using 3 lt rgb '#FF00FF' title "vsize" with line, \
     '' every ::1 using 4 lt rgb '#FF0000' title "rss" with line axes x1y2

As you see, I’m plotting the data first to get min and max values and after that creating a terminal.

  • 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-13T18:13:00+00:00Added an answer on June 13, 2026 at 6:13 pm

    Without having a datafile to work with, my guess is that you’re problem lies in the fact that in your first pass (where you collect the min/max values), you’re plotting both data sets on the x1y1 axis. On your second pass, you plot column 4 on the x1y2 axis, but you never actually reset the y2 range from anything other than the default (which you hard-coded as opposed to autoscaling). In other words:

    plot 'test.dat' every ::1 using 3, '' every ::1 using 4 axes x1y2
    

    This brings up another question though — Why aren’t you just autoscaling?

    set yrange [*:*]
    set y2range [*:*]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I'm making a simple page using Google Maps API 3. My first. One marker
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am reading a book about Javascript and jQuery and using one of the
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I have a text area in my form which accepts all possible characters from
I'm trying to select an H1 element which is the second-child in its group
Does anyone know how can I replace this 2 symbol below from the string

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.