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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:37:51+00:00 2026-05-31T16:37:51+00:00

I’m having difficulty getting GNUplot to properly render some of my data. Basically I

  • 0

aliasing issue?

I’m having difficulty getting GNUplot to properly render some of my data. Basically I have some 2D heightmap data (for example 512 x 128 data points) and would like to be able to plot this in a “pixel perfect” fashion (i.e. one pixel per data point). Unfortunately at the moment, I’m getting artefacts (see inset) due to the number of pixels being slightly larger than the number of data points. I know I can set the total size of the output using:

set terminal png size 800,400

but is there a way to set just the plot area size in pixels?

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-05-31T16:37:52+00:00Added an answer on May 31, 2026 at 4:37 pm

    From the help of the lua/TikZ terminal (there is an option plotsize) it is suggested to remove the plot margins so that plot fills the whole canvas.

    set lmargin 0
    set rmargin 0
    set tmargin 0
    set bmargin 0
    set terminal png size 512,128
    set out 'out.png'
    # a checkerboard pattern to test the plot results for errors
    f(x,y)=( (x<=0) || (x>=63) || (y<=0) || (y>=63) ) ? 0.5 : ((x+y)%2==0)?0:1
    # the 'map' file contains only coordinates.
    plot[-1:63][0:64] 'map' u 1:2:(f($1,$2)) with image
    unset out
    

    However, this has the drawbacks that you will not have tic labels and so on. You can of course calculate values for the margins yourself, so that they match with the plot size in the end: use

    set lmargin at screen 0.25
    

    for example.

    Anyway, I would also recommend going for vector graphics whenever possible.

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

Sidebar

Related Questions

I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into

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.