LoginSignup
2
2

More than 5 years have passed since last update.

円グラフを手書きPostScriptで(その2)

Last updated at Posted at 2014-07-26

塗りを手書きで。これで十分間に合うかも。

piechart_fill.eps
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 0 0 112 112

% グラフの位置
56 56 translate
90 rotate

% 円グラフのひとかけらを描く手続き
/piece {
    /gray exch def
    total div 360 mul neg /angle exch def
    newpath
    0 0 moveto
    0 0 54 angle 0 arc
    closepath
    gsave
    gray setgray fill
    grestore
    .3 setlinewidth
    stroke
    angle rotate
} def

% 度数とグレー濃度を指定して、グラフを描く手続き
/total 106 def
18 .8 piece
21 .6 piece
41 .9 piece
15 .4 piece
11 1 piece
showpage
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2