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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:53:29+00:00 2026-06-18T07:53:29+00:00

I have a file with scattered data (points located approximatelly on the vertices of

  • 0

I have a file with scattered data (points located approximatelly on the vertices of a regular grid): first two columns are the x and y coordinates, then a few more columns with other data that I need to plot. I want to obtain color maps that represent this data, and since points are scattered I’m using dgrid3d to generate a regular grid and have a smoother representation. My problem is that when I set dgrid3d, gnuplot ignores the x and y ranges and plot the grid outside the figure frame. Bellow is a minimal script to reproduce my problem:

set view map
set yrange [0.4:0.8]
set xrange [0.2:0.8]
set pm3d 
set style data lines
set dgrid3d 100,100,4
splot "./Terr.dat" using 1:2:(log($6)) pal

The result that I obtain is the following image:
enter image description here

Setting the option clip1in or clip4in of pm3d has no effect. If I unset view so that the result is a 3D surface, it also ignores the x and y ranges. I could easily write an script to pre-process the data and remove the points outside the range I want, but gnuplot should be able to manage this. Any idea?

I’m using gnuplot 4.2 patchlevel 6

Thanks!

  • 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-18T07:53:31+00:00Added an answer on June 18, 2026 at 7:53 am

    I’m not sure that I am able to reproduce your problem, but there are a few funny things with your script. I’m not exactly sure what the line set style data lines is supposed to do in this context as you’re plotting with pm3d. I created a simple datafile:

    0 1 4
    1 0 5
    0 0 2
    1 1 3
    

    And I plotted it using this script:

    set view map
    set yrange [0.4:0.8]
    set xrange [0.2:0.8]
    set dgrid3d 100,100,4
    splot 'test.dat' u 1:2:3 w pm3d
    

    And it seemed to "work" (I’m using gnuplot 4.6.0).

    Simple image

    There are a few things of note however — Notice that every point in my original domain was out of the given x and y ranges. Gnuplot still used those points when constructing the surface. This is also demonstrates reasonably nicely what the gnuplot weighting function looks like (although we could do even better by using only 1 point in our data file.)


    UPDATE

    Between my 2 computers, I have access to gnuplot4.2.6, gnuplot4.3.0, gnuplot4.4.2, gnuplot4.6.0, gnuplot4.6.1 and gnuplot4.7.0. gnuplot4.2.6 is the only version which exhibits the behavior you describe. It looks to me like they changed the behavior of pm3d in the 4.3 CVS branch, but didn’t push those changes back into gnuplot4.2. The easy fix is to upgrade to gnuplot4.6 — I’ve been using it as my default gnuplot for a few months now and it seems to be pretty stable.

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

Sidebar

Related Questions

I have a table that has two columns both of them are continuous data.
I have a data file that consists of several data points, that i would
I've got a file with 200 or so GUID's scattered throughout that have had
I am performing a scattered read of 8-bit data from a file (De-Interleaving a
Let's say I have data I'd like to be plotted in a file animals.txt:
I have a gnuplot data file: Requested_width,Requested_depth,Requested_word,Name,N,M,Cycle_time,Clk2Q,Area,Total_Area 24,512,24,R1F512X24M8P24,1,1,1.9820,,7446.102,7446 24,512,24,R1F512X24M4P24,1,1,1.9937,,6757.0596,6757 .... I want to scatter
I have a data file that looks like this: x ys ---------------------> 1 20
I have a csv file that has 2 columns separated by a comma -
I have a text file with code snippets scattered here and there. Is there
I have a data file which looks roughly like this # X Y Value

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.