image - gnuplot add scale and offset to xtics? -


i'm plotting 600px*600px image in gnuplot, , have xtics correspond different coordinate system pixel system. is, xtics go 0, 100, 200, ..., 500, 600. make them @ same place, have different values. there way make tics uniformly modified, like, xtic[i] = (xtic[i]*c1) + c2?

edit: here's code. also, should clarify i'm trying have xtics , ytics correspond longitude , latitude specifically. instance, add in transformation such xtic=0 -> xtic=$minlat, , xtic=$maxx -> xtic=$maxlat.

#!/bin/sh                                                                                 inputfilename=$1 outputfilename=$2 minlat=$3 maxlat=$4 minlon=$5 maxlon=$6 imagexsize=$7 imageysize=$8 maxx=$(($imagexsize - 1)) maxy=$(($imageysize - 1))  windowxsize=$(($imagexsize+5+5)) windowysize=$(($imageysize+5+5))  imagename=${inputfilename%.*}  gnuplot <<eof                                                                             set terminal png size $windowxsize,$windowysize                                          unset key                                                                                unset colorbox                                                                           set output "$outputfilename"                                                             set lmargin 5                                                                            set bmargin 5                                                                            set rmargin 5                                                                            set tmargin 5                                                                            set size square                                                                          set xrange [0:${maxx}]                                                                   set yrange [0:${maxy}]                                                                   set palette grey                                                                         set label "$imagename" @ screen 0.3,0.95                   plot "$inputfilename" binary array=${imagexsize}x${imageysize} format='%ushort' image                                                                                       eof  

you can accomplish quite adding 'using' argument 'plot' command.

here's example added offset of 10 & scale of 0.5:

plot '-' using (($1+10)/2):(($2+10)/2) linespoints 1 2 3 4 5 6 e 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -