/usr/share/doc/python3-pyx-doc/manual/axis.html is in python3-pyx-doc 0.14.1-8.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Axes — PyX 0.14.1 Manual</title>
<link rel="stylesheet" href="_static/pyx.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.14.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="top" title="PyX 0.14.1 Manual" href="index.html" />
<link rel="next" title="Module box: Convex box handling" href="box.html" />
<link rel="prev" title="Graphs" href="graph.html" />
</head>
<body>
<div class="relatedtop">
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="box.html" title="Module box: Convex box handling"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="graph.html" title="Graphs"
accesskey="P">previous</a> |</li>
<li><a href="http://pyx.sourceforge.net">PyX Homepage</a> »</li>
<li><a href="manual.html">PyX 0.14.1 Manual</a> »</li>
<li>Axes</li>
</ul>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<span class="target" id="module-graph.axis"></span><div class="section" id="axes">
<h1>Axes<a class="headerlink" href="#axes" title="Permalink to this headline">¶</a></h1>
<div class="section" id="component-architecture">
<h2>Component architecture<a class="headerlink" href="#component-architecture" title="Permalink to this headline">¶</a></h2>
<p>Axes are a fundamental component of graphs although there might be applications
outside of the graph system. Internally axes are constructed out of components,
which handle different tasks axes need to fulfill:</p>
<dl class="docutils">
<dt>axis</dt>
<dd><p class="first">Implements the conversion of a data value to a graph coordinate of range [0:1].
It does also handle the proper usage of the components in complicated tasks
(<em>i.e.</em> combine the partitioner, texter, painter and rater to find the best
partitioning).</p>
<p class="last">An anchoredaxis is a container to combine an axis with an positioner and provide
a storage area for all kind of axis data. That way axis instances are reusable
(they do not store any data locally). The anchoredaxis and the positioner are
created by a graph corresponding to its geometry.</p>
</dd>
<dt>tick</dt>
<dd>Ticks are plotted along the axis. They might be labeled with text as well.</dd>
<dt>partitioner, we use “parter” as a short form</dt>
<dd>Creates one or several choices of tick lists suitable to a certain axis range.</dd>
<dt>texter</dt>
<dd>Creates labels for ticks when they are not set manually.</dd>
<dt>painter</dt>
<dd>Responsible for painting the axis.</dd>
<dt>rater</dt>
<dd>Calculate ratings, which can be used to select the best suitable partitioning.</dd>
<dt>positioner</dt>
<dd>Defines the position of an axis.</dd>
</dl>
<p>The names above map directly to modules which are provided in the directory
<code class="file docutils literal"><span class="pre">graph/axis</span></code> except for the anchoredaxis, which is part of the axis module
as well. Sometimes it might be convenient to import the axis directory directly
rather than to access iit through the graph. This would look like:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">pyx</span> <span class="k">import</span> <span class="o">*</span>
<span class="n">graph</span><span class="o">.</span><span class="n">axis</span><span class="o">.</span><span class="n">painter</span><span class="p">()</span> <span class="c1"># and the like</span>
<span class="kn">from</span> <span class="nn">pyx.graph</span> <span class="k">import</span> <span class="n">axis</span>
<span class="n">axis</span><span class="o">.</span><span class="n">painter</span><span class="p">()</span> <span class="c1"># this is shorter ...</span>
</pre></div>
</div>
<p>In most cases different implementations are available through different classes,
which can be combined in various ways. There are various axis examples
distributed with PyX, where you can see some of the features of the axis with a
few lines of code each. Hence we can here directly come to the reference of the
available components.</p>
<span class="target" id="module-graph.axis.axis"></span></div>
<div class="section" id="module-graph-axis-axis-axes">
<h2>Module <a class="reference internal" href="#module-graph.axis.axis" title="graph.axis.axis"><code class="xref py py-mod docutils literal"><span class="pre">graph.axis.axis</span></code></a>: Axes<a class="headerlink" href="#module-graph-axis-axis-axes" title="Permalink to this headline">¶</a></h2>
<p>The following classes are part of the module <a class="reference internal" href="#module-graph.axis.axis" title="graph.axis.axis"><code class="xref py py-mod docutils literal"><span class="pre">graph.axis.axis</span></code></a>. However,
there is a shortcut to access those classes via <code class="docutils literal"><span class="pre">graph.axis</span></code> directly.</p>
<p>Instances of the following classes can be passed to the <em>**axes</em> keyword
arguments of a graph. Those instances should only be used once.</p>
<dl class="class">
<dt id="graph.axis.axis.linear">
<em class="property">class </em><code class="descclassname">graph.axis.axis.</code><code class="descname">linear</code><span class="sig-paren">(</span><em>min=None</em>, <em>max=None</em>, <em>reverse=0</em>, <em>divisor=None</em>, <em>title=None</em>, <em>parter=parter.autolinear()</em>, <em>manualticks=[]</em>, <em>density=1</em>, <em>maxworse=2</em>, <em>rater=rater.linear()</em>, <em>texter=texter.mixed()</em>, <em>painter=painter.regular()</em>, <em>linkpainter=painter.linked()</em>, <em>fallbackrange=None</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.axis.linear" title="Permalink to this definition">¶</a></dt>
<dd><p>This class provides a linear axis. <em>min</em> and <em>max</em> define the axis range. When
not set, they are adjusted automatically by the data to be plotted in the graph.
Note, that some data might want to access the range of an axis (<em>e.g.</em> the
<code class="xref py py-class docutils literal"><span class="pre">function</span></code> class when no range was provided there) or you need to specify
a range when using the axis without plugging it into a graph (<em>e.g.</em> when
drawing an axis along a path). In cases where the data provides a range of zero
(e.g. a when plotting a constant function), then a <em>fallbackrange</em> can be set to
guarantee a minimal range of the axis.</p>
<p><em>reverse</em> can be set to indicate a reversed axis starting with bigger values
first. Alternatively you can fix the axis range by <em>min</em> and <em>max</em> accordingly.
When divisor is set, it is taken to divide all data range and position
informations while creating ticks. You can create ticks not taking into account
a factor by that. <em>title</em> is the title of the axis.</p>
<p><em>parter</em> is a partitioner instance, which creates suitable ticks for the axis
range. Those ticks are merged with ticks manually given by <em>manualticks</em> before
proceeding with rating, painting <em>etc.</em> Manually placed ticks win against those
created by the partitioner. For automatic partitioners, which are able to
calculate several possible tick lists for a given axis range, the <em>density</em> is a
(linear) factor to favour more or less ticks. It should not be stressed to much
(its likely, that the result would be unappropriate or not at all valid in terms
of rating label distances). But within a range of say 0.5 to 2 (even bigger for
large graphs) it can help to get less or more ticks than the default would lead
to. <em>maxworse</em> is the number of trials with more and less ticks when a better
rating was already found. <em>rater</em> is a rater instance, which rates the ticks and
the label distances for being best suitable. It also takes into account
<em>density</em>. The rater is only needed, when the partitioner creates several tick
lists.</p>
<p><em>texter</em> is a texter instance. It creates labels for those ticks, which claim to
have a label, but do not have a label string set already. Ticks created by
partitioners typically receive their label strings by texters. The <em>painter</em> is
finally used to construct the output. Note, that usually several output
constructions are needed, since the rater is also used to rate the distances
between the labels for an optimum. The <em>linkedpainter</em> is used as the axis
painter, when automatic link axes are created by the <code class="xref py py-meth docutils literal"><span class="pre">createlinked()</span></code>
method.</p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.axis.lin">
<em class="property">class </em><code class="descclassname">graph.axis.axis.</code><code class="descname">lin</code><span class="sig-paren">(</span><em>...</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.axis.lin" title="Permalink to this definition">¶</a></dt>
<dd><p>This class is an abbreviation of <a class="reference internal" href="#graph.axis.axis.linear" title="graph.axis.axis.linear"><code class="xref py py-class docutils literal"><span class="pre">linear</span></code></a> described above.</p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.axis.logarithmic">
<em class="property">class </em><code class="descclassname">graph.axis.axis.</code><code class="descname">logarithmic</code><span class="sig-paren">(</span><em>min=None</em>, <em>max=None</em>, <em>reverse=0</em>, <em>divisor=None</em>, <em>title=None</em>, <em>parter=parter.autologarithmic()</em>, <em>manualticks=[]</em>, <em>density=1</em>, <em>maxworse=2</em>, <em>rater=rater.logarithmic()</em>, <em>texter=texter.mixed()</em>, <em>painter=painter.regular()</em>, <em>linkpainter=painter.linked()</em>, <em>fallbackrange=None</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.axis.logarithmic" title="Permalink to this definition">¶</a></dt>
<dd><p>This class provides a logarithmic axis. All parameters work like
<a class="reference internal" href="#graph.axis.axis.linear" title="graph.axis.axis.linear"><code class="xref py py-class docutils literal"><span class="pre">linear</span></code></a>. Only two parameters have a different default: <em>parter</em> and
<em>rater</em>. Furthermore and most importantly, the mapping between data and graph
coordinates is logarithmic.</p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.axis.log">
<em class="property">class </em><code class="descclassname">graph.axis.axis.</code><code class="descname">log</code><span class="sig-paren">(</span><em>...</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.axis.log" title="Permalink to this definition">¶</a></dt>
<dd><p>This class is an abbreviation of <a class="reference internal" href="#graph.axis.axis.logarithmic" title="graph.axis.axis.logarithmic"><code class="xref py py-class docutils literal"><span class="pre">logarithmic</span></code></a> described above.</p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.axis.bar">
<em class="property">class </em><code class="descclassname">graph.axis.axis.</code><code class="descname">bar</code><span class="sig-paren">(</span><em>subaxes=None</em>, <em>defaultsubaxis=linear(painter=None</em>, <em>linkpainter=None</em>, <em>parter=None</em>, <em>texter=None)</em>, <em>dist=0.5</em>, <em>firstdist=None</em>, <em>lastdist=None</em>, <em>title=None</em>, <em>reverse=0</em>, <em>painter=painter.bar()</em>, <em>linkpainter=painter.linkedbar()</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.axis.bar" title="Permalink to this definition">¶</a></dt>
<dd><p>This class provides an axis suitable for a bar style. It handles a discrete set
of values and maps them to distinct ranges in graph coordinates. For that, the
axis gets a tuple of two values.</p>
<p>The first item is taken to be one of the discrete values valid on this axis. The
discrete values can be any hashable type and the order of the subaxes is defined
by the order the data is received or the inverse of that when <em>reverse</em> is set.</p>
<p>The second item is passed to the corresponding subaxis. The result of the
conversion done by the subaxis is mapped to the graph coordinate range reserved
for this subaxis. This range is defined by a size attribute of the subaxis,
which can be added to any axis. (see the sized linear axes described below for
some axes already having a size argument). When no size information is available
for a subaxis, a size value of 1 is used. The baraxis itself calculates its size
by suming up the sizes of its subaxes plus <em>firstdist</em>, <em>lastdist</em> and <em>dist</em>
times the number of subaxes minus 1.</p>
<p><em>subaxes</em> should be a list or a dictionary mapping a discrete value of the bar
axis to the corresponding subaxis. When no subaxes are set or data is received
for an unknown discrete axis value, instances of defaultsubaxis are used as the
subaxis for this discrete value.</p>
<p><em>dist</em> is used as the spacing between the ranges for each distinct value. It is
measured in the same units as the subaxis results, thus the default value of
<code class="docutils literal"><span class="pre">0.5</span></code> means half the width between the distinct values as the width for each
distinct value. <em>firstdist</em> and <em>lastdist</em> are used before the first and after
the last value. When set to <code class="docutils literal"><span class="pre">None</span></code>, half of <em>dist</em> is used.</p>
<p><em>title</em> is the title of the split axes and <em>painter</em> is a specialized painter
for an bar axis and <em>linkpainter</em> is used as the painter, when automatic link
axes are created by the <code class="xref py py-meth docutils literal"><span class="pre">createlinked()</span></code> method.</p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.axis.nestedbar">
<em class="property">class </em><code class="descclassname">graph.axis.axis.</code><code class="descname">nestedbar</code><span class="sig-paren">(</span><em>subaxes=None</em>, <em>defaultsubaxis=bar(dist=0</em>, <em>painter=None</em>, <em>linkpainter=None)</em>, <em>dist=0.5</em>, <em>firstdist=None</em>, <em>lastdist=None</em>, <em>title=None</em>, <em>reverse=0</em>, <em>painter=painter.bar()</em>, <em>linkpainter=painter.linkedbar()</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.axis.nestedbar" title="Permalink to this definition">¶</a></dt>
<dd><p>This class is identical to the bar axis except for the different default value
for defaultsubaxis.</p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.axis.split">
<em class="property">class </em><code class="descclassname">graph.axis.axis.</code><code class="descname">split</code><span class="sig-paren">(</span><em>subaxes=None</em>, <em>defaultsubaxis=linear()</em>, <em>dist=0.5</em>, <em>firstdist=0</em>, <em>lastdist=0</em>, <em>title=None</em>, <em>reverse=0</em>, <em>painter=painter.split()</em>, <em>linkpainter=painter.linkedsplit()</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.axis.split" title="Permalink to this definition">¶</a></dt>
<dd><p>This class is identical to the bar axis except for the different default value
for defaultsubaxis, firstdist, lastdist, painter, and linkedpainter.</p>
</dd></dl>
<p>Sometimes you want to alter the default size of 1 of the subaxes. For that you
have to add a size attribute to the axis data. The two classes
<code class="xref py py-class docutils literal"><span class="pre">sizedlinear</span></code> and <code class="xref py py-class docutils literal"><span class="pre">autosizedlinear</span></code> do that for linear axes. Their
short names are <code class="xref py py-class docutils literal"><span class="pre">sizedlin</span></code> and <code class="xref py py-class docutils literal"><span class="pre">autosizedlin</span></code>.
<code class="xref py py-class docutils literal"><span class="pre">sizedlinear</span></code> extends the usual linear axis by an first argument <em>size</em>.
<code class="xref py py-class docutils literal"><span class="pre">autosizedlinear</span></code> creates the size out of its data range automatically
but sets an <code class="xref py py-class docutils literal"><span class="pre">autolinear</span></code> parter with <em>extendtick</em> being <code class="docutils literal"><span class="pre">None</span></code> in order
to disable automatic range modifications while painting the axis.</p>
<p>The <code class="xref py py-mod docutils literal"><span class="pre">axis</span></code> module also contains classes implementing so called anchored
axes, which combine an axis with an positioner and a storage place for axis
related data. Since these features are not interesting for the average PyX user,
we’ll not go into all the details of their parameters and except for some handy
axis position methods:</p>
<dl class="class">
<dt id="graph.axis.axis.anchoredaxis">
<em class="property">class </em><code class="descclassname">graph.axis.axis.</code><code class="descname">anchoredaxis</code><a class="headerlink" href="#graph.axis.axis.anchoredaxis" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="graph.axis.axis.anchoredaxis.basepath">
<code class="descclassname">anchoredaxis.</code><code class="descname">basepath</code><span class="sig-paren">(</span><em>x1=None</em>, <em>x2=None</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.axis.anchoredaxis.basepath" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a path instance for the base path. <em>x1</em> and <em>x2</em> define the axis range,
the base path should cover. For <code class="docutils literal"><span class="pre">None</span></code> the beginning and end of the path is
taken, which might cover a longer range, when the axis is embedded as a subaxis.
For that case, a <code class="docutils literal"><span class="pre">None</span></code> value extends the range to the point of the middle
between two subaxes or the beginning or end of the whole axis, when the subaxis
is the first or last of the subaxes.</p>
</dd></dl>
<dl class="method">
<dt id="graph.axis.axis.anchoredaxis.vbasepath">
<code class="descclassname">anchoredaxis.</code><code class="descname">vbasepath</code><span class="sig-paren">(</span><em>v1=None</em>, <em>v2=None</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.axis.anchoredaxis.vbasepath" title="Permalink to this definition">¶</a></dt>
<dd><p>Like <a class="reference internal" href="#graph.axis.axis.anchoredaxis.basepath" title="graph.axis.axis.anchoredaxis.basepath"><code class="xref py py-meth docutils literal"><span class="pre">basepath()</span></code></a> but in graph coordinates.</p>
</dd></dl>
<dl class="method">
<dt id="graph.axis.axis.anchoredaxis.gridpath">
<code class="descclassname">anchoredaxis.</code><code class="descname">gridpath</code><span class="sig-paren">(</span><em>x</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.axis.anchoredaxis.gridpath" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a path instance for the grid path at position <em>x</em>. Might return <code class="docutils literal"><span class="pre">None</span></code>
when no grid path is available.</p>
</dd></dl>
<dl class="method">
<dt id="graph.axis.axis.anchoredaxis.vgridpath">
<code class="descclassname">anchoredaxis.</code><code class="descname">vgridpath</code><span class="sig-paren">(</span><em>v</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.axis.anchoredaxis.vgridpath" title="Permalink to this definition">¶</a></dt>
<dd><p>Like <a class="reference internal" href="#graph.axis.axis.anchoredaxis.gridpath" title="graph.axis.axis.anchoredaxis.gridpath"><code class="xref py py-meth docutils literal"><span class="pre">gridpath()</span></code></a> but in graph coordinates.</p>
</dd></dl>
<dl class="method">
<dt id="graph.axis.axis.anchoredaxis.tickpoint">
<code class="descclassname">anchoredaxis.</code><code class="descname">tickpoint</code><span class="sig-paren">(</span><em>x</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.axis.anchoredaxis.tickpoint" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the position of <em>x</em> as a tuple <code class="docutils literal"><span class="pre">(x,</span> <span class="pre">y)</span></code>.</p>
</dd></dl>
<dl class="method">
<dt id="graph.axis.axis.anchoredaxis.vtickpoint">
<code class="descclassname">anchoredaxis.</code><code class="descname">vtickpoint</code><span class="sig-paren">(</span><em>v</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.axis.anchoredaxis.vtickpoint" title="Permalink to this definition">¶</a></dt>
<dd><p>Like <a class="reference internal" href="#graph.axis.axis.anchoredaxis.tickpoint" title="graph.axis.axis.anchoredaxis.tickpoint"><code class="xref py py-meth docutils literal"><span class="pre">tickpoint()</span></code></a> but in graph coordinates.</p>
</dd></dl>
<dl class="method">
<dt id="graph.axis.axis.anchoredaxis.tickdirection">
<code class="descclassname">anchoredaxis.</code><code class="descname">tickdirection</code><span class="sig-paren">(</span><em>x</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.axis.anchoredaxis.tickdirection" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the direction of a tick at <em>x</em> as a tuple <code class="docutils literal"><span class="pre">(dx,</span> <span class="pre">dy)</span></code>. The tick
direction points inside of the graph.</p>
</dd></dl>
<dl class="method">
<dt id="graph.axis.axis.anchoredaxis.vtickdirection">
<code class="descclassname">anchoredaxis.</code><code class="descname">vtickdirection</code><span class="sig-paren">(</span><em>v</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.axis.anchoredaxis.vtickdirection" title="Permalink to this definition">¶</a></dt>
<dd><p>Like <a class="reference internal" href="#graph.axis.axis.anchoredaxis.tickdirection" title="graph.axis.axis.anchoredaxis.tickdirection"><code class="xref py py-meth docutils literal"><span class="pre">tickdirection()</span></code></a> but in graph coordinates.</p>
</dd></dl>
<dl class="method">
<dt>
<code class="descclassname">anchoredaxis.</code><code class="descname">vtickdirection</code><span class="sig-paren">(</span><em>v</em><span class="sig-paren">)</span></dt>
<dd><p>Like <a class="reference internal" href="#graph.axis.axis.anchoredaxis.tickdirection" title="graph.axis.axis.anchoredaxis.tickdirection"><code class="xref py py-meth docutils literal"><span class="pre">tickdirection()</span></code></a> but in graph coordinates.</p>
</dd></dl>
<p>However, there are two anchored axes implementations <a class="reference internal" href="#graph.axis.axis.linkedaxis" title="graph.axis.axis.linkedaxis"><code class="xref py py-class docutils literal"><span class="pre">linkedaxis</span></code></a> and
<a class="reference internal" href="#graph.axis.axis.anchoredpathaxis" title="graph.axis.axis.anchoredpathaxis"><code class="xref py py-class docutils literal"><span class="pre">anchoredpathaxis</span></code></a> which are available to the user to create special
forms of anchored axes.</p>
<dl class="class">
<dt id="graph.axis.axis.linkedaxis">
<em class="property">class </em><code class="descclassname">graph.axis.axis.</code><code class="descname">linkedaxis</code><span class="sig-paren">(</span><em>linkedaxis=None</em>, <em>errorname="manual-linked"</em>, <em>painter=_marker</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.axis.linkedaxis" title="Permalink to this definition">¶</a></dt>
<dd><p>This class implements an anchored axis to be passed to a graph constructor to
manually link the axis to another anchored axis instance <em>linkedaxis</em>. Note that
you can skip setting the value of <em>linkedaxis</em> in the constructor, but set it
later on by the <a class="reference internal" href="#graph.axis.axis.linkedaxis.setlinkedaxis" title="graph.axis.axis.linkedaxis.setlinkedaxis"><code class="xref py py-meth docutils literal"><span class="pre">setlinkedaxis()</span></code></a> method described below. <em>errorname</em> is
printed within error messages when the data is used and some problem occurs.
<em>painter</em> is used for painting the linked axis instead of the <em>linkedpainter</em>
provided by the <em>linkedaxis</em>.</p>
</dd></dl>
<dl class="method">
<dt id="graph.axis.axis.linkedaxis.setlinkedaxis">
<code class="descclassname">linkedaxis.</code><code class="descname">setlinkedaxis</code><span class="sig-paren">(</span><em>linkedaxis</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.axis.linkedaxis.setlinkedaxis" title="Permalink to this definition">¶</a></dt>
<dd><p>This method can be used to set the <em>linkedaxis</em> after constructing the axis. By
that you can create several graph instances with cycled linked axes.</p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.axis.anchoredpathaxis">
<em class="property">class </em><code class="descclassname">graph.axis.axis.</code><code class="descname">anchoredpathaxis</code><span class="sig-paren">(</span><em>path</em>, <em>axis</em>, <em>direction=1</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.axis.anchoredpathaxis" title="Permalink to this definition">¶</a></dt>
<dd><p>This class implements an anchored axis the path <em>path</em>. <em>direction</em> defines the
direction of the ticks. Allowed values are <code class="docutils literal"><span class="pre">1</span></code> (left) and <code class="docutils literal"><span class="pre">-1</span></code> (right).</p>
</dd></dl>
<p>The <a class="reference internal" href="#graph.axis.axis.anchoredpathaxis" title="graph.axis.axis.anchoredpathaxis"><code class="xref py py-class docutils literal"><span class="pre">anchoredpathaxis</span></code></a> contains as any anchored axis after calling its
<code class="xref py py-meth docutils literal"><span class="pre">create()</span></code> method the painted axis in the <a class="reference internal" href="canvas.html#module-canvas" title="canvas"><code class="xref py py-attr docutils literal"><span class="pre">canvas</span></code></a> member attribute.
The function <code class="xref py py-func docutils literal"><span class="pre">pathaxis()</span></code> has the same signature like the
<a class="reference internal" href="#graph.axis.axis.anchoredpathaxis" title="graph.axis.axis.anchoredpathaxis"><code class="xref py py-class docutils literal"><span class="pre">anchoredpathaxis</span></code></a> class, but immediately creates the axis and returns
the painted axis.</p>
<span class="target" id="module-graph.axis.tick"></span></div>
<div class="section" id="module-graph-axis-tick-axes-ticks">
<h2>Module <a class="reference internal" href="#module-graph.axis.tick" title="graph.axis.tick"><code class="xref py py-mod docutils literal"><span class="pre">graph.axis.tick</span></code></a>: Axes ticks<a class="headerlink" href="#module-graph-axis-tick-axes-ticks" title="Permalink to this headline">¶</a></h2>
<p>The following classes are part of the module <a class="reference internal" href="#module-graph.axis.tick" title="graph.axis.tick"><code class="xref py py-mod docutils literal"><span class="pre">graph.axis.tick</span></code></a>.</p>
<dl class="class">
<dt id="graph.axis.tick.rational">
<em class="property">class </em><code class="descclassname">graph.axis.tick.</code><code class="descname">rational</code><span class="sig-paren">(</span><em>x</em>, <em>power=1</em>, <em>floatprecision=10</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.tick.rational" title="Permalink to this definition">¶</a></dt>
<dd><p>This class implements a rational number with infinite precision. For that it
stores two integers, the numerator <code class="docutils literal"><span class="pre">num</span></code> and a denominator <code class="docutils literal"><span class="pre">denom</span></code>. Note
that the implementation of rational number arithmetics is not at all complete
and designed for its special use case of axis partitioning in PyX preventing any
roundoff errors.</p>
<p><em>x</em> is the value of the rational created by a conversion from one of the
following input values:</p>
</dd></dl>
<ul>
<li><dl class="first docutils">
<dt>A float. It is converted to a rational with finite precision determined by</dt>
<dd><p class="first last"><em>floatprecision</em>.</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>A string, which is parsed to a rational number with full precision. It is also</dt>
<dd><p class="first last">allowed to provide a fraction like <code class="docutils literal"><span class="pre">"1/3"</span></code>.</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>A sequence of two integers. Those integers are taken as numerator and</dt>
<dd><p class="first last">denominator of the rational.</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>An instance defining instance variables <code class="docutils literal"><span class="pre">num</span></code> and <code class="docutils literal"><span class="pre">denom</span></code> like</dt>
<dd><blockquote class="first">
<div><p><a class="reference internal" href="#graph.axis.tick.rational" title="graph.axis.tick.rational"><code class="xref py py-class docutils literal"><span class="pre">rational</span></code></a> itself.</p>
</div></blockquote>
<p class="last"><em>power</em> is an integer to calculate <code class="docutils literal"><span class="pre">x**power</span></code>. This is useful at certain
places in partitioners.</p>
</dd>
</dl>
</li>
</ul>
<dl class="class">
<dt id="graph.axis.tick.tick">
<em class="property">class </em><code class="descclassname">graph.axis.tick.</code><code class="descname">tick</code><span class="sig-paren">(</span><em>x</em>, <em>ticklevel=0</em>, <em>labellevel=0</em>, <em>label=None</em>, <em>labelattrs=[]</em>, <em>power=1</em>, <em>floatprecision=10</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.tick.tick" title="Permalink to this definition">¶</a></dt>
<dd><p>This class implements ticks based on rational numbers. Instances of this class
can be passed to the <code class="docutils literal"><span class="pre">manualticks</span></code> parameter of a regular axis.</p>
<p>The parameters <em>x</em>, <em>power</em>, and <em>floatprecision</em> share its meaning with
<a class="reference internal" href="#graph.axis.tick.rational" title="graph.axis.tick.rational"><code class="xref py py-class docutils literal"><span class="pre">rational</span></code></a>.</p>
<p>A tick has a tick level (<em>i.e.</em> markers at the axis path) and a label lavel
(<em>e.i.</em> place text at the axis path), <em>ticklevel</em> and <em>labellevel</em>. These are
non-negative integers or <em>None</em>. A value of <code class="docutils literal"><span class="pre">0</span></code> means a regular tick or label,
<code class="docutils literal"><span class="pre">1</span></code> stands for a subtick or sublabel, <code class="docutils literal"><span class="pre">2</span></code> for subsubtick or subsublabel and
so on. <code class="docutils literal"><span class="pre">None</span></code> means omitting the tick or label. <em>label</em> is the text of the
label. When not set, it can be created automatically by a texter. <em>labelattrs</em>
are the attributes for the labels.</p>
</dd></dl>
<span class="target" id="module-graph.axis.parter"></span></div>
<div class="section" id="module-graph-axis-parter-axes-partitioners">
<h2>Module <a class="reference internal" href="#module-graph.axis.parter" title="graph.axis.parter"><code class="xref py py-mod docutils literal"><span class="pre">graph.axis.parter</span></code></a>: Axes partitioners<a class="headerlink" href="#module-graph-axis-parter-axes-partitioners" title="Permalink to this headline">¶</a></h2>
<p>The following classes are part of the module <a class="reference internal" href="#module-graph.axis.parter" title="graph.axis.parter"><code class="xref py py-mod docutils literal"><span class="pre">graph.axis.parter</span></code></a>. Instances
of the classes can be passed to the parter keyword argument of regular axes.</p>
<dl class="class">
<dt id="graph.axis.parter.linear">
<em class="property">class </em><code class="descclassname">graph.axis.parter.</code><code class="descname">linear</code><span class="sig-paren">(</span><em>tickdists=None</em>, <em>labeldists=None</em>, <em>extendtick=0</em>, <em>extendlabel=None</em>, <em>epsilon=1e-10</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.parter.linear" title="Permalink to this definition">¶</a></dt>
<dd><p>Instances of this class creates equally spaced tick lists. The distances between
the ticks, subticks, subsubticks <em>etc.</em> starting from a tick at zero are given
as first, second, third <em>etc.</em> item of the list <em>tickdists</em>. For a tick
position, the lowest level wins, <em>i.e.</em> for <code class="docutils literal"><span class="pre">[2,</span> <span class="pre">1]</span></code> even numbers will have
ticks whereas subticks are placed at odd integer. The items of <em>tickdists</em> might
be strings, floats or tuples as described for the <em>pos</em> parameter of class
<code class="xref py py-class docutils literal"><span class="pre">tick</span></code>.</p>
<p><em>labeldists</em> works equally for placing labels. When <em>labeldists</em> is kept
<code class="docutils literal"><span class="pre">None</span></code>, labels will be placed at each tick position, but sublabels <em>etc.</em> will
not be used. This copy behaviour is also available <em>vice versa</em> and can be
disabled by an empty list.</p>
<p><em>extendtick</em> can be set to a tick level for including the next tick of that
level when the data exceeds the range covered by the ticks by more than
<em>epsilon</em>. <em>epsilon</em> is taken relative to the axis range. <em>extendtick</em> is
disabled when set to <code class="docutils literal"><span class="pre">None</span></code> or for fixed range axes. <em>extendlabel</em> works
similar to <em>extendtick</em> but for labels.</p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.parter.lin">
<em class="property">class </em><code class="descclassname">graph.axis.parter.</code><code class="descname">lin</code><span class="sig-paren">(</span><em>...</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.parter.lin" title="Permalink to this definition">¶</a></dt>
<dd><p>This class is an abbreviation of <a class="reference internal" href="#graph.axis.parter.linear" title="graph.axis.parter.linear"><code class="xref py py-class docutils literal"><span class="pre">linear</span></code></a> described above.</p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.parter.autolinear">
<em class="property">class </em><code class="descclassname">graph.axis.parter.</code><code class="descname">autolinear</code><span class="sig-paren">(</span><em>variants=defaultvariants</em>, <em>extendtick=0</em>, <em>epsilon=1e-10</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.parter.autolinear" title="Permalink to this definition">¶</a></dt>
<dd><p>Instances of this class creates equally spaced tick lists, where the distance
between the ticks is adjusted to the range of the axis automatically. Variants
are a list of possible choices for <em>tickdists</em> of <a class="reference internal" href="#graph.axis.parter.linear" title="graph.axis.parter.linear"><code class="xref py py-class docutils literal"><span class="pre">linear</span></code></a>. Further
variants are build out of these by multiplying or dividing all the values by
multiples of <code class="docutils literal"><span class="pre">10</span></code>. <em>variants</em> should be ordered that way, that the number of
ticks for a given range will decrease, hence the distances between the ticks
should increase within the <em>variants</em> list. <em>extendtick</em> and <em>epsilon</em> have the
same meaning as in <a class="reference internal" href="#graph.axis.parter.linear" title="graph.axis.parter.linear"><code class="xref py py-class docutils literal"><span class="pre">linear</span></code></a>.</p>
</dd></dl>
<dl class="attribute">
<dt id="graph.axis.parter.autolinear.defaultvariants">
<code class="descclassname">autolinear.</code><code class="descname">defaultvariants</code><a class="headerlink" href="#graph.axis.parter.autolinear.defaultvariants" title="Permalink to this definition">¶</a></dt>
<dd><p><code class="docutils literal"><span class="pre">[[tick.rational((1,</span> <span class="pre">1)),</span> <span class="pre">tick.rational((1,</span> <span class="pre">2))],</span> <span class="pre">[tick.rational((2,</span> <span class="pre">1)),</span>
<span class="pre">tick.rational((1,</span> <span class="pre">1))],</span> <span class="pre">[tick.rational((5,</span> <span class="pre">2)),</span> <span class="pre">tick.rational((5,</span> <span class="pre">4))],</span>
<span class="pre">[tick.rational((5,</span> <span class="pre">1)),</span> <span class="pre">tick.rational((5,</span> <span class="pre">2))]]</span></code></p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.parter.autolin">
<em class="property">class </em><code class="descclassname">graph.axis.parter.</code><code class="descname">autolin</code><span class="sig-paren">(</span><em>...</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.parter.autolin" title="Permalink to this definition">¶</a></dt>
<dd><p>This class is an abbreviation of <a class="reference internal" href="#graph.axis.parter.autolinear" title="graph.axis.parter.autolinear"><code class="xref py py-class docutils literal"><span class="pre">autolinear</span></code></a> described above.</p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.parter.preexp">
<em class="property">class </em><code class="descclassname">graph.axis.parter.</code><code class="descname">preexp</code><span class="sig-paren">(</span><em>pres</em>, <em>exp</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.parter.preexp" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a storage class defining positions of ticks on a logarithmic scale. It
contains a list <em>pres</em> of positions <span class="math">\(p_i\)</span> and <em>exp</em>, a multiplicator
<span class="math">\(m\)</span>. Valid tick positions are defined by <span class="math">\(p_im^n\)</span> for any integer
<span class="math">\(n\)</span>.</p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.parter.logarithmic">
<em class="property">class </em><code class="descclassname">graph.axis.parter.</code><code class="descname">logarithmic</code><span class="sig-paren">(</span><em>tickpreexps=None</em>, <em>labelpreexps=None</em>, <em>extendtick=0</em>, <em>extendlabel=None</em>, <em>epsilon=1e-10</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.parter.logarithmic" title="Permalink to this definition">¶</a></dt>
<dd><p>Instances of this class creates tick lists suitable to logarithmic axes. The
positions of the ticks, subticks, subsubticks <em>etc.</em> are defined by the first,
second, third <em>etc.</em> item of the list <em>tickpreexps</em>, which are all
<a class="reference internal" href="#graph.axis.parter.preexp" title="graph.axis.parter.preexp"><code class="xref py py-class docutils literal"><span class="pre">preexp</span></code></a> instances.</p>
<p><em>labelpreexps</em> works equally for placing labels. When <em>labelpreexps</em> is kept
<code class="docutils literal"><span class="pre">None</span></code>, labels will be placed at each tick position, but sublabels <em>etc.</em> will
not be used. This copy behaviour is also available <em>vice versa</em> and can be
disabled by an empty list.</p>
<p><em>extendtick</em>, <em>extendlabel</em> and <em>epsilon</em> have the same meaning as in
<a class="reference internal" href="#graph.axis.parter.linear" title="graph.axis.parter.linear"><code class="xref py py-class docutils literal"><span class="pre">linear</span></code></a>.</p>
</dd></dl>
<p>Some <a class="reference internal" href="#graph.axis.parter.preexp" title="graph.axis.parter.preexp"><code class="xref py py-class docutils literal"><span class="pre">preexp</span></code></a> instances for the use in <a class="reference internal" href="#graph.axis.parter.logarithmic" title="graph.axis.parter.logarithmic"><code class="xref py py-class docutils literal"><span class="pre">logarithmic</span></code></a> are available
as instance variables (should be used read-only):</p>
<dl class="attribute">
<dt id="graph.axis.parter.logarithmic.pre1exp5">
<code class="descclassname">logarithmic.</code><code class="descname">pre1exp5</code><a class="headerlink" href="#graph.axis.parter.logarithmic.pre1exp5" title="Permalink to this definition">¶</a></dt>
<dd><p><code class="docutils literal"><span class="pre">preexp([tick.rational((1,</span> <span class="pre">1))],</span> <span class="pre">100000)</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="graph.axis.parter.logarithmic.pre1exp4">
<code class="descclassname">logarithmic.</code><code class="descname">pre1exp4</code><a class="headerlink" href="#graph.axis.parter.logarithmic.pre1exp4" title="Permalink to this definition">¶</a></dt>
<dd><p><code class="docutils literal"><span class="pre">preexp([tick.rational((1,</span> <span class="pre">1))],</span> <span class="pre">10000)</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="graph.axis.parter.logarithmic.pre1exp3">
<code class="descclassname">logarithmic.</code><code class="descname">pre1exp3</code><a class="headerlink" href="#graph.axis.parter.logarithmic.pre1exp3" title="Permalink to this definition">¶</a></dt>
<dd><p><code class="docutils literal"><span class="pre">preexp([tick.rational((1,</span> <span class="pre">1))],</span> <span class="pre">1000)</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="graph.axis.parter.logarithmic.pre1exp2">
<code class="descclassname">logarithmic.</code><code class="descname">pre1exp2</code><a class="headerlink" href="#graph.axis.parter.logarithmic.pre1exp2" title="Permalink to this definition">¶</a></dt>
<dd><p><code class="docutils literal"><span class="pre">preexp([tick.rational((1,</span> <span class="pre">1))],</span> <span class="pre">100)</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="graph.axis.parter.logarithmic.pre1exp">
<code class="descclassname">logarithmic.</code><code class="descname">pre1exp</code><a class="headerlink" href="#graph.axis.parter.logarithmic.pre1exp" title="Permalink to this definition">¶</a></dt>
<dd><p><code class="docutils literal"><span class="pre">preexp([tick.rational((1,</span> <span class="pre">1))],</span> <span class="pre">10)</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="graph.axis.parter.logarithmic.pre125exp">
<code class="descclassname">logarithmic.</code><code class="descname">pre125exp</code><a class="headerlink" href="#graph.axis.parter.logarithmic.pre125exp" title="Permalink to this definition">¶</a></dt>
<dd><p><code class="docutils literal"><span class="pre">preexp([tick.rational((1,</span> <span class="pre">1)),</span> <span class="pre">tick.rational((2,</span> <span class="pre">1)),</span> <span class="pre">tick.rational((5,</span> <span class="pre">1))],</span>
<span class="pre">10)</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="graph.axis.parter.logarithmic.pre1to9exp">
<code class="descclassname">logarithmic.</code><code class="descname">pre1to9exp</code><a class="headerlink" href="#graph.axis.parter.logarithmic.pre1to9exp" title="Permalink to this definition">¶</a></dt>
<dd><p><code class="docutils literal"><span class="pre">preexp([tick.rational((1,</span> <span class="pre">1))</span> <span class="pre">for</span> <span class="pre">x</span> <span class="pre">in</span> <span class="pre">range(1,</span> <span class="pre">10)],</span> <span class="pre">10)</span></code></p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.parter.log">
<em class="property">class </em><code class="descclassname">graph.axis.parter.</code><code class="descname">log</code><span class="sig-paren">(</span><em>...</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.parter.log" title="Permalink to this definition">¶</a></dt>
<dd><p>This class is an abbreviation of <a class="reference internal" href="#graph.axis.parter.logarithmic" title="graph.axis.parter.logarithmic"><code class="xref py py-class docutils literal"><span class="pre">logarithmic</span></code></a> described above.</p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.parter.autologarithmic">
<em class="property">class </em><code class="descclassname">graph.axis.parter.</code><code class="descname">autologarithmic</code><span class="sig-paren">(</span><em>variants=defaultvariants</em>, <em>extendtick=0</em>, <em>extendlabel=None</em>, <em>epsilon=1e-10</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.parter.autologarithmic" title="Permalink to this definition">¶</a></dt>
<dd><p>Instances of this class creates tick lists suitable to logarithmic axes, where
the distance between the ticks is adjusted to the range of the axis
automatically. Variants are a list of tuples with possible choices for
<em>tickpreexps</em> and <em>labelpreexps</em> of <a class="reference internal" href="#graph.axis.parter.logarithmic" title="graph.axis.parter.logarithmic"><code class="xref py py-class docutils literal"><span class="pre">logarithmic</span></code></a>. <em>variants</em> should be
ordered that way, that the number of ticks for a given range will decrease
within the <em>variants</em> list.</p>
<p><em>extendtick</em>, <em>extendlabel</em> and <em>epsilon</em> have the same meaning as in
<a class="reference internal" href="#graph.axis.parter.linear" title="graph.axis.parter.linear"><code class="xref py py-class docutils literal"><span class="pre">linear</span></code></a>.</p>
</dd></dl>
<dl class="attribute">
<dt id="graph.axis.parter.autologarithmic.defaultvariants">
<code class="descclassname">autologarithmic.</code><code class="descname">defaultvariants</code><a class="headerlink" href="#graph.axis.parter.autologarithmic.defaultvariants" title="Permalink to this definition">¶</a></dt>
<dd><p><code class="docutils literal"><span class="pre">[([log.pre1exp,</span> <span class="pre">log.pre1to9exp],</span> <span class="pre">[log.pre1exp,</span> <span class="pre">log.pre125exp]),</span> <span class="pre">([log.pre1exp,</span>
<span class="pre">log.pre1to9exp],</span> <span class="pre">None),</span> <span class="pre">([log.pre1exp2,</span> <span class="pre">log.pre1exp],</span> <span class="pre">None),</span> <span class="pre">([log.pre1exp3,</span>
<span class="pre">log.pre1exp],</span> <span class="pre">None),</span> <span class="pre">([log.pre1exp4,</span> <span class="pre">log.pre1exp],</span> <span class="pre">None),</span> <span class="pre">([log.pre1exp5,</span>
<span class="pre">log.pre1exp],</span> <span class="pre">None)]</span></code></p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.parter.autolog">
<em class="property">class </em><code class="descclassname">graph.axis.parter.</code><code class="descname">autolog</code><span class="sig-paren">(</span><em>...</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.parter.autolog" title="Permalink to this definition">¶</a></dt>
<dd><p>This class is an abbreviation of <a class="reference internal" href="#graph.axis.parter.autologarithmic" title="graph.axis.parter.autologarithmic"><code class="xref py py-class docutils literal"><span class="pre">autologarithmic</span></code></a> described above.</p>
</dd></dl>
<span class="target" id="module-graph.axis.texter"></span></div>
<div class="section" id="module-graph-axis-texter-axes-texter">
<h2>Module <a class="reference internal" href="#module-graph.axis.texter" title="graph.axis.texter"><code class="xref py py-mod docutils literal"><span class="pre">graph.axis.texter</span></code></a>: Axes texter<a class="headerlink" href="#module-graph-axis-texter-axes-texter" title="Permalink to this headline">¶</a></h2>
<p>The following classes are part of the module <a class="reference internal" href="#module-graph.axis.texter" title="graph.axis.texter"><code class="xref py py-mod docutils literal"><span class="pre">graph.axis.texter</span></code></a>. Instances
of the classes can be passed to the texter keyword argument of regular axes.
Texters are used to define the label text for ticks, which request to have a
label, but for which no label text has been specified so far. A typical case are
ticks created by partitioners described above.</p>
<dl class="class">
<dt id="graph.axis.texter.decimal">
<em class="property">class </em><code class="descclassname">graph.axis.texter.</code><code class="descname">decimal</code><span class="sig-paren">(</span><em>prefix="", infix="", suffix="", equalprecision=0, decimalsep=".", thousandsep="", thousandthpartsep="", plus="", minus="-", period=r"\overline{%s}", labelattrs=[text.mathmode]</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.texter.decimal" title="Permalink to this definition">¶</a></dt>
<dd><p>Instances of this class create decimal formatted labels.</p>
<p>The strings <em>prefix</em>, <em>infix</em>, and <em>suffix</em> are added to the label at the
beginning, immediately after the plus or minus, and at the end, respectively.
<em>decimalsep</em>, <em>thousandsep</em>, and <em>thousandthpartsep</em> are strings used to
separate integer from fractional part and three-digit groups in the integer and
fractional part. The strings <em>plus</em> and <em>minus</em> are inserted in front of the
unsigned value for non-negative and negative numbers, respectively.</p>
<p>The format string <em>period</em> should generate a period. It must contain one string
insert operators <code class="docutils literal"><span class="pre">%s</span></code> for the period.</p>
<p><em>labelattrs</em> is a list of attributes to be added to the label attributes given
in the painter. It should be used to setup TeX features like <code class="docutils literal"><span class="pre">text.mathmode</span></code>.
Text format options like <code class="docutils literal"><span class="pre">text.size</span></code> should instead be set at the painter.</p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.texter.exponential">
<em class="property">class </em><code class="descclassname">graph.axis.texter.</code><code class="descname">exponential</code><span class="sig-paren">(</span><em>plus=""</em>, <em>minus="-"</em>, <em>mantissaexp=r"{{%s}\cdot10^{%s}}"</em>, <em>skipexp0=r"{%s}"</em>, <em>skipexp1=None</em>, <em>nomantissaexp=r"{10^{%s}}"</em>, <em>minusnomantissaexp=r"{-10^{%s}}"</em>, <em>mantissamin=tick.rational((1</em>, <em>1))</em>, <em>mantissamax=tick.rational((10L</em>, <em>1))</em>, <em>skipmantissa1=0</em>, <em>skipallmantissa1=1</em>, <em>mantissatexter=decimal()</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.texter.exponential" title="Permalink to this definition">¶</a></dt>
<dd><p>Instances of this class create decimal formatted labels with an exponential.</p>
<p>The strings <em>plus</em> and <em>minus</em> are inserted in front of the unsigned value of
the exponent.</p>
<p>The format string <em>mantissaexp</em> should generate the exponent. It must contain
two string insert operators <code class="docutils literal"><span class="pre">%s</span></code>, the first for the mantissa and the second
for the exponent. An alternative to the default is <code class="docutils literal"><span class="pre">r"{{%s}{\rm</span> <span class="pre">e}{%s}}"</span></code>.</p>
<p>The format string <em>skipexp0</em> is used to skip exponent <code class="docutils literal"><span class="pre">0</span></code> and must contain one
string insert operator <code class="docutils literal"><span class="pre">%s</span></code> for the mantissa. <code class="docutils literal"><span class="pre">None</span></code> turns off the special
handling of exponent <code class="docutils literal"><span class="pre">0</span></code>. The format string <em>skipexp1</em> is similar to
<em>skipexp0</em>, but for exponent <code class="docutils literal"><span class="pre">1</span></code>.</p>
<p>The format string <em>nomantissaexp</em> is used to skip the mantissa <code class="docutils literal"><span class="pre">1</span></code> and must
contain one string insert operator <code class="docutils literal"><span class="pre">%s</span></code> for the exponent. <code class="docutils literal"><span class="pre">None</span></code> turns off
the special handling of mantissa <code class="docutils literal"><span class="pre">1</span></code>. The format string <em>minusnomantissaexp</em>
is similar to <em>nomantissaexp</em>, but for mantissa <code class="docutils literal"><span class="pre">-1</span></code>.</p>
<p>The <code class="xref py py-class docutils literal"><span class="pre">tick.rational</span></code> instances <em>mantissamin*< *mantissamax</em> are minimum
(including) and maximum (excluding) of the mantissa.</p>
<p>The boolean <em>skipmantissa1</em> enables the skipping of any mantissa equals <code class="docutils literal"><span class="pre">1</span></code>
and <code class="docutils literal"><span class="pre">-1</span></code>, when <em>minusnomantissaexp</em> is set. When the boolean
<em>skipallmantissa1</em> is set, a mantissa equals <code class="docutils literal"><span class="pre">1</span></code> is skipped only, when all
mantissa values are <code class="docutils literal"><span class="pre">1</span></code>. Skipping of a mantissa is stronger than the skipping
of an exponent.</p>
<p><em>mantissatexter</em> is a texter instance for the mantissa.</p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.texter.mixed">
<em class="property">class </em><code class="descclassname">graph.axis.texter.</code><code class="descname">mixed</code><span class="sig-paren">(</span><em>smallestdecimal=tick.rational((1</em>, <em>1000))</em>, <em>biggestdecimal=tick.rational((9999</em>, <em>1))</em>, <em>equaldecision=1</em>, <em>decimal=decimal()</em>, <em>exponential=exponential()</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.texter.mixed" title="Permalink to this definition">¶</a></dt>
<dd><p>Instances of this class create decimal formatted labels with an exponential,
when the unsigned values are small or large compared to <em>1</em>.</p>
<p>The rational instances <em>smallestdecimal</em> and <em>biggestdecimal</em> are the smallest
and biggest decimal values, where the decimal texter should be used. The sign of
the value is ignored here. For a tick at zero the decimal texter is considered
best as well. <em>equaldecision</em> is a boolean to indicate whether the decision for
the decimal or exponential texter should be done globally for all ticks.</p>
<p><em>decimal</em> and <em>exponential</em> are a decimal and an exponential texter instance,
respectively.</p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.texter.rational">
<em class="property">class </em><code class="descclassname">graph.axis.texter.</code><code class="descname">rational</code><span class="sig-paren">(</span><em>prefix="", infix="", suffix="", numprefix="", numinfix="", numsuffix="", denomprefix="", denominfix="", denomsuffix="", plus="", minus="-", minuspos=0, over=r"%s\over%s", equaldenom=0, skip1=1, skipnum0=1, skipnum1=1, skipdenom1=1, labelattrs=[text.mathmode]</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.texter.rational" title="Permalink to this definition">¶</a></dt>
<dd><p>Instances of this class create labels formated as fractions.</p>
<p>The strings <em>prefix</em>, <em>infix</em>, and <em>suffix</em> are added to the label at the
beginning, immediately after the plus or minus, and at the end, respectively.
The strings <em>numprefix</em>, <em>numinfix</em>, and <em>numsuffix</em> are added to the labels
numerator accordingly whereas <em>denomprefix</em>, <em>denominfix</em>, and <em>denomsuffix</em> do
the same for the denominator.</p>
<p>The strings <em>plus</em> and <em>minus</em> are inserted in front of the unsigned value. The
position of the sign is defined by <em>minuspos</em> with values <code class="docutils literal"><span class="pre">1</span></code> (at the
numerator), <code class="docutils literal"><span class="pre">0</span></code> (in front of the fraction), and <code class="docutils literal"><span class="pre">-1</span></code> (at the denominator).</p>
<p>The format string <em>over</em> should generate the fraction. It must contain two
string insert operators <code class="docutils literal"><span class="pre">%s</span></code>, the first for the numerator and the second for
the denominator. An alternative to the default is <code class="docutils literal"><span class="pre">"{{%s}/{%s}}"</span></code>.</p>
<p>Usually, the numerator and denominator are canceled, while, when <em>equaldenom</em> is
set, the least common multiple of all denominators is used.</p>
<p>The boolean <em>skip1</em> indicates, that only the prefix, plus or minus, the infix
and the suffix should be printed, when the value is <code class="docutils literal"><span class="pre">1</span></code> or <code class="docutils literal"><span class="pre">-1</span></code> and at least
one of <em>prefix</em>, <em>infix</em> and <em>suffix</em> is present.</p>
<p>The boolean <em>skipnum0</em> indicates, that only a <code class="docutils literal"><span class="pre">0</span></code> is printed when the
numerator is zero.</p>
<p><em>skipnum1</em> is like <em>skip1</em> but for the numerator.</p>
<p><em>skipdenom1</em> skips the denominator, when it is <code class="docutils literal"><span class="pre">1</span></code> taking into account
<em>denomprefix</em>, <em>denominfix</em>, <em>denomsuffix</em> <em>minuspos</em> and the sign of the
number.</p>
<p><em>labelattrs</em> has the same meaning as for <em>decimal</em>.</p>
</dd></dl>
<span class="target" id="module-graph.axis.painter"></span></div>
<div class="section" id="module-graph-axis-painter-axes-painter">
<h2>Module <a class="reference internal" href="#module-graph.axis.painter" title="graph.axis.painter"><code class="xref py py-mod docutils literal"><span class="pre">graph.axis.painter</span></code></a>: Axes painter<a class="headerlink" href="#module-graph-axis-painter-axes-painter" title="Permalink to this headline">¶</a></h2>
<p>The following classes are part of the module <a class="reference internal" href="#module-graph.axis.painter" title="graph.axis.painter"><code class="xref py py-mod docutils literal"><span class="pre">graph.axis.painter</span></code></a>.
Instances of the painter classes can be passed to the painter keyword argument
of regular axes.</p>
<dl class="class">
<dt id="graph.axis.painter.rotatetext">
<em class="property">class </em><code class="descclassname">graph.axis.painter.</code><code class="descname">rotatetext</code><span class="sig-paren">(</span><em>direction</em>, <em>epsilon=1e-10</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.painter.rotatetext" title="Permalink to this definition">¶</a></dt>
<dd><p>This helper class is used in direction arguments of the painters below to
prevent axis labels and titles being written upside down. In those cases the
text will be rotated by 180 degrees. <em>direction</em> is an angle to be used relative
to the tick direction. <em>epsilon</em> is the value by which 90 degrees can be
exceeded before an 180 degree rotation is performed.</p>
</dd></dl>
<p>The following two class variables are initialized for the most common
applications:</p>
<dl class="attribute">
<dt id="graph.axis.painter.rotatetext.parallel">
<code class="descclassname">rotatetext.</code><code class="descname">parallel</code><a class="headerlink" href="#graph.axis.painter.rotatetext.parallel" title="Permalink to this definition">¶</a></dt>
<dd><p><code class="docutils literal"><span class="pre">rotatetext(90)</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="graph.axis.painter.rotatetext.orthogonal">
<code class="descclassname">rotatetext.</code><code class="descname">orthogonal</code><a class="headerlink" href="#graph.axis.painter.rotatetext.orthogonal" title="Permalink to this definition">¶</a></dt>
<dd><p><code class="docutils literal"><span class="pre">rotatetext(180)</span></code></p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.painter.ticklength">
<em class="property">class </em><code class="descclassname">graph.axis.painter.</code><code class="descname">ticklength</code><span class="sig-paren">(</span><em>initial</em>, <em>factor</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.painter.ticklength" title="Permalink to this definition">¶</a></dt>
<dd><p>This helper class provides changeable PyX lengths starting from an initial value
<em>initial</em> multiplied by <em>factor</em> again and again. The resulting lengths are thus
a geometric series.</p>
</dd></dl>
<p>There are some class variables initialized with suitable values for tick
stroking. They are named <code class="docutils literal"><span class="pre">ticklength.SHORT</span></code>, <code class="docutils literal"><span class="pre">ticklength.SHORt</span></code>, …,
<code class="docutils literal"><span class="pre">ticklength.short</span></code>, <code class="docutils literal"><span class="pre">ticklength.normal</span></code>, <code class="docutils literal"><span class="pre">ticklength.long</span></code>, …,
<code class="docutils literal"><span class="pre">ticklength.LONG</span></code>. <code class="docutils literal"><span class="pre">ticklength.normal</span></code> is initialized with a length of
<code class="docutils literal"><span class="pre">0.12</span></code> and the reciprocal of the golden mean as <code class="docutils literal"><span class="pre">factor</span></code> whereas the others
have a modified initial value obtained by multiplication with or division by
appropriate multiples of <span class="math">\(\sqrt{2}\)</span>.</p>
<dl class="class">
<dt id="graph.axis.painter.regular">
<em class="property">class </em><code class="descclassname">graph.axis.painter.</code><code class="descname">regular</code><span class="sig-paren">(</span><em>innerticklength=ticklength.normal</em>, <em>outerticklength=None</em>, <em>tickattrs=[]</em>, <em>gridattrs=None</em>, <em>basepathattrs=[]</em>, <em>labeldist="0.3 cm"</em>, <em>labelattrs=[]</em>, <em>labeldirection=None</em>, <em>labelhequalize=0</em>, <em>labelvequalize=1</em>, <em>titledist="0.3 cm"</em>, <em>titleattrs=[]</em>, <em>titledirection=rotatetext.parallel</em>, <em>titlepos=0.5</em>, <em>texrunner=None</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.painter.regular" title="Permalink to this definition">¶</a></dt>
<dd><p>Instances of this class are painters for regular axes like linear and
logarithmic axes.</p>
<p><em>innerticklength</em> and <em>outerticklength</em> are visual PyX lengths of the ticks,
subticks, subsubticks <em>etc.</em> plotted along the axis inside and outside of the
graph. Provide changeable attributes to modify the lengths of ticks compared to
subticks <em>etc.</em> <code class="docutils literal"><span class="pre">None</span></code> turns off the ticks inside and outside the graph,
respectively.</p>
<p><em>tickattrs</em> and <em>gridattrs</em> are changeable stroke attributes for the ticks and
the grid, where <code class="docutils literal"><span class="pre">None</span></code> turns off the feature. <em>basepathattrs</em> are stroke
attributes for the axis or <code class="docutils literal"><span class="pre">None</span></code> to turn it off. <em>basepathattrs</em> is merged
with <code class="docutils literal"><span class="pre">[style.linecap.square]</span></code>.</p>
<p><em>labeldist</em> is the distance of the labels from the axis base path as a visual
PyX length. <em>labelattrs</em> is a list of text attributes for the labels. It is
merged with <code class="docutils literal"><span class="pre">[text.halign.center,</span> <span class="pre">text.vshift.mathaxis]</span></code>. <em>labeldirection</em> is
an instance of <em>rotatetext</em> to rotate the labels relative to the axis tick
direction or <code class="docutils literal"><span class="pre">None</span></code>.</p>
<p>The boolean values <em>labelhequalize</em> and <em>labelvequalize</em> force an equal
alignment of all labels for straight vertical and horizontal axes, respectively.</p>
<p><em>titledist</em> is the distance of the title from the rest of the axis as a visual
PyX length. <em>titleattrs</em> is a list of text attributes for the title. It is
merged with <code class="docutils literal"><span class="pre">[text.halign.center,</span> <span class="pre">text.vshift.mathaxis]</span></code>. <em>titledirection</em> is
an instance of <em>rotatetext</em> to rotate the title relative to the axis tick
direction or <code class="docutils literal"><span class="pre">None</span></code>. <em>titlepos</em> is the position of the title in graph
coordinates.</p>
<p><em>texrunner</em> is the texrunner instance to create axis text like the axis title or
labels. When not set the texrunner of the graph instance is taken to create the
text.</p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.painter.linked">
<em class="property">class </em><code class="descclassname">graph.axis.painter.</code><code class="descname">linked</code><span class="sig-paren">(</span><em>innerticklength=ticklength.short</em>, <em>outerticklength=None</em>, <em>tickattrs=[]</em>, <em>gridattrs=None</em>, <em>basepathattrs=[]</em>, <em>labeldist="0.3 cm"</em>, <em>labelattrs=None</em>, <em>labeldirection=None</em>, <em>labelhequalize=0</em>, <em>labelvequalize=1</em>, <em>titledist="0.3 cm"</em>, <em>titleattrs=None</em>, <em>titledirection=rotatetext.parallel</em>, <em>titlepos=0.5</em>, <em>texrunner=None</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.painter.linked" title="Permalink to this definition">¶</a></dt>
<dd><p>This class is identical to <a class="reference internal" href="#graph.axis.painter.regular" title="graph.axis.painter.regular"><code class="xref py py-class docutils literal"><span class="pre">regular</span></code></a> up to the default values of
<em>labelattrs</em> and <em>titleattrs</em>. By turning off those features, this painter is
suitable for linked axes.</p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.painter.bar">
<em class="property">class </em><code class="descclassname">graph.axis.painter.</code><code class="descname">bar</code><span class="sig-paren">(</span><em>innerticklength=None</em>, <em>outerticklength=None</em>, <em>tickattrs=[]</em>, <em>basepathattrs=[]</em>, <em>namedist="0.3 cm"</em>, <em>nameattrs=[]</em>, <em>namedirection=None</em>, <em>namepos=0.5</em>, <em>namehequalize=0</em>, <em>namevequalize=1</em>, <em>titledist="0.3 cm"</em>, <em>titleattrs=[]</em>, <em>titledirection=rotatetext.parallel</em>, <em>titlepos=0.5</em>, <em>texrunner=None</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.painter.bar" title="Permalink to this definition">¶</a></dt>
<dd><p>Instances of this class are suitable painters for bar axes.</p>
<p><em>innerticklength</em> and <em>outerticklength</em> are visual PyX lengths to mark the
different bar regions along the axis inside and outside of the graph. <code class="docutils literal"><span class="pre">None</span></code>
turns off the ticks inside and outside the graph, respectively. <em>tickattrs</em> are
stroke attributes for the ticks or <code class="docutils literal"><span class="pre">None</span></code> to turn all ticks off.</p>
<p>The parameters with prefix <em>name</em> are identical to their <em>label</em> counterparts in
<a class="reference internal" href="#graph.axis.painter.regular" title="graph.axis.painter.regular"><code class="xref py py-class docutils literal"><span class="pre">regular</span></code></a>. All other parameters have the same meaning as in
<a class="reference internal" href="#graph.axis.painter.regular" title="graph.axis.painter.regular"><code class="xref py py-class docutils literal"><span class="pre">regular</span></code></a>.</p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.painter.linkedbar">
<em class="property">class </em><code class="descclassname">graph.axis.painter.</code><code class="descname">linkedbar</code><span class="sig-paren">(</span><em>innerticklength=None</em>, <em>outerticklength=None</em>, <em>tickattrs=[]</em>, <em>basepathattrs=[]</em>, <em>namedist="0.3 cm"</em>, <em>nameattrs=None</em>, <em>namedirection=None</em>, <em>namepos=0.5</em>, <em>namehequalize=0</em>, <em>namevequalize=1</em>, <em>titledist="0.3 cm"</em>, <em>titleattrs=None</em>, <em>titledirection=rotatetext.parallel</em>, <em>titlepos=0.5</em>, <em>texrunner=None</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.painter.linkedbar" title="Permalink to this definition">¶</a></dt>
<dd><p>This class is identical to <a class="reference internal" href="#graph.axis.painter.bar" title="graph.axis.painter.bar"><code class="xref py py-class docutils literal"><span class="pre">bar</span></code></a> up to the default values of <em>nameattrs</em>
and <em>titleattrs</em>. By turning off those features, this painter is suitable for
linked bar axes.</p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.painter.split">
<em class="property">class </em><code class="descclassname">graph.axis.painter.</code><code class="descname">split</code><span class="sig-paren">(</span><em>breaklinesdist="0.05 cm"</em>, <em>breaklineslength="0.5 cm"</em>, <em>breaklinesangle=-60</em>, <em>titledist="0.3 cm"</em>, <em>titleattrs=[]</em>, <em>titledirection=rotatetext.parallel</em>, <em>titlepos=0.5</em>, <em>texrunner=None</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.painter.split" title="Permalink to this definition">¶</a></dt>
<dd><p>Instances of this class are suitable painters for split axes.</p>
<p><em>breaklinesdist</em> and <em>breaklineslength</em> are the distance between axes break
markers in visual PyX lengths. <em>breaklinesangle</em> is the angle of the axis break
marker with respect to the base path of the axis. All other parameters have the
same meaning as in <a class="reference internal" href="#graph.axis.painter.regular" title="graph.axis.painter.regular"><code class="xref py py-class docutils literal"><span class="pre">regular</span></code></a>.</p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.painter.linkedsplit">
<em class="property">class </em><code class="descclassname">graph.axis.painter.</code><code class="descname">linkedsplit</code><span class="sig-paren">(</span><em>breaklinesdist="0.05 cm"</em>, <em>breaklineslength="0.5 cm"</em>, <em>breaklinesangle=-60</em>, <em>titledist="0.3 cm"</em>, <em>titleattrs=None</em>, <em>titledirection=rotatetext.parallel</em>, <em>titlepos=0.5</em>, <em>texrunner=None</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.painter.linkedsplit" title="Permalink to this definition">¶</a></dt>
<dd><p>This class is identical to <a class="reference internal" href="#graph.axis.painter.split" title="graph.axis.painter.split"><code class="xref py py-class docutils literal"><span class="pre">split</span></code></a> up to the default value of
<em>titleattrs</em>. By turning off this feature, this painter is suitable for linked
split axes.</p>
</dd></dl>
<span class="target" id="module-graph.axis.rater"></span></div>
<div class="section" id="module-graph-axis-rater-axes-rater">
<h2>Module <a class="reference internal" href="#module-graph.axis.rater" title="graph.axis.rater"><code class="xref py py-mod docutils literal"><span class="pre">graph.axis.rater</span></code></a>: Axes rater<a class="headerlink" href="#module-graph-axis-rater-axes-rater" title="Permalink to this headline">¶</a></h2>
<p>The rating of axes is implemented in <a class="reference internal" href="#module-graph.axis.rater" title="graph.axis.rater"><code class="xref py py-mod docutils literal"><span class="pre">graph.axis.rater</span></code></a>. When an axis
partitioning scheme returns several partitioning possibilities, the partitions
need to be rated by a positive number. The axis partitioning rated lowest is
considered best.</p>
<p>The rating consists of two steps. The first takes into account only the number
of ticks, subticks, labels and so on in comparison to optimal numbers.
Additionally, the extension of the axis range by ticks and labels is taken into
account. This rating leads to a preselection of possible partitions. In the
second step, after the layout of preferred partitionings has been calculated,
the distance of the labels in a partition is taken into account as well at a
smaller weight factor by default. Thereby partitions with overlapping labels
will be rejected completely. Exceptionally sparse or dense labels will receive a
bad rating as well.</p>
<dl class="class">
<dt id="graph.axis.rater.cube">
<em class="property">class </em><code class="descclassname">graph.axis.rater.</code><code class="descname">cube</code><span class="sig-paren">(</span><em>opt</em>, <em>left=None</em>, <em>right=None</em>, <em>weight=1</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.rater.cube" title="Permalink to this definition">¶</a></dt>
<dd><p>Instances of this class provide a number rater. <em>opt</em> is the optimal value. When
not provided, <em>left</em> is set to <code class="docutils literal"><span class="pre">0</span></code> and <em>right</em> is set to <code class="docutils literal"><span class="pre">3*opt</span></code>. Weight is
a multiplicator to the result.</p>
<p>The rater calculates <code class="docutils literal"><span class="pre">width*((x-opt)/(other-opt))**3</span></code> to rate the value <code class="docutils literal"><span class="pre">x</span></code>,
where <code class="docutils literal"><span class="pre">other</span></code> is <em>left</em> (<code class="docutils literal"><span class="pre">x``<*opt*)</span> <span class="pre">or</span> <span class="pre">*right*</span> <span class="pre">(``x</span></code>>*opt*).</p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.rater.distance">
<em class="property">class </em><code class="descclassname">graph.axis.rater.</code><code class="descname">distance</code><span class="sig-paren">(</span><em>opt</em>, <em>weight=0.1</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.rater.distance" title="Permalink to this definition">¶</a></dt>
<dd><p>Instances of this class provide a rater for a list of numbers. The purpose is to
rate the distance between label boxes. <em>opt</em> is the optimal value.</p>
<p>The rater calculates the sum of <code class="docutils literal"><span class="pre">weight*(opt/x-1)</span></code> (<code class="docutils literal"><span class="pre">x``<*opt*)</span> <span class="pre">or</span>
<span class="pre">``weight*(x/opt-1)</span></code> (<code class="docutils literal"><span class="pre">x</span></code>>*opt*) for all elements <code class="docutils literal"><span class="pre">x</span></code> of the list. It
returns this value divided by the number of elements in the list.</p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.rater.rater">
<em class="property">class </em><code class="descclassname">graph.axis.rater.</code><code class="descname">rater</code><span class="sig-paren">(</span><em>ticks</em>, <em>labels</em>, <em>range</em>, <em>distance</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.rater.rater" title="Permalink to this definition">¶</a></dt>
<dd><p>Instances of this class are raters for axes partitionings.</p>
<p><em>ticks</em> and <em>labels</em> are both lists of number rater instances, where the first
items are used for the number of ticks and labels, the second items are used for
the number of subticks (including the ticks) and sublabels (including the
labels) and so on until the end of the list is reached or no corresponding ticks
are available.</p>
<p><em>range</em> is a number rater instance which rates the range of the ticks relative
to the range of the data.</p>
<p><em>distance</em> is an distance rater instance.</p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.rater.linear">
<em class="property">class </em><code class="descclassname">graph.axis.rater.</code><code class="descname">linear</code><span class="sig-paren">(</span><em>ticks=[cube(4), cube(10, weight=0.5)], labels=[cube(4)], range=cube(1, weight=2), distance=distance("1 cm")</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.rater.linear" title="Permalink to this definition">¶</a></dt>
<dd><p>This class is suitable to rate partitionings of linear axes. It is equal to
<a class="reference internal" href="#graph.axis.rater.rater" title="graph.axis.rater.rater"><code class="xref py py-class docutils literal"><span class="pre">rater</span></code></a> but defines predefined values for the arguments.</p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.rater.lin">
<em class="property">class </em><code class="descclassname">graph.axis.rater.</code><code class="descname">lin</code><span class="sig-paren">(</span><em>...</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.rater.lin" title="Permalink to this definition">¶</a></dt>
<dd><p>This class is an abbreviation of <a class="reference internal" href="#graph.axis.rater.linear" title="graph.axis.rater.linear"><code class="xref py py-class docutils literal"><span class="pre">linear</span></code></a> described above.</p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.rater.logarithmic">
<em class="property">class </em><code class="descclassname">graph.axis.rater.</code><code class="descname">logarithmic</code><span class="sig-paren">(</span><em>ticks=[cube(5, right=20), cube(20, right=100, weight=0.5)], labels=[cube(5, right=20), cube(5, right=20, weight=0.5)], range=cube(1, weight=2), distance=distance("1 cm")</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.rater.logarithmic" title="Permalink to this definition">¶</a></dt>
<dd><p>This class is suitable to rate partitionings of logarithmic axes. It is equal to
<a class="reference internal" href="#graph.axis.rater.rater" title="graph.axis.rater.rater"><code class="xref py py-class docutils literal"><span class="pre">rater</span></code></a> but defines predefined values for the arguments.</p>
</dd></dl>
<dl class="class">
<dt id="graph.axis.rater.log">
<em class="property">class </em><code class="descclassname">graph.axis.rater.</code><code class="descname">log</code><span class="sig-paren">(</span><em>...</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.rater.log" title="Permalink to this definition">¶</a></dt>
<dd><p>This class is an abbreviation of <a class="reference internal" href="#graph.axis.rater.logarithmic" title="graph.axis.rater.logarithmic"><code class="xref py py-class docutils literal"><span class="pre">logarithmic</span></code></a> described above.</p>
</dd></dl>
<span class="target" id="module-graph.axis.positioners"></span></div>
<div class="section" id="module-graph-axis-positioner-axes-positioners">
<h2>Module <code class="xref py py-mod docutils literal"><span class="pre">graph.axis.positioner</span></code>: Axes positioners<a class="headerlink" href="#module-graph-axis-positioner-axes-positioners" title="Permalink to this headline">¶</a></h2>
<p>The position of an axis is defined by an instance of a class providing the
following methods:</p>
<dl class="class">
<dt id="graph.axis.positioners.positioner">
<em class="property">class </em><code class="descclassname">graph.axis.positioners.</code><code class="descname">positioner</code><a class="headerlink" href="#graph.axis.positioners.positioner" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="graph.axis.positioners.positioner.vbasepath">
<code class="descclassname">positioner.</code><code class="descname">vbasepath</code><span class="sig-paren">(</span><em>v1=None</em>, <em>v2=None</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.positioners.positioner.vbasepath" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a path instance for the base path. <em>v1</em> and <em>v2</em> define the axis range
in graph coordinates the base path should cover.</p>
</dd></dl>
<dl class="method">
<dt id="graph.axis.positioners.positioner.vgridpath">
<code class="descclassname">positioner.</code><code class="descname">vgridpath</code><span class="sig-paren">(</span><em>v</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.positioners.positioner.vgridpath" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a path instance for the grid path at position <em>v</em> in graph coordinates.
The method might return <code class="docutils literal"><span class="pre">None</span></code> when no grid path is available (for an axis
along a path for example).</p>
</dd></dl>
<dl class="method">
<dt id="graph.axis.positioners.positioner.vtickpoint_pt">
<code class="descclassname">positioner.</code><code class="descname">vtickpoint_pt</code><span class="sig-paren">(</span><em>v</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.positioners.positioner.vtickpoint_pt" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the position of <em>v</em> in graph coordinates as a tuple <code class="docutils literal"><span class="pre">(x,</span> <span class="pre">y)</span></code> in
points.</p>
</dd></dl>
<dl class="method">
<dt id="graph.axis.positioners.positioner.vtickdirection">
<code class="descclassname">positioner.</code><code class="descname">vtickdirection</code><span class="sig-paren">(</span><em>v</em><span class="sig-paren">)</span><a class="headerlink" href="#graph.axis.positioners.positioner.vtickdirection" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the direction of a tick at <em>v</em> in graph coordinates as a tuple <code class="docutils literal"><span class="pre">(dx,</span>
<span class="pre">dy)</span></code>. The tick direction points inside of the graph.</p>
</dd></dl>
<p>The module contains several implementations of those positioners, but since the
positioner instances are created by graphs etc. as needed, the details are not
interesting for the average PyX user.</p>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<div class="sidebarbox">
<h3><a href="manual.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Axes</a><ul>
<li><a class="reference internal" href="#component-architecture">Component architecture</a></li>
<li><a class="reference internal" href="#module-graph-axis-axis-axes">Module <code class="docutils literal"><span class="pre">graph.axis.axis</span></code>: Axes</a></li>
<li><a class="reference internal" href="#module-graph-axis-tick-axes-ticks">Module <code class="docutils literal"><span class="pre">graph.axis.tick</span></code>: Axes ticks</a></li>
<li><a class="reference internal" href="#module-graph-axis-parter-axes-partitioners">Module <code class="docutils literal"><span class="pre">graph.axis.parter</span></code>: Axes partitioners</a></li>
<li><a class="reference internal" href="#module-graph-axis-texter-axes-texter">Module <code class="docutils literal"><span class="pre">graph.axis.texter</span></code>: Axes texter</a></li>
<li><a class="reference internal" href="#module-graph-axis-painter-axes-painter">Module <code class="docutils literal"><span class="pre">graph.axis.painter</span></code>: Axes painter</a></li>
<li><a class="reference internal" href="#module-graph-axis-rater-axes-rater">Module <code class="docutils literal"><span class="pre">graph.axis.rater</span></code>: Axes rater</a></li>
<li><a class="reference internal" href="#module-graph-axis-positioner-axes-positioners">Module <code class="docutils literal"><span class="pre">graph.axis.positioner</span></code>: Axes positioners</a></li>
</ul>
</li>
</ul>
</div>
<div class="sidebarbox">
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/axis.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div></div>
<div class="sidebarbox">
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script></div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="relatedbottom">
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="box.html" title="Module box: Convex box handling"
>next</a> |</li>
<li class="right" >
<a href="graph.html" title="Graphs"
>previous</a> |</li>
<li><a href="http://pyx.sourceforge.net">PyX Homepage</a> »</li>
<li><a href="manual.html">PyX 0.14.1 Manual</a> »</li>
<li>Axes</li>
</ul>
</div>
</div>
<div class="footer">
© Copyright 2017, Jörg Lehmann, Michael Schindler, André Wobst.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.5.
</div>
</body>
</html>
|