diff options
author | Xu Yuan <xu@informatik.hu-berlin.de> | 2011-10-02 01:53:44 +0200 |
---|---|---|
committer | Xu Yuan <xu@informatik.hu-berlin.de> | 2011-10-02 01:53:44 +0200 |
commit | f3193e298365ffc0e9a9170f27973118d22f1e57 (patch) | |
tree | b8786a5961efd04350926e30da282c994571b008 /dev | |
parent | d0c5777e228fe74a807586c1f6640d7cfcda98c4 (diff) | |
download | pgf-pie-f3193e298365ffc0e9a9170f27973118d22f1e57.tar.gz pgf-pie-f3193e298365ffc0e9a9170f27973118d22f1e57.tar.bz2 pgf-pie-f3193e298365ffc0e9a9170f27973118d22f1e57.zip |
make sure the area is comparable in polar area diagram
Diffstat (limited to 'dev')
-rw-r--r-- | dev/demo/polar.svg | 42 | ||||
-rw-r--r-- | dev/logo.png | bin | 8210 -> 9181 bytes | |||
-rw-r--r-- | dev/pgf-pie.sty | 5 |
3 files changed, 24 insertions, 23 deletions
diff --git a/dev/demo/polar.svg b/dev/demo/polar.svg index bec99c3..a4442a0 100644 --- a/dev/demo/polar.svg +++ b/dev/demo/polar.svg @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="150.61pt" height="130.844pt" viewBox="0 0 150.61 130.844" version="1.1"> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="160.48pt" height="146.966pt" viewBox="0 0 160.48 146.966" version="1.1"> <defs> <g> <symbol overflow="visible" id="glyph0-0"> @@ -35,41 +35,41 @@ </g> </defs> <g id="surface1"> -<path style="fill-rule:nonzero;fill:rgb(39.99939%,39.99939%,100%);fill-opacity:1;stroke-width:0.79701;stroke-linecap:butt;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 0.00078125 -0.00015625 L 21.258594 -0.00015625 C 21.258594 11.742031 11.742969 21.257656 0.00078125 21.257656 Z M 0.00078125 -0.00015625 " transform="matrix(1,0,0,-1,64.675,44.91)"/> +<path style="fill-rule:nonzero;fill:rgb(39.99939%,39.99939%,100%);fill-opacity:1;stroke-width:0.79701;stroke-linecap:butt;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M -0.00003125 0.00165625 L 42.5195 0.00165625 C 42.5195 23.482125 23.484344 42.521187 -0.00003125 42.521187 Z M -0.00003125 0.00165625 " transform="matrix(1,0,0,-1,74.543,61.029)"/> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> - <use xlink:href="#glyph0-0" x="83.925" y="25.66"/> + <use xlink:href="#glyph0-0" x="108.826" y="26.747"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> - <use xlink:href="#glyph0-1" x="64.289" y="39.623"/> - <use xlink:href="#glyph0-2" x="69.2703" y="39.623"/> - <use xlink:href="#glyph0-3" x="74.2516" y="39.623"/> + <use xlink:href="#glyph0-1" x="82.904" y="46.996"/> + <use xlink:href="#glyph0-2" x="87.8853" y="46.996"/> + <use xlink:href="#glyph0-3" x="92.8666" y="46.996"/> </g> -<path style="fill-rule:nonzero;fill:rgb(40.000916%,80.703735%,96.237183%);fill-opacity:1;stroke-width:0.79701;stroke-linecap:butt;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 0.00078125 -0.00015625 L 0.00078125 42.519375 C -23.483594 42.519375 -42.51875 23.484219 -42.51875 -0.00015625 Z M 0.00078125 -0.00015625 " transform="matrix(1,0,0,-1,64.675,44.91)"/> +<path style="fill-rule:nonzero;fill:rgb(40.000916%,80.703735%,96.237183%);fill-opacity:1;stroke-width:0.79701;stroke-linecap:butt;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M -0.00003125 0.00165625 L -0.00003125 60.130562 C -33.210969 60.130562 -60.132844 33.208687 -60.132844 0.00165625 Z M -0.00003125 0.00165625 " transform="matrix(1,0,0,-1,74.543,61.029)"/> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> - <use xlink:href="#glyph0-4" x="23.337" y="10.628"/> + <use xlink:href="#glyph0-4" x="20.75" y="14.293"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> - <use xlink:href="#glyph0-5" x="38.05" y="30.876"/> - <use xlink:href="#glyph0-2" x="43.0313" y="30.876"/> - <use xlink:href="#glyph0-3" x="48.0126" y="30.876"/> + <use xlink:href="#glyph0-5" x="40.672" y="39.75"/> + <use xlink:href="#glyph0-2" x="45.6533" y="39.75"/> + <use xlink:href="#glyph0-3" x="50.6346" y="39.75"/> </g> -<path style="fill-rule:nonzero;fill:rgb(100%,96.939087%,40.000916%);fill-opacity:1;stroke-width:0.79701;stroke-linecap:butt;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 0.00078125 -0.00015625 L -63.776562 -0.00015625 C -63.776562 -35.222813 -35.225781 -63.7775 0.00078125 -63.7775 Z M 0.00078125 -0.00015625 " transform="matrix(1,0,0,-1,64.675,44.91)"/> +<path style="fill-rule:nonzero;fill:rgb(100%,96.939087%,40.000916%);fill-opacity:1;stroke-width:0.79701;stroke-linecap:butt;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M -0.00003125 0.00165625 L -73.644563 0.00165625 C -73.644563 -40.674125 -40.675813 -73.646781 -0.00003125 -73.646781 Z M -0.00003125 0.00165625 " transform="matrix(1,0,0,-1,74.543,61.029)"/> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> - <use xlink:href="#glyph0-6" x="8.166" y="101.032"/> + <use xlink:href="#glyph0-6" x="11.056" y="124.129"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> - <use xlink:href="#glyph0-7" x="29.304" y="74.608"/> - <use xlink:href="#glyph0-2" x="34.2853" y="74.608"/> - <use xlink:href="#glyph0-3" x="39.2666" y="74.608"/> + <use xlink:href="#glyph0-7" x="35.112" y="94.787"/> + <use xlink:href="#glyph0-2" x="40.0933" y="94.787"/> + <use xlink:href="#glyph0-3" x="45.0746" y="94.787"/> </g> -<path style="fill-rule:nonzero;fill:rgb(100%,69.999695%,39.99939%);fill-opacity:1;stroke-width:0.79701;stroke-linecap:butt;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 0.00078125 -0.00015625 L 0.00078125 -85.035313 C 46.965625 -85.035313 85.035938 -46.965 85.035938 -0.00015625 Z M 0.00078125 -0.00015625 " transform="matrix(1,0,0,-1,64.675,44.91)"/> +<path style="fill-rule:nonzero;fill:rgb(100%,69.999695%,39.99939%);fill-opacity:1;stroke-width:0.79701;stroke-linecap:butt;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M -0.00003125 0.00165625 L -0.00003125 -85.037406 C 46.964812 -85.037406 85.039031 -46.967094 85.039031 0.00165625 Z M -0.00003125 0.00165625 " transform="matrix(1,0,0,-1,74.543,61.029)"/> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> - <use xlink:href="#glyph0-8" x="129.022" y="116.064"/> + <use xlink:href="#glyph0-8" x="138.891" y="132.185"/> </g> <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> - <use xlink:href="#glyph0-9" x="90.528" y="83.354"/> - <use xlink:href="#glyph0-2" x="95.5093" y="83.354"/> - <use xlink:href="#glyph0-3" x="100.4906" y="83.354"/> + <use xlink:href="#glyph0-9" x="100.397" y="99.474"/> + <use xlink:href="#glyph0-2" x="105.3783" y="99.474"/> + <use xlink:href="#glyph0-3" x="110.3596" y="99.474"/> </g> </g> </svg> diff --git a/dev/logo.png b/dev/logo.png Binary files differindex 767cb66..68959bc 100644 --- a/dev/logo.png +++ b/dev/logo.png diff --git a/dev/pgf-pie.sty b/dev/pgf-pie.sty index 7407f90..c9fe681 100644 --- a/dev/pgf-pie.sty +++ b/dev/pgf-pie.sty @@ -164,7 +164,7 @@ chart by using PGF/Tikz package.] } \pgfmathparse{\sum / \value{pgfpie@sliceLength}} \xdef\polarangle{\pgfmathresult} - \pgfmathparse{\radius / \maxValue} + \pgfmathparse{\radius / sqrt(\maxValue)} \xdef\polarRadiusUnit{\pgfmathresult} \else \xdef\theradius{\radius} @@ -177,7 +177,8 @@ chart by using PGF/Tikz package.] \ifpolar % Polar area diagram \addtocounter{pgfpie@angleEnd}{\polarangle} - \xdef\theradius{\p*\polarRadiusUnit} + \pgfmathparse{sqrt(\p) * \polarRadiusUnit} + \xdef\theradius{\pgfmathresult} \else % normal pie \addtocounter{pgfpie@angleEnd}{\p} |