Colleagues,
I'm trying to follow Friedrich Huebler advice on generating PNG graphics with use of the GhostScript. I have the modest code (below), which generates the attached picture. The generated graph appears to have very wide white margins. I reckon that this may be mostly the question of GhostScript settings, nevertheless I decided to ask the question here as I would expect that some of you implemented Heubler's advice and work out the required GhostScript settings.
I'm trying to follow Friedrich Huebler advice on generating PNG graphics with use of the GhostScript. I have the modest code (below), which generates the attached picture. The generated graph appears to have very wide white margins. I reckon that this may be mostly the question of GhostScript settings, nevertheless I decided to ask the question here as I would expect that some of you implemented Heubler's advice and work out the required GhostScript settings.
Code:
/* == AntiAliasing Example == */
// Load some data
sysuse tsline2, clear
tsset day
// Set options for PostScript export
graph set ps pagesize custom
graph set ps pagewidth 5
graph set ps pageheight 4
graph set ps tmargin 0
graph set ps lmargin 0
graph set ps logo off
graph set ps fontface Helvetica
// Draw graph and export to PostScript file
tsline calories, ttick(28nov2002 25dec2002, tpos(in)) ///
ttext(3470 28nov2002 "thanks" 3470 25dec2002 "x-mas", orient(vert))
graph export "line.ps", replace
// Convert PostScript file to PNG format
#delimit ;
shell "C:\gs9.15\bin\gswin64c.exe"
-dSAFER -dBATCH -dNOPAUSE
-r100 -g500x400 -sDEVICE=png16m
-dGraphicsAlphaBits=4 -dTextAlphaBits=4
-sOutputFile="line.png" "line.ps";
Comment