| 1 |
% Copyright 2018 by Till Tantau |
| 2 |
% |
| 3 |
% This file may be distributed and/or modified |
| 4 |
% |
| 5 |
% 1. under the LaTeX Project Public License and/or |
| 6 |
% 2. under the GNU Public License. |
| 7 |
% |
| 8 |
% See the file doc/generic/pgf/licenses/LICENSE for more details. |
| 9 |
|
| 10 |
\ProvidesFileRCS{tikzlibrarydatavisualization.polar.code.tex} |
| 11 |
|
| 12 |
\usetikzlibrary{datavisualization}% |
| 13 |
\usepgflibrary{datavisualization.polar}% |
| 14 |
|
| 15 |
|
| 16 |
\tikzdatavisualizationset{% |
| 17 |
new polar axes/.style 2 args={ |
| 18 |
new axis base=#1, |
| 19 |
#1={attribute=angle}, |
| 20 |
new axis base=#2, |
| 21 |
#2={attribute=radius}, |
| 22 |
#2/scaling/default=0 at 0 and 1 at 1cm, |
| 23 |
new object={ |
| 24 |
store=/tikz/data visualization/#1/polar transformer, |
| 25 |
class=polar transformer, |
| 26 |
arg1/.expanded=\pgfkeysvalueof{/tikz/data visualization/angle axis/attribute}/scaled, |
| 27 |
arg2/.expanded=\pgfkeysvalueof{/tikz/data visualization/radius axis/attribute}/scaled, |
| 28 |
arg3 from key=/tikz/data visualization/#1/unit vector 0 degrees, |
| 29 |
arg4 from key=/tikz/data visualization/#1/unit vector 90 degrees |
| 30 |
}, |
| 31 |
/tikz/data visualization/#1/unit vector 0 degrees/.initial=\pgfqpoint{1pt}{0pt}, |
| 32 |
/tikz/data visualization/#1/unit vector 90 degrees/.initial=\pgfqpoint{0pt}{1pt}, |
| 33 |
}, |
| 34 |
new polar axes/.default={angle axis}{radius axis} |
| 35 |
}% |
| 36 |
\def\tikz@lib@dv@polar@a#1{ |
| 37 |
\pgfkeyssetvalue{\tikz@dv@axis/unit vector 0 degrees}{#1} |
| 38 |
}% |
| 39 |
\def\tikz@lib@dv@polar@b#1{ |
| 40 |
\pgfkeyssetvalue{\tikz@dv@axis/unit vector 90 degrees}{#1} |
| 41 |
}% |
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
% |
| 46 |
% Scientific polar axes |
| 47 |
% |
| 48 |
|
| 49 |
\tikzset{ |
| 50 |
/tikz/data visualization/axis options/.cd, |
| 51 |
unit vectors/.code 2 args={ |
| 52 |
\tikz@scan@one@point\tikz@lib@dv@polar@a#1 |
| 53 |
\tikz@scan@one@point\tikz@lib@dv@polar@b#2 |
| 54 |
}, |
| 55 |
degrees/.style={\tikz@dv@axis/scaling=0 at 0 and 1 at 1}, |
| 56 |
radians/.style={\tikz@dv@axis/scaling=0 at 0 and 0.03141592653589793 at 1.8}, |
| 57 |
}% |
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
\tikzdatavisualizationset{ |
| 62 |
new axis system={scientific polar axes}{% |
| 63 |
new polar axes, |
| 64 |
angle axis={attribute=angle}, |
| 65 |
radius axis={attribute=radius}, |
| 66 |
every axis/.append style={style={draw=black!50}}, |
| 67 |
every ticks/.append style={style={draw=black!50}}, |
| 68 |
}{% |
| 69 |
0 to 360,% |
| 70 |
outer ticks, |
| 71 |
}{% |
| 72 |
@make axes, |
| 73 |
scientific polar axes/@setup axes, |
| 74 |
/utils/exec={ |
| 75 |
\edef\pgf@marshal{\noexpand\tikzdatavisualizationset{\pgfkeysvalueof{/tikz/data visualization/@which visualize radius axis}/.list={\pgfkeysvalueof{/tikz/data visualization/\pgfkeysvalueof{/tikz/data visualization/@which radius axes at}}}}} |
| 76 |
\pgf@marshal |
| 77 |
}, |
| 78 |
@make labels |
| 79 |
}, |
| 80 |
@which radius axes at/.initial=@inner radius axes at, |
| 81 |
@which visualize radius axis/.initial=@visualize radius axis, |
| 82 |
@inner radius axes at/.initial=, |
| 83 |
@clean radius axes at/.initial=, |
| 84 |
@visualize radius axis/.style 2 args={ |
| 85 |
radius axis={ |
| 86 |
visualize axis={angle axis={goto=#1},high=padded max,low=0}, |
| 87 |
visualize ticks={ |
| 88 |
common={angle axis={goto=#1}, direction axis=angle axis}, |
| 89 |
major={tick text at #2, |
| 90 |
options at=0 as [{style={draw=none},no tick text}] |
| 91 |
} |
| 92 |
} |
| 93 |
} |
| 94 |
}, |
| 95 |
@visualize clean radius axis/.style n args={5}{ |
| 96 |
radius axis={ |
| 97 |
visualize axis={angle |
| 98 |
axis={goto=#1},high=max,low=0,style={black!25,line cap=rect}}, |
| 99 |
visualize axis={angle |
| 100 |
axis={goto=#1},high=max,low=0,style={line cap=rect,#4}}, |
| 101 |
visualize ticks={ |
| 102 |
style={#4}, |
| 103 |
common={angle axis={goto=#1}, direction axis=angle axis, #3=0}, |
| 104 |
major={tick text at #2,#5} |
| 105 |
} |
| 106 |
} |
| 107 |
}, |
| 108 |
@visualize zero/.style={@inner visualize zero={#1}}, |
| 109 |
@clean visualize zero/.style={}, |
| 110 |
@inner visualize zero/.style={ |
| 111 |
radius axis={ |
| 112 |
visualize ticks={ |
| 113 |
common={angle axis={goto=0}, direction axis=angle axis}, |
| 114 |
major={tick text at low,low=0,high=0,at=0 as |
| 115 |
[{style={draw=none},node style={anchor=#1}}] |
| 116 |
} |
| 117 |
} |
| 118 |
} |
| 119 |
}, |
| 120 |
@degrees/.style={ |
| 121 |
angle axis={degrees, ticks={step=15, tick suffix=$^\circ$, major={ |
| 122 |
options at=360 as [{style={draw=none},no tick text}], |
| 123 |
options at=-180 as [{style={draw=none},no tick text}]}}} |
| 124 |
}, |
| 125 |
@rad/.style={ |
| 126 |
angle axis={radians, ticks={ |
| 127 |
step=(pi/12), |
| 128 |
node style={ |
| 129 |
/pgf/number format/frac, |
| 130 |
/pgf/number format/frac shift={1} |
| 131 |
}, |
| 132 |
tick typesetter/.code={% |
| 133 |
\pgfmathsetmacro{\tikz@lib@dv@pol}{round(####1*3.819718634205488)/12}% |
| 134 |
\pgfmathapproxequalto{\tikz@lib@dv@pol}{0}% |
| 135 |
\ifdim\pgfmathresult pt=1.0pt% |
| 136 |
$0$% |
| 137 |
\else% |
| 138 |
\pgfmathapproxequalto{\tikz@lib@dv@pol}{1}% |
| 139 |
\ifdim\pgfmathresult pt=1.0pt% |
| 140 |
$\pi$% |
| 141 |
\else |
| 142 |
\pgfmathapproxequalto{\tikz@lib@dv@pol}{-1}% |
| 143 |
\ifdim\pgfmathresult pt=1.0pt% |
| 144 |
$-\pi$% |
| 145 |
\else% |
| 146 |
\pgfmathprintnumber{\tikz@lib@dv@pol}$\pi$% |
| 147 |
\fi% |
| 148 |
\fi% |
| 149 |
\fi% |
| 150 |
}, |
| 151 |
major={ |
| 152 |
options at=6.2831985e0 as [{style={draw=none},no tick text}], |
| 153 |
options at=6.2831192e0 as [{style={draw=none},no tick text}], |
| 154 |
options at=6.2830794e0 as [{style={draw=none},no tick text}], |
| 155 |
options at=6.2828787e0 as [{style={draw=none},no tick text}], |
| 156 |
options at=6.2831598e0 as [{style={draw=none},no tick text}], |
| 157 |
options at=-3.1415991e0 as [{style={draw=none},no tick text}], |
| 158 |
options at=-3.1415802e0 as [{style={draw=none},no tick text}], |
| 159 |
options at=-3.1415602e0 as [{style={draw=none},no tick text}], |
| 160 |
options at=-3.14153961e0 as [{style={draw=none},no tick text}], |
| 161 |
options at=-3.1414406e0 as [{style={draw=none},no tick text}], |
| 162 |
} |
| 163 |
} |
| 164 |
} |
| 165 |
}, |
| 166 |
@make labels/.style={}, |
| 167 |
}% |
| 168 |
|
| 169 |
\tikzdatavisualizationset{ |
| 170 |
scientific polar axes/.cd, |
| 171 |
% |
| 172 |
% |
| 173 |
% |
| 174 |
outer ticks/.style={ |
| 175 |
/tikz/data visualization/@make axes/.style={ |
| 176 |
radius axis={ |
| 177 |
min value=0, |
| 178 |
length=\pgfkeysvalueof{/tikz/data visualization/scientific polar axes/radius}, |
| 179 |
padding=0em, |
| 180 |
ticks={few}, |
| 181 |
visualize grid={common={direction axis=angle axis,low=min,high=max}}, |
| 182 |
}, |
| 183 |
angle axis={ |
| 184 |
visualize axis={radius axis={goto=padded max},low=min,high=max}, |
| 185 |
visualize ticks={common={radius axis={goto=padded max},direction |
| 186 |
axis=radius axis},common={low=0},major={tick text at high}}, |
| 187 |
visualize grid={common={direction axis=radius axis},low=0,high=padded max}, |
| 188 |
} |
| 189 |
}, |
| 190 |
/tikz/data visualization/@which radius axes at=@inner radius axes at, |
| 191 |
/tikz/data visualization/@which visualize radius axis=@visualize radius axis, |
| 192 |
/tikz/data visualization/@visualize zero/.style={@inner visualize zero={##1}}, |
| 193 |
}, |
| 194 |
inner ticks/.style={ |
| 195 |
/tikz/data visualization/@make axes/.style={ |
| 196 |
radius axis={ |
| 197 |
min value=0, |
| 198 |
length=\pgfkeysvalueof{/tikz/data visualization/scientific polar axes/radius}, |
| 199 |
padding=0em, |
| 200 |
ticks={few}, |
| 201 |
visualize grid={common={direction axis=angle axis,low=min,high=max}}, |
| 202 |
}, |
| 203 |
angle axis={ |
| 204 |
visualize axis={radius axis={goto=padded max},low=min,high=max}, |
| 205 |
visualize ticks={common={radius axis={goto=padded max},direction |
| 206 |
axis=radius axis},common={high=0},major={tick text at high}}, |
| 207 |
visualize grid={common={direction axis=radius axis},low=0,high=padded max}, |
| 208 |
} |
| 209 |
}, |
| 210 |
/tikz/data visualization/@which radius axes at=@inner radius axes at, |
| 211 |
/tikz/data visualization/@which visualize radius axis=@visualize radius axis, |
| 212 |
/tikz/data visualization/@visualize zero/.style={@inner visualize zero={##1}}, |
| 213 |
}, |
| 214 |
clean/.style={ |
| 215 |
/tikz/data visualization/@make axes/.style={ |
| 216 |
radius axis={ |
| 217 |
min value=0, |
| 218 |
length=\pgfkeysvalueof{/tikz/data visualization/scientific polar axes/radius}, |
| 219 |
padding=.5em, |
| 220 |
ticks={few}, |
| 221 |
visualize grid={common={direction axis=angle axis,low=min,high=max}}, |
| 222 |
}, |
| 223 |
angle axis={ |
| 224 |
padding=.5em, |
| 225 |
visualize axis={radius axis={goto=max}, style={black!25, line cap=rect},low=min,high=max}, |
| 226 |
visualize axis={radius axis={goto=padded max}, style={line cap=rect}, low=min,high=max}, |
| 227 |
visualize ticks={common={radius axis={goto=padded max}, direction axis=radius axis},common={low=0},major={tick text at high}}, |
| 228 |
visualize grid={common={direction axis=radius axis},low=0,high=max}, |
| 229 |
} |
| 230 |
}, |
| 231 |
/tikz/data visualization/@which radius axes at=@clean radius axes at, |
| 232 |
/tikz/data visualization/@which visualize radius axis=@visualize clean radius axis, |
| 233 |
/tikz/data visualization/@visualize zero/.style={@clean visualize zero={##1}}, |
| 234 |
}, |
| 235 |
radius/.initial=3.25cm, |
| 236 |
% |
| 237 |
% First quadrant |
| 238 |
% |
| 239 |
0 to pi half/.style={ |
| 240 |
@setup axes/.style={ |
| 241 |
angle axis={min value=0, max value=1.570796326794897}, |
| 242 |
@rad, |
| 243 |
@visualize zero=north east, |
| 244 |
@inner radius axes at={{0}{low},{1.570796326794897}{high}}, |
| 245 |
@clean radius axes at={% |
| 246 |
{0}{low}{high}{yshift=\pgfkeysvalueof{/tikz/data visualization/angle axis/padding min}}{},% |
| 247 |
{1.570796326794897}{high}{low}{xshift=-\pgfkeysvalueof{/tikz/data visualization/angle axis/padding max}}{} |
| 248 |
} |
| 249 |
} |
| 250 |
}, |
| 251 |
0 to 90/.style={ |
| 252 |
@setup axes/.style={ |
| 253 |
angle axis={min value=0, max value=90}, |
| 254 |
@degrees, |
| 255 |
@visualize zero=north east, |
| 256 |
@inner radius axes at={{0}{low},{90}{high}}, |
| 257 |
@clean radius axes at={% |
| 258 |
{0}{low}{high}{yshift=\pgfkeysvalueof{/tikz/data visualization/angle axis/padding min}}{},% |
| 259 |
{90}{high}{low}{xshift=-\pgfkeysvalueof{/tikz/data visualization/angle axis/padding max}}{} |
| 260 |
} |
| 261 |
} |
| 262 |
}, |
| 263 |
quadrant/.style={ |
| 264 |
@setup axes/.style={ |
| 265 |
angle axis={scaling=min at 0 and max at 90, ticks}, |
| 266 |
@visualize zero=north east, |
| 267 |
@inner radius axes at={{min}{low},{max}{high}}, |
| 268 |
@clean radius axes at={% |
| 269 |
{min}{low}{high}{yshift=\pgfkeysvalueof{/tikz/data visualization/angle axis/padding min}}{},% |
| 270 |
{max}{high}{low}{xshift=-\pgfkeysvalueof{/tikz/data visualization/angle axis/padding max}}{} |
| 271 |
} |
| 272 |
} |
| 273 |
}, |
| 274 |
quadrant clockwise/.style={ |
| 275 |
@setup axes/.style={ |
| 276 |
angle axis={scaling=min at 90 and max at 0, ticks}, |
| 277 |
@visualize zero=north east, |
| 278 |
@inner radius axes at={{min}{low},{max}{high}}, |
| 279 |
@clean radius axes at={% |
| 280 |
{max}{high}{low}{yshift=\pgfkeysvalueof{/tikz/data visualization/angle axis/padding min}}{},% |
| 281 |
{min}{low}{high}{xshift=-\pgfkeysvalueof{/tikz/data visualization/angle axis/padding max}}{} |
| 282 |
} |
| 283 |
} |
| 284 |
}, |
| 285 |
% |
| 286 |
% Fourth quadrant |
| 287 |
% |
| 288 |
-pi half to 0/.style={ |
| 289 |
@setup axes/.style={ |
| 290 |
angle axis={min value=-1.570796326794897, max value=0}, |
| 291 |
@rad, |
| 292 |
@visualize zero=south east, |
| 293 |
@inner radius axes at={{-1.570796326794897}{low},{0}{high}}, |
| 294 |
@clean radius axes at={% |
| 295 |
{-1.570796326794897}{low}{high}{xshift=\pgfkeysvalueof{/tikz/data visualization/angle axis/padding min}}{},% |
| 296 |
{0}{high}{low}{yshift=\pgfkeysvalueof{/tikz/data visualization/angle axis/padding max}}{} |
| 297 |
} |
| 298 |
} |
| 299 |
}, |
| 300 |
-90 to 0/.style={ |
| 301 |
@setup axes/.style={ |
| 302 |
angle axis={min value=-90, max value=0}, |
| 303 |
@degrees, |
| 304 |
@visualize zero=south east, |
| 305 |
@inner radius axes at={{-90}{low},{0}{high}}, |
| 306 |
@clean radius axes at={% |
| 307 |
{-90}{low}{high}{xshift=\pgfkeysvalueof{/tikz/data visualization/angle axis/padding min}}{},% |
| 308 |
{0}{high}{low}{yshift=\pgfkeysvalueof{/tikz/data visualization/angle axis/padding max}}{} |
| 309 |
} |
| 310 |
} |
| 311 |
}, |
| 312 |
fourth quadrant/.style={ |
| 313 |
@setup axes/.style={ |
| 314 |
angle axis={scaling=min at -90 and max at 0, ticks}, |
| 315 |
@visualize zero=south east, |
| 316 |
@inner radius axes at={{min}{low},{max}{high}}, |
| 317 |
@clean radius axes at={% |
| 318 |
{min}{low}{high}{xshift=\pgfkeysvalueof{/tikz/data visualization/angle axis/padding min}}{},% |
| 319 |
{max}{high}{low}{yshift=\pgfkeysvalueof{/tikz/data visualization/angle axis/padding max}}{} |
| 320 |
} |
| 321 |
} |
| 322 |
}, |
| 323 |
fourth quadrant clockwise/.style={ |
| 324 |
@setup axes/.style={ |
| 325 |
angle axis={scaling=min at 0 and max at -90, ticks}, |
| 326 |
@visualize zero=south east, |
| 327 |
@inner radius axes at={{min}{low},{max}{high}}, |
| 328 |
@clean radius axes at={% |
| 329 |
{max}{high}{low}{xshift=\pgfkeysvalueof{/tikz/data visualization/angle axis/padding min}}{},% |
| 330 |
{min}{low}{high}{yshift=\pgfkeysvalueof{/tikz/data visualization/angle axis/padding max}}{} |
| 331 |
} |
| 332 |
} |
| 333 |
}, |
| 334 |
% |
| 335 |
% Upper half |
| 336 |
% |
| 337 |
0 to pi/.style={ |
| 338 |
@setup axes/.style={ |
| 339 |
angle axis={min value=0, max value=3.141592653589793}, |
| 340 |
@rad, |
| 341 |
@visualize zero=north, |
| 342 |
@inner radius axes at={{0}{low},{1.570796326794897}{high},{3.141592653589793}{high}}, |
| 343 |
@clean radius axes at={% |
| 344 |
{0}{low}{high}{yshift=\pgfkeysvalueof{/tikz/data visualization/angle axis/padding min}}{},% |
| 345 |
{3.141592653589793}{high}{low}{yshift=-\pgfkeysvalueof{/tikz/data |
| 346 |
visualization/angle axis/padding max}}{options at=0 as |
| 347 |
[{style={draw=none}, no tick text}]} |
| 348 |
} |
| 349 |
} |
| 350 |
}, |
| 351 |
0 to 180/.style={ |
| 352 |
@setup axes/.style={ |
| 353 |
angle axis={min value=0, max value=180}, |
| 354 |
@degrees, |
| 355 |
@visualize zero=north, |
| 356 |
@inner radius axes at={{0}{low},{90}{high},{180}{high}}, |
| 357 |
@clean radius axes at={% |
| 358 |
{0}{low}{high}{yshift=\pgfkeysvalueof{/tikz/data visualization/angle axis/padding min}}{},% |
| 359 |
{180}{high}{low}{yshift=-\pgfkeysvalueof{/tikz/data |
| 360 |
visualization/angle axis/padding max}}{options at=0 as |
| 361 |
[{style={draw=none}, no tick text}]} |
| 362 |
} |
| 363 |
} |
| 364 |
}, |
| 365 |
upper half/.style={ |
| 366 |
@setup axes/.style={ |
| 367 |
angle axis={scaling=min at 0 and max at 180, ticks}, |
| 368 |
@visualize zero=north, |
| 369 |
@inner radius axes at={{min}{low},{max}{high}}, |
| 370 |
@clean radius axes at={% |
| 371 |
{min}{low}{high}{yshift=\pgfkeysvalueof{/tikz/data visualization/angle axis/padding min}}{},% |
| 372 |
{max}{high}{low}{yshift=-\pgfkeysvalueof{/tikz/data |
| 373 |
visualization/angle axis/padding max}}{options at=0 as |
| 374 |
[{style={draw=none}, no tick text}]} |
| 375 |
} |
| 376 |
} |
| 377 |
}, |
| 378 |
upper half clockwise/.style={ |
| 379 |
@setup axes/.style={ |
| 380 |
angle axis={scaling=min at 180 and max at 0, ticks}, |
| 381 |
@visualize zero=north, |
| 382 |
@inner radius axes at={{min}{low},{max}{high}}, |
| 383 |
@clean radius axes at={% |
| 384 |
{min}{low}{high}{yshift=\pgfkeysvalueof{/tikz/data visualization/angle axis/padding min}}{},% |
| 385 |
{max}{high}{low}{yshift=-\pgfkeysvalueof{/tikz/data |
| 386 |
visualization/angle axis/padding max}}{options at=0 as |
| 387 |
[{style={draw=none}, no tick text}]} |
| 388 |
} |
| 389 |
} |
| 390 |
}, |
| 391 |
% |
| 392 |
% Lower half |
| 393 |
% |
| 394 |
lower half/.style={ |
| 395 |
@setup axes/.style={ |
| 396 |
angle axis={scaling=min at -180 and max at 0, ticks}, |
| 397 |
@visualize zero=south, |
| 398 |
@inner radius axes at={{min}{low},{max}{high}}, |
| 399 |
@clean radius axes at={% |
| 400 |
{min}{low}{high}{yshift=-\pgfkeysvalueof{/tikz/data visualization/angle axis/padding min}}{},% |
| 401 |
{max}{high}{low}{yshift=\pgfkeysvalueof{/tikz/data |
| 402 |
visualization/angle axis/padding max}}{options at=0 as |
| 403 |
[{style={draw=none}, no tick text}]} |
| 404 |
} |
| 405 |
} |
| 406 |
}, |
| 407 |
lower half clockwise/.style={ |
| 408 |
@setup axes/.style={ |
| 409 |
angle axis={scaling=min at 0 and max at -180, ticks}, |
| 410 |
@visualize zero=south, |
| 411 |
@inner radius axes at={{min}{low},{max}{high}}, |
| 412 |
@clean radius axes at={% |
| 413 |
{min}{low}{high}{yshift=-\pgfkeysvalueof{/tikz/data visualization/angle axis/padding min}}{},% |
| 414 |
{max}{high}{low}{yshift=\pgfkeysvalueof{/tikz/data |
| 415 |
visualization/angle axis/padding max}}{options at=0 as |
| 416 |
[{style={draw=none}, no tick text}]} |
| 417 |
} |
| 418 |
} |
| 419 |
}, |
| 420 |
% |
| 421 |
% Right half |
| 422 |
% |
| 423 |
-pi half to pi half/.style={ |
| 424 |
@setup axes/.style={ |
| 425 |
@rad, |
| 426 |
angle axis={min value=-1.570796326794897, max value=1.570796326794897}, |
| 427 |
@visualize zero=east, |
| 428 |
@inner radius axes at={{0}{low},{1.570796326794897}{low},{-1.570796326794897}{high}}, |
| 429 |
@clean radius axes at={% |
| 430 |
{-1.570796326794897}{low}{high}{xshift=\pgfkeysvalueof{/tikz/data visualization/angle axis/padding min}}{},% |
| 431 |
{1.570796326794897}{high}{low}{xshift=-\pgfkeysvalueof{/tikz/data |
| 432 |
visualization/angle axis/padding max}}{options at=0 as |
| 433 |
[{style={draw=none}, no tick text}]} |
| 434 |
} |
| 435 |
} |
| 436 |
}, |
| 437 |
-90 to 90/.style={ |
| 438 |
@setup axes/.style={ |
| 439 |
angle axis={min value=-90, max value=90}, |
| 440 |
@degrees, |
| 441 |
@visualize zero=east, |
| 442 |
@inner radius axes at={{-90}{low},{0}{low},{90}{high}}, |
| 443 |
@clean radius axes at={% |
| 444 |
{-90}{low}{high}{xshift=\pgfkeysvalueof{/tikz/data visualization/angle axis/padding min}}{},% |
| 445 |
{90}{high}{low}{xshift=-\pgfkeysvalueof{/tikz/data |
| 446 |
visualization/angle axis/padding max}}{options at=0 as |
| 447 |
[{style={draw=none}, no tick text}]} |
| 448 |
} |
| 449 |
} |
| 450 |
}, |
| 451 |
right half/.style={ |
| 452 |
@setup axes/.style={ |
| 453 |
angle axis={scaling=min at -90 and max at 90, ticks}, |
| 454 |
@visualize zero=east, |
| 455 |
@inner radius axes at={{min}{low},{max}{high}}, |
| 456 |
@clean radius axes at={% |
| 457 |
{min}{low}{high}{xshift=\pgfkeysvalueof{/tikz/data visualization/angle axis/padding min}}{},% |
| 458 |
{max}{high}{low}{xshift=-\pgfkeysvalueof{/tikz/data |
| 459 |
visualization/angle axis/padding max}}{options at=0 as |
| 460 |
[{style={draw=none}, no tick text}]} |
| 461 |
} |
| 462 |
} |
| 463 |
}, |
| 464 |
right half clockwise/.style={ |
| 465 |
@setup axes/.style={ |
| 466 |
angle axis={scaling=min at 90 and max at -90, ticks}, |
| 467 |
@visualize zero=east, |
| 468 |
@inner radius axes at={{min}{low},{max}{high}}, |
| 469 |
@clean radius axes at={% |
| 470 |
{min}{low}{high}{xshift=\pgfkeysvalueof{/tikz/data visualization/angle axis/padding min}}{},% |
| 471 |
{max}{high}{low}{xshift=-\pgfkeysvalueof{/tikz/data |
| 472 |
visualization/angle axis/padding max}}{options at=0 as |
| 473 |
[{style={draw=none}, no tick text}]} |
| 474 |
} |
| 475 |
} |
| 476 |
}, |
| 477 |
% |
| 478 |
% Left half |
| 479 |
% |
| 480 |
left half/.style={ |
| 481 |
@setup axes/.style={ |
| 482 |
angle axis={scaling=min at 90 and max at 270, ticks}, |
| 483 |
@visualize zero=west, |
| 484 |
@inner radius axes at={{min}{low},{max}{high}}, |
| 485 |
@clean radius axes at={% |
| 486 |
{min}{low}{high}{xshift=-\pgfkeysvalueof{/tikz/data visualization/angle axis/padding min}}{},% |
| 487 |
{max}{high}{low}{xshift=\pgfkeysvalueof{/tikz/data |
| 488 |
visualization/angle axis/padding max}}{options at=0 as |
| 489 |
[{style={draw=none}, no tick text}]} |
| 490 |
} |
| 491 |
} |
| 492 |
}, |
| 493 |
left half clockwise/.style={ |
| 494 |
@setup axes/.style={ |
| 495 |
angle axis={scaling=min at 270 and max at 90, ticks}, |
| 496 |
@visualize zero=west, |
| 497 |
@inner radius axes at={{min}{low},{max}{high}}, |
| 498 |
@clean radius axes at={% |
| 499 |
{min}{low}{high}{xshift=-\pgfkeysvalueof{/tikz/data visualization/angle axis/padding min}}{},% |
| 500 |
{max}{high}{low}{xshift=\pgfkeysvalueof{/tikz/data |
| 501 |
visualization/angle axis/padding max}}{options at=0 as |
| 502 |
[{style={draw=none}, no tick text}]} |
| 503 |
} |
| 504 |
} |
| 505 |
}, |
| 506 |
% |
| 507 |
% Full circle |
| 508 |
% |
| 509 |
0 to 2pi/.style={ |
| 510 |
@setup axes/.style={ |
| 511 |
angle axis={min value=0, max value=6.283185307179586}, |
| 512 |
@rad, |
| 513 |
@visualize zero=north east, |
| 514 |
@inner radius axes at={{0}{low},{1.570796326794897}{high},{3.141592653589793}{high},{4.71238898038469}{low}}, |
| 515 |
@clean radius axes at={{0}{low}{high}{}{}} |
| 516 |
} |
| 517 |
}, |
| 518 |
-pi to pi/.style={ |
| 519 |
@setup axes/.style={ |
| 520 |
angle axis={min value=-3.141592653589793, max value=3.141592653589793}, |
| 521 |
@rad, |
| 522 |
@visualize zero=north east, |
| 523 |
@inner radius axes at={{0}{low},{1.570796326794897}{high},{3.141592653589793}{high},{-1.57079632679489}{low}}, |
| 524 |
@clean radius axes at={{0}{low}{high}{}{}} |
| 525 |
} |
| 526 |
}, |
| 527 |
0 to 360/.style={ |
| 528 |
@setup axes/.style={ |
| 529 |
angle axis={min value=0, max value=360}, |
| 530 |
@degrees, |
| 531 |
@visualize zero=north east, |
| 532 |
@inner radius axes at={{0}{low},{90}{high},{180}{high},{270}{low}}, |
| 533 |
@clean radius axes at={{0}{low}{high}{}{}} |
| 534 |
} |
| 535 |
}, |
| 536 |
-180 to 180/.style={ |
| 537 |
@setup axes/.style={ |
| 538 |
angle axis={min value=-180, max value=180}, |
| 539 |
@degrees, |
| 540 |
@visualize zero=north east, |
| 541 |
@inner radius axes at={{0}{low},{90}{high},{180}{high},{-90}{low}}, |
| 542 |
@clean radius axes at={{0}{low}{high}{}{}} |
| 543 |
} |
| 544 |
}, |
| 545 |
}% |
| 546 |
|
| 547 |
|
| 548 |
|
| 549 |
|
| 550 |
% |
| 551 |
% Pie-charts -- still under construction... |
| 552 |
% |
| 553 |
|
| 554 |
\tikzset{ |
| 555 |
/tikz/data visualization/axis options/.cd, |
| 556 |
percent/.style={\tikz@dv@axis/scaling=0 at 0 and 1 at 3.6}, |
| 557 |
full circle/.style={\tikz@dv@axis/scaling=min at 0 and max at 360}, |
| 558 |
half circle/.style={\tikz@dv@axis/scaling=min at 0 and max at 180}, |
| 559 |
quarter circle/.style={\tikz@dv@axis/scaling=min at 0 and max at 90} |
| 560 |
}% |
| 561 |
|
| 562 |
|
| 563 |
|
| 564 |
|
| 565 |
\endinput |