Hello,

I have a problem with the command "convert grid to image". I have read the manual and the examples and even used the trial-error method, but I still have problems to understand how GRI transforms the data. I am using version 2.12.10 under Windows XP. I am trying to represent a simple gridded data like this

7.3891 1.3891 7.3891 7.3891

2 1 1 1

but all the values above 2 are not in the final image (they are masked according to the output).

Can anybody help me to understand how the data is transformed by GRI? To plot the data I use the GRI file below. What is wrong with it?

Thank you in advance for your help,

Juan.

###########################

#

\file = "ScaledFields.out"

open \file

#

.nx. = 4

.ny. = 2

#

# Computes dimensions and some constants.

#

.xLength. = {rpn .nx. 0.1 *}

.yLength. = {rpn .ny. 0.1 *}

.xMinGrid. = {rpn .xLength. .nx. / 2 /} #Lx/(2Nx)

.xMaxGrid. = {rpn .xLength. .xMinGrid. -}

#Lx-Lx/(2Nx)

.yMinGrid. = {rpn .yLength. .ny. / 2 /} #Ly/(2Ny)

.yMaxGrid. = {rpn .yLength. .yMinGrid. -}

#Ly-Ly/(2Ny)

.xAxisInc. = {rpn .xLength. .nx. / 1 *}

.yAxisInc. = {rpn .yLength. .ny. / 1 *}

.imgMin. = 0

.imgMax. = 10

.imgInc. = 1

.palDelta. = {rpn .imgMax. .imgMin. - 100 / }

.palMin. = {rpn .imgMin. .palDelta. -}

.palMax. = {rpn .imgMax. .palDelta. +}

.palInc. = {rpn .imgMax. .imgMin. - 10 / }

#

# Builds the grid

#

set x grid .xMinGrid. .xMaxGrid. /.nx.

set y grid .yMinGrid. .yMaxGrid. /.ny.

#

read grid data .ny. .nx.

#

# Axis definition

#

set x name "X"

set y name "Y"

set x axis 0 .xLength. .xAxisInc.

set y axis 0 .yLength. .yAxisInc.

#

# Image range and scale.

#

set image range .imgMin. .imgMax.

set image grayscale black .imgMin. white .imgMax. increment .imgInc.

#

# Grid to image conversion

# To avoid interpolation, the size of the

# image is equal to the grid.

#

convert grid to image size .nx. .ny.

show image

#

draw image

draw axes

draw title "Sacled Field"

draw image palette left .palMin. right .palMax. increment .palInc.

#

# End

#

quit

#

###########################