[gradsusr] How do I get a map to fill the entire output PNG?

Arlindo da Silva dasilva at alum.mit.edu
Fri Jun 6 23:48:13 EDT 2014


Chris,

Here is another not well known trick. If you are using opengrads
2.0.2.oga.1 or earlier (which includes gxyat), you can create a naked image
very simply with the -f option:

'd airx3std_006_te'
'gxyat -f -x 360 -y 180 out.png'

While on the screen you will see a labels, margins, etc, the image file
created this way contains only the inner part, with no margins or labels of
any kind, see attached.

Notice that gxyat/printim has been dropped for grads 2.1 because gxprint
provides similar functionality. However, I think gxprint does not yet
include the -f option.

     Arlindo






On Thu, Jun 5, 2014 at 6:15 PM, Lynnes, Christopher S. (GSFC-6102) <
christopher.s.lynnes at nasa.gov> wrote:

>  I'm trying to draw a map without decorations to a PNG file, and filling
> an entire area (so I can hand it off to a WMS server).  For a global
> 360x180 file, I am scripting:
> 'sdfopen
> timeAvg.AIRX3STD_006_Temperature_A.20120101-20120101.180W_90S_180E_90N.925hPa.nc
> '
> 'set mproj off'
> 'set gxout shaded'
> 'set frame off'
> 'set grid off'
> 'set mpdraw off'
> 'set xlab off'
> 'set ylab off'
> 'set grads off'
> 'd airx3std_006_te'
> 'printim out.png x360 y180'
> 'quit'
>
>  But it still leaves margins around the edges, even if I use the
> -geometry arg on the command line (-geometry 360x180+0+0).
>
>   --
> Dr. Christopher Lynnes     NASA/GSFC, Code 610.2    phone: 301-614-5185
> "Making the simple complicated is commonplace; making the complicated
> simple, awesomely simple, that's creativity." -- C. Mingus
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>


-- 
Arlindo da Silva
*dasilva at alum.mit.edu <dasilva at alum.mit.edu>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20140606/f111a722/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: out.png
Type: image/png
Size: 6631 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20140606/f111a722/attachment-0002.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.png
Type: image/png
Size: 128775 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20140606/f111a722/attachment-0003.png 


More information about the gradsusr mailing list