This file is indexed.

/usr/share/doc/python-pyx-doc/manual/axis.html is in python-pyx-doc 0.12.1-2.

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
<!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 &mdash; PyX 0.12.1 Manual</title>
    
    <link rel="stylesheet" href="_static/default.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.12.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </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>
    <link rel="top" title="PyX 0.12.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="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="manual.html">PyX 0.12.1 Manual</a> &raquo;</li> 
      </ul>
    </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 &#8220;parter&#8221; 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
<tt class="file docutils literal"><span class="pre">graph/axis</span></tt> 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-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">pyx</span> <span class="kn">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="c"># and the like</span>

<span class="kn">from</span> <span class="nn">pyx.graph</span> <span class="kn">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="c"># 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"><tt class="xref py py-mod docutils literal"><span class="pre">graph.axis.axis</span></tt></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"><tt class="xref py py-mod docutils literal"><span class="pre">graph.axis.axis</span></tt></a>. However,
there is a shortcut to access those classes via <tt class="docutils literal"><span class="pre">graph.axis</span></tt> 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><tt class="descclassname">graph.axis.axis.</tt><tt class="descname">linear</tt><big>(</big><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><span class="optional">[</span><span class="optional">]</span>, <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><big>)</big><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
<tt class="xref py py-class docutils literal"><span class="pre">function</span></tt> 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 <tt class="xref py py-meth docutils literal"><span class="pre">createlinked()</span></tt>
method.</p>
</dd></dl>

<dl class="class">
<dt id="graph.axis.axis.lin">
<em class="property">class </em><tt class="descclassname">graph.axis.axis.</tt><tt class="descname">lin</tt><big>(</big><em>...</em><big>)</big><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"><tt class="xref py py-class docutils literal"><span class="pre">linear</span></tt></a> described above.</p>
</dd></dl>

<dl class="class">
<dt id="graph.axis.axis.logarithmic">
<em class="property">class </em><tt class="descclassname">graph.axis.axis.</tt><tt class="descname">logarithmic</tt><big>(</big><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><span class="optional">[</span><span class="optional">]</span>, <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><big>)</big><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"><tt class="xref py py-class docutils literal"><span class="pre">linear</span></tt></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><tt class="descclassname">graph.axis.axis.</tt><tt class="descname">log</tt><big>(</big><em>...</em><big>)</big><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"><tt class="xref py py-class docutils literal"><span class="pre">logarithmic</span></tt></a> described above.</p>
</dd></dl>

<dl class="class">
<dt id="graph.axis.axis.bar">
<em class="property">class </em><tt class="descclassname">graph.axis.axis.</tt><tt class="descname">bar</tt><big>(</big><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><big>)</big><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
<tt class="docutils literal"><span class="pre">0.5</span></tt> 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 <tt class="docutils literal"><span class="pre">None</span></tt>, 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 <tt class="xref py py-meth docutils literal"><span class="pre">createlinked()</span></tt> method.</p>
</dd></dl>

<dl class="class">
<dt id="graph.axis.axis.nestedbar">
<em class="property">class </em><tt class="descclassname">graph.axis.axis.</tt><tt class="descname">nestedbar</tt><big>(</big><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><big>)</big><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><tt class="descclassname">graph.axis.axis.</tt><tt class="descname">split</tt><big>(</big><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><big>)</big><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
<tt class="xref py py-class docutils literal"><span class="pre">sizedlinear</span></tt> and <tt class="xref py py-class docutils literal"><span class="pre">autosizedlinear</span></tt> do that for linear axes. Their
short names are <tt class="xref py py-class docutils literal"><span class="pre">sizedlin</span></tt> and <tt class="xref py py-class docutils literal"><span class="pre">autosizedlin</span></tt>.
<tt class="xref py py-class docutils literal"><span class="pre">sizedlinear</span></tt> extends the usual linear axis by an first argument <em>size</em>.
<tt class="xref py py-class docutils literal"><span class="pre">autosizedlinear</span></tt> creates the size out of its data range automatically
but sets an <tt class="xref py py-class docutils literal"><span class="pre">autolinear</span></tt> parter with <em>extendtick</em> being <tt class="docutils literal"><span class="pre">None</span></tt> in order
to disable automatic range modifications while painting the axis.</p>
<p>The <tt class="xref py py-mod docutils literal"><span class="pre">axis</span></tt> 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&#8217;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><tt class="descclassname">graph.axis.axis.</tt><tt class="descname">anchoredaxis</tt><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">
<tt class="descclassname">anchoredaxis.</tt><tt class="descname">basepath</tt><big>(</big><em>x1=None</em>, <em>x2=None</em><big>)</big><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 <tt class="docutils literal"><span class="pre">None</span></tt> 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 <tt class="docutils literal"><span class="pre">None</span></tt> 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">
<tt class="descclassname">anchoredaxis.</tt><tt class="descname">vbasepath</tt><big>(</big><em>v1=None</em>, <em>v2=None</em><big>)</big><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"><tt class="xref py py-meth docutils literal"><span class="pre">basepath()</span></tt></a> but in graph coordinates.</p>
</dd></dl>

<dl class="method">
<dt id="graph.axis.axis.anchoredaxis.gridpath">
<tt class="descclassname">anchoredaxis.</tt><tt class="descname">gridpath</tt><big>(</big><em>x</em><big>)</big><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 <tt class="docutils literal"><span class="pre">None</span></tt>
when no grid path is available.</p>
</dd></dl>

<dl class="method">
<dt id="graph.axis.axis.anchoredaxis.vgridpath">
<tt class="descclassname">anchoredaxis.</tt><tt class="descname">vgridpath</tt><big>(</big><em>v</em><big>)</big><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"><tt class="xref py py-meth docutils literal"><span class="pre">gridpath()</span></tt></a> but in graph coordinates.</p>
</dd></dl>

<dl class="method">
<dt id="graph.axis.axis.anchoredaxis.tickpoint">
<tt class="descclassname">anchoredaxis.</tt><tt class="descname">tickpoint</tt><big>(</big><em>x</em><big>)</big><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 <tt class="docutils literal"><span class="pre">(x,</span> <span class="pre">y)</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="graph.axis.axis.anchoredaxis.vtickpoint">
<tt class="descclassname">anchoredaxis.</tt><tt class="descname">vtickpoint</tt><big>(</big><em>v</em><big>)</big><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"><tt class="xref py py-meth docutils literal"><span class="pre">tickpoint()</span></tt></a> but in graph coordinates.</p>
</dd></dl>

<dl class="method">
<dt id="graph.axis.axis.anchoredaxis.tickdirection">
<tt class="descclassname">anchoredaxis.</tt><tt class="descname">tickdirection</tt><big>(</big><em>x</em><big>)</big><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 <tt class="docutils literal"><span class="pre">(dx,</span> <span class="pre">dy)</span></tt>. The tick
direction points inside of the graph.</p>
</dd></dl>

<dl class="method">
<dt id="graph.axis.axis.anchoredaxis.vtickdirection">
<tt class="descclassname">anchoredaxis.</tt><tt class="descname">vtickdirection</tt><big>(</big><em>v</em><big>)</big><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"><tt class="xref py py-meth docutils literal"><span class="pre">tickdirection()</span></tt></a> but in graph coordinates.</p>
</dd></dl>

<dl class="method">
<dt>
<tt class="descclassname">anchoredaxis.</tt><tt class="descname">vtickdirection</tt><big>(</big><em>v</em><big>)</big></dt>
<dd><p>Like <a class="reference internal" href="#graph.axis.axis.anchoredaxis.tickdirection" title="graph.axis.axis.anchoredaxis.tickdirection"><tt class="xref py py-meth docutils literal"><span class="pre">tickdirection()</span></tt></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"><tt class="xref py py-class docutils literal"><span class="pre">linkedaxis</span></tt></a> and
<a class="reference internal" href="#graph.axis.axis.anchoredpathaxis" title="graph.axis.axis.anchoredpathaxis"><tt class="xref py py-class docutils literal"><span class="pre">anchoredpathaxis</span></tt></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><tt class="descclassname">graph.axis.axis.</tt><tt class="descname">linkedaxis</tt><big>(</big><em>linkedaxis=None</em>, <em>errorname=&quot;manual-linked&quot;</em>, <em>painter=_marker</em><big>)</big><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"><tt class="xref py py-meth docutils literal"><span class="pre">setlinkedaxis()</span></tt></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">
<tt class="descclassname">linkedaxis.</tt><tt class="descname">setlinkedaxis</tt><big>(</big><em>linkedaxis</em><big>)</big><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><tt class="descclassname">graph.axis.axis.</tt><tt class="descname">anchoredpathaxis</tt><big>(</big><em>path</em>, <em>axis</em>, <em>direction=1</em><big>)</big><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 <tt class="docutils literal"><span class="pre">1</span></tt> (left) and <tt class="docutils literal"><span class="pre">-1</span></tt> (right).</p>
</dd></dl>

<p>The <a class="reference internal" href="#graph.axis.axis.anchoredpathaxis" title="graph.axis.axis.anchoredpathaxis"><tt class="xref py py-class docutils literal"><span class="pre">anchoredpathaxis</span></tt></a> contains as any anchored axis after calling its
<tt class="xref py py-meth docutils literal"><span class="pre">create()</span></tt> method the painted axis in the <a class="reference internal" href="canvas.html#module-canvas" title="canvas"><tt class="xref py py-attr docutils literal"><span class="pre">canvas</span></tt></a> member attribute.
The function <tt class="xref py py-func docutils literal"><span class="pre">pathaxis()</span></tt> has the same signature like the
<a class="reference internal" href="#graph.axis.axis.anchoredpathaxis" title="graph.axis.axis.anchoredpathaxis"><tt class="xref py py-class docutils literal"><span class="pre">anchoredpathaxis</span></tt></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"><tt class="xref py py-mod docutils literal"><span class="pre">graph.axis.tick</span></tt></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"><tt class="xref py py-mod docutils literal"><span class="pre">graph.axis.tick</span></tt></a>.</p>
<dl class="class">
<dt id="graph.axis.tick.rational">
<em class="property">class </em><tt class="descclassname">graph.axis.tick.</tt><tt class="descname">rational</tt><big>(</big><em>x</em>, <em>power=1</em>, <em>floatprecision=10</em><big>)</big><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 <tt class="docutils literal"><span class="pre">num</span></tt> and a denominator <tt class="docutils literal"><span class="pre">denom</span></tt>. 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 <tt class="docutils literal"><span class="pre">&quot;1/3&quot;</span></tt>.</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 <tt class="docutils literal"><span class="pre">num</span></tt> and <tt class="docutils literal"><span class="pre">denom</span></tt> like</dt>
<dd><blockquote class="first">
<div><p><a class="reference internal" href="#graph.axis.tick.rational" title="graph.axis.tick.rational"><tt class="xref py py-class docutils literal"><span class="pre">rational</span></tt></a> itself.</p>
</div></blockquote>
<p class="last"><em>power</em> is an integer to calculate <tt class="docutils literal"><span class="pre">x**power</span></tt>. 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><tt class="descclassname">graph.axis.tick.</tt><tt class="descname">tick</tt><big>(</big><em>x</em>, <em>ticklevel=0</em>, <em>labellevel=0</em>, <em>label=None</em>, <em>labelattrs=</em><span class="optional">[</span><span class="optional">]</span>, <em>power=1</em>, <em>floatprecision=10</em><big>)</big><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 <tt class="docutils literal"><span class="pre">manualticks</span></tt> 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"><tt class="xref py py-class docutils literal"><span class="pre">rational</span></tt></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 <tt class="docutils literal"><span class="pre">0</span></tt> means a regular tick or label,
<tt class="docutils literal"><span class="pre">1</span></tt> stands for a subtick or sublabel, <tt class="docutils literal"><span class="pre">2</span></tt> for subsubtick or subsublabel and
so on. <tt class="docutils literal"><span class="pre">None</span></tt> 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"><tt class="xref py py-mod docutils literal"><span class="pre">graph.axis.parter</span></tt></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"><tt class="xref py py-mod docutils literal"><span class="pre">graph.axis.parter</span></tt></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><tt class="descclassname">graph.axis.parter.</tt><tt class="descname">linear</tt><big>(</big><em>tickdists=None</em>, <em>labeldists=None</em>, <em>extendtick=0</em>, <em>extendlabel=None</em>, <em>epsilon=1e-10</em><big>)</big><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 <tt class="docutils literal"><span class="pre">[2,</span> <span class="pre">1]</span></tt> 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
<tt class="xref py py-class docutils literal"><span class="pre">tick</span></tt>.</p>
<p><em>labeldists</em> works equally for placing labels. When <em>labeldists</em> is kept
<tt class="docutils literal"><span class="pre">None</span></tt>, 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 <tt class="docutils literal"><span class="pre">None</span></tt> 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><tt class="descclassname">graph.axis.parter.</tt><tt class="descname">lin</tt><big>(</big><em>...</em><big>)</big><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"><tt class="xref py py-class docutils literal"><span class="pre">linear</span></tt></a> described above.</p>
</dd></dl>

<dl class="class">
<dt id="graph.axis.parter.autolinear">
<em class="property">class </em><tt class="descclassname">graph.axis.parter.</tt><tt class="descname">autolinear</tt><big>(</big><em>variants=defaultvariants</em>, <em>extendtick=0</em>, <em>epsilon=1e-10</em><big>)</big><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"><tt class="xref py py-class docutils literal"><span class="pre">linear</span></tt></a>. Further
variants are build out of these by multiplying or dividing all the values by
multiples of <tt class="docutils literal"><span class="pre">10</span></tt>. <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"><tt class="xref py py-class docutils literal"><span class="pre">linear</span></tt></a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="graph.axis.parter.autolinear.defaultvariants">
<tt class="descclassname">autolinear.</tt><tt class="descname">defaultvariants</tt><a class="headerlink" href="#graph.axis.parter.autolinear.defaultvariants" title="Permalink to this definition"></a></dt>
<dd><p><tt 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></tt></p>
</dd></dl>

<dl class="class">
<dt id="graph.axis.parter.autolin">
<em class="property">class </em><tt class="descclassname">graph.axis.parter.</tt><tt class="descname">autolin</tt><big>(</big><em>...</em><big>)</big><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"><tt class="xref py py-class docutils literal"><span class="pre">autolinear</span></tt></a> described above.</p>
</dd></dl>

<dl class="class">
<dt id="graph.axis.parter.preexp">
<em class="property">class </em><tt class="descclassname">graph.axis.parter.</tt><tt class="descname">preexp</tt><big>(</big><em>pres</em>, <em>exp</em><big>)</big><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><tt class="descclassname">graph.axis.parter.</tt><tt class="descname">logarithmic</tt><big>(</big><em>tickpreexps=None</em>, <em>labelpreexps=None</em>, <em>extendtick=0</em>, <em>extendlabel=None</em>, <em>epsilon=1e-10</em><big>)</big><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"><tt class="xref py py-class docutils literal"><span class="pre">preexp</span></tt></a> instances.</p>
<p><em>labelpreexps</em> works equally for placing labels. When <em>labelpreexps</em> is kept
<tt class="docutils literal"><span class="pre">None</span></tt>, 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"><tt class="xref py py-class docutils literal"><span class="pre">linear</span></tt></a>.</p>
</dd></dl>

<p>Some <a class="reference internal" href="#graph.axis.parter.preexp" title="graph.axis.parter.preexp"><tt class="xref py py-class docutils literal"><span class="pre">preexp</span></tt></a> instances for the use in <a class="reference internal" href="#graph.axis.parter.logarithmic" title="graph.axis.parter.logarithmic"><tt class="xref py py-class docutils literal"><span class="pre">logarithmic</span></tt></a> are available
as instance variables (should be used read-only):</p>
<dl class="attribute">
<dt id="graph.axis.parter.logarithmic.pre1exp5">
<tt class="descclassname">logarithmic.</tt><tt class="descname">pre1exp5</tt><a class="headerlink" href="#graph.axis.parter.logarithmic.pre1exp5" title="Permalink to this definition"></a></dt>
<dd><p><tt class="docutils literal"><span class="pre">preexp([tick.rational((1,</span> <span class="pre">1))],</span> <span class="pre">100000)</span></tt></p>
</dd></dl>

<dl class="attribute">
<dt id="graph.axis.parter.logarithmic.pre1exp4">
<tt class="descclassname">logarithmic.</tt><tt class="descname">pre1exp4</tt><a class="headerlink" href="#graph.axis.parter.logarithmic.pre1exp4" title="Permalink to this definition"></a></dt>
<dd><p><tt class="docutils literal"><span class="pre">preexp([tick.rational((1,</span> <span class="pre">1))],</span> <span class="pre">10000)</span></tt></p>
</dd></dl>

<dl class="attribute">
<dt id="graph.axis.parter.logarithmic.pre1exp3">
<tt class="descclassname">logarithmic.</tt><tt class="descname">pre1exp3</tt><a class="headerlink" href="#graph.axis.parter.logarithmic.pre1exp3" title="Permalink to this definition"></a></dt>
<dd><p><tt class="docutils literal"><span class="pre">preexp([tick.rational((1,</span> <span class="pre">1))],</span> <span class="pre">1000)</span></tt></p>
</dd></dl>

<dl class="attribute">
<dt id="graph.axis.parter.logarithmic.pre1exp2">
<tt class="descclassname">logarithmic.</tt><tt class="descname">pre1exp2</tt><a class="headerlink" href="#graph.axis.parter.logarithmic.pre1exp2" title="Permalink to this definition"></a></dt>
<dd><p><tt class="docutils literal"><span class="pre">preexp([tick.rational((1,</span> <span class="pre">1))],</span> <span class="pre">100)</span></tt></p>
</dd></dl>

<dl class="attribute">
<dt id="graph.axis.parter.logarithmic.pre1exp">
<tt class="descclassname">logarithmic.</tt><tt class="descname">pre1exp</tt><a class="headerlink" href="#graph.axis.parter.logarithmic.pre1exp" title="Permalink to this definition"></a></dt>
<dd><p><tt class="docutils literal"><span class="pre">preexp([tick.rational((1,</span> <span class="pre">1))],</span> <span class="pre">10)</span></tt></p>
</dd></dl>

<dl class="attribute">
<dt id="graph.axis.parter.logarithmic.pre125exp">
<tt class="descclassname">logarithmic.</tt><tt class="descname">pre125exp</tt><a class="headerlink" href="#graph.axis.parter.logarithmic.pre125exp" title="Permalink to this definition"></a></dt>
<dd><p><tt 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></tt></p>
</dd></dl>

<dl class="attribute">
<dt id="graph.axis.parter.logarithmic.pre1to9exp">
<tt class="descclassname">logarithmic.</tt><tt class="descname">pre1to9exp</tt><a class="headerlink" href="#graph.axis.parter.logarithmic.pre1to9exp" title="Permalink to this definition"></a></dt>
<dd><p><tt 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></tt></p>
</dd></dl>

<dl class="class">
<dt id="graph.axis.parter.log">
<em class="property">class </em><tt class="descclassname">graph.axis.parter.</tt><tt class="descname">log</tt><big>(</big><em>...</em><big>)</big><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"><tt class="xref py py-class docutils literal"><span class="pre">logarithmic</span></tt></a> described above.</p>
</dd></dl>

<dl class="class">
<dt id="graph.axis.parter.autologarithmic">
<em class="property">class </em><tt class="descclassname">graph.axis.parter.</tt><tt class="descname">autologarithmic</tt><big>(</big><em>variants=defaultvariants</em>, <em>extendtick=0</em>, <em>extendlabel=None</em>, <em>epsilon=1e-10</em><big>)</big><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"><tt class="xref py py-class docutils literal"><span class="pre">logarithmic</span></tt></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"><tt class="xref py py-class docutils literal"><span class="pre">linear</span></tt></a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="graph.axis.parter.autologarithmic.defaultvariants">
<tt class="descclassname">autologarithmic.</tt><tt class="descname">defaultvariants</tt><a class="headerlink" href="#graph.axis.parter.autologarithmic.defaultvariants" title="Permalink to this definition"></a></dt>
<dd><p><tt 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></tt></p>
</dd></dl>

<dl class="class">
<dt id="graph.axis.parter.autolog">
<em class="property">class </em><tt class="descclassname">graph.axis.parter.</tt><tt class="descname">autolog</tt><big>(</big><em>...</em><big>)</big><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"><tt class="xref py py-class docutils literal"><span class="pre">autologarithmic</span></tt></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"><tt class="xref py py-mod docutils literal"><span class="pre">graph.axis.texter</span></tt></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"><tt class="xref py py-mod docutils literal"><span class="pre">graph.axis.texter</span></tt></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><tt class="descclassname">graph.axis.texter.</tt><tt class="descname">decimal</tt><big>(</big><em>prefix=&quot;&quot;, infix=&quot;&quot;, suffix=&quot;&quot;, equalprecision=0, decimalsep=&quot;.&quot;, thousandsep=&quot;&quot;, thousandthpartsep=&quot;&quot;, plus=&quot;&quot;, minus=&quot;-&quot;, period=r&quot;\overline{%s}&quot;, labelattrs=[text.mathmode]</em><big>)</big><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 <tt class="docutils literal"><span class="pre">%s</span></tt> 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 <tt class="docutils literal"><span class="pre">text.mathmode</span></tt>.
Text format options like <tt class="docutils literal"><span class="pre">text.size</span></tt> should instead be set at the painter.</p>
</dd></dl>

<dl class="class">
<dt id="graph.axis.texter.exponential">
<em class="property">class </em><tt class="descclassname">graph.axis.texter.</tt><tt class="descname">exponential</tt><big>(</big><em>plus=&quot;&quot;</em>, <em>minus=&quot;-&quot;</em>, <em>mantissaexp=r&quot;{{%s}\cdot10^{%s}}&quot;</em>, <em>skipexp0=r&quot;{%s}&quot;</em>, <em>skipexp1=None</em>, <em>nomantissaexp=r&quot;{10^{%s}}&quot;</em>, <em>minusnomantissaexp=r&quot;{-10^{%s}}&quot;</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><big>)</big><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 <tt class="docutils literal"><span class="pre">%s</span></tt>, the first for the mantissa and the second
for the exponent. An alternative to the default is <tt class="docutils literal"><span class="pre">r&quot;{{%s}{\rm</span> <span class="pre">e}{%s}}&quot;</span></tt>.</p>
<p>The format string <em>skipexp0</em> is used to skip exponent <tt class="docutils literal"><span class="pre">0</span></tt> and must contain one
string insert operator <tt class="docutils literal"><span class="pre">%s</span></tt> for the mantissa. <tt class="docutils literal"><span class="pre">None</span></tt> turns off the special
handling of exponent <tt class="docutils literal"><span class="pre">0</span></tt>. The format string <em>skipexp1</em> is similar to
<em>skipexp0</em>, but for exponent <tt class="docutils literal"><span class="pre">1</span></tt>.</p>
<p>The format string <em>nomantissaexp</em> is used to skip the mantissa <tt class="docutils literal"><span class="pre">1</span></tt> and must
contain one string insert operator <tt class="docutils literal"><span class="pre">%s</span></tt> for the exponent. <tt class="docutils literal"><span class="pre">None</span></tt> turns off
the special handling of mantissa <tt class="docutils literal"><span class="pre">1</span></tt>. The format string <em>minusnomantissaexp</em>
is similar to <em>nomantissaexp</em>, but for mantissa <tt class="docutils literal"><span class="pre">-1</span></tt>.</p>
<p>The <tt class="xref py py-class docutils literal"><span class="pre">tick.rational</span></tt> instances <em>mantissamin*&lt; *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 <tt class="docutils literal"><span class="pre">1</span></tt>
and <tt class="docutils literal"><span class="pre">-1</span></tt>, when <em>minusnomantissaexp</em> is set. When the boolean
<em>skipallmantissa1</em> is set, a mantissa equals <tt class="docutils literal"><span class="pre">1</span></tt> is skipped only, when all
mantissa values are <tt class="docutils literal"><span class="pre">1</span></tt>. 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><tt class="descclassname">graph.axis.texter.</tt><tt class="descname">mixed</tt><big>(</big><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><big>)</big><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><tt class="descclassname">graph.axis.texter.</tt><tt class="descname">rational</tt><big>(</big><em>prefix=&quot;&quot;, infix=&quot;&quot;, suffix=&quot;&quot;, numprefix=&quot;&quot;, numinfix=&quot;&quot;, numsuffix=&quot;&quot;, denomprefix=&quot;&quot;, denominfix=&quot;&quot;, denomsuffix=&quot;&quot;, plus=&quot;&quot;, minus=&quot;-&quot;, minuspos=0, over=r&quot;%s\over%s&quot;, equaldenom=0, skip1=1, skipnum0=1, skipnum1=1, skipdenom1=1, labelattrs=[text.mathmode]</em><big>)</big><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 <tt class="docutils literal"><span class="pre">1</span></tt> (at the
numerator), <tt class="docutils literal"><span class="pre">0</span></tt> (in front of the fraction), and <tt class="docutils literal"><span class="pre">-1</span></tt> (at the denominator).</p>
<p>The format string <em>over</em> should generate the fraction. It must contain two
string insert operators <tt class="docutils literal"><span class="pre">%s</span></tt>, the first for the numerator and the second for
the denominator. An alternative to the default is <tt class="docutils literal"><span class="pre">&quot;{{%s}/{%s}}&quot;</span></tt>.</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 <tt class="docutils literal"><span class="pre">1</span></tt> or <tt class="docutils literal"><span class="pre">-1</span></tt> 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 <tt class="docutils literal"><span class="pre">0</span></tt> 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 <tt class="docutils literal"><span class="pre">1</span></tt> 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"><tt class="xref py py-mod docutils literal"><span class="pre">graph.axis.painter</span></tt></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"><tt class="xref py py-mod docutils literal"><span class="pre">graph.axis.painter</span></tt></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><tt class="descclassname">graph.axis.painter.</tt><tt class="descname">rotatetext</tt><big>(</big><em>direction</em>, <em>epsilon=1e-10</em><big>)</big><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">
<tt class="descclassname">rotatetext.</tt><tt class="descname">parallel</tt><a class="headerlink" href="#graph.axis.painter.rotatetext.parallel" title="Permalink to this definition"></a></dt>
<dd><p><tt class="docutils literal"><span class="pre">rotatetext(90)</span></tt></p>
</dd></dl>

<dl class="attribute">
<dt id="graph.axis.painter.rotatetext.orthogonal">
<tt class="descclassname">rotatetext.</tt><tt class="descname">orthogonal</tt><a class="headerlink" href="#graph.axis.painter.rotatetext.orthogonal" title="Permalink to this definition"></a></dt>
<dd><p><tt class="docutils literal"><span class="pre">rotatetext(180)</span></tt></p>
</dd></dl>

<dl class="class">
<dt id="graph.axis.painter.ticklength">
<em class="property">class </em><tt class="descclassname">graph.axis.painter.</tt><tt class="descname">ticklength</tt><big>(</big><em>initial</em>, <em>factor</em><big>)</big><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 <tt class="docutils literal"><span class="pre">ticklength.SHORT</span></tt>, <tt class="docutils literal"><span class="pre">ticklength.SHORt</span></tt>, …,
<tt class="docutils literal"><span class="pre">ticklength.short</span></tt>, <tt class="docutils literal"><span class="pre">ticklength.normal</span></tt>, <tt class="docutils literal"><span class="pre">ticklength.long</span></tt>, …,
<tt class="docutils literal"><span class="pre">ticklength.LONG</span></tt>. <tt class="docutils literal"><span class="pre">ticklength.normal</span></tt> is initialized with a length of
<tt class="docutils literal"><span class="pre">0.12</span></tt> and the reciprocal of the golden mean as <tt class="docutils literal"><span class="pre">factor</span></tt> 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><tt class="descclassname">graph.axis.painter.</tt><tt class="descname">regular</tt><big>(</big><em>innerticklength=ticklength.normal</em>, <em>outerticklength=None</em>, <em>tickattrs=</em><span class="optional">[</span><span class="optional">]</span>, <em>gridattrs=None</em>, <em>basepathattrs=</em><span class="optional">[</span><span class="optional">]</span>, <em>labeldist=&quot;0.3 cm&quot;</em>, <em>labelattrs=</em><span class="optional">[</span><span class="optional">]</span>, <em>labeldirection=None</em>, <em>labelhequalize=0</em>, <em>labelvequalize=1</em>, <em>titledist=&quot;0.3 cm&quot;</em>, <em>titleattrs=</em><span class="optional">[</span><span class="optional">]</span>, <em>titledirection=rotatetext.parallel</em>, <em>titlepos=0.5</em>, <em>texrunner=None</em><big>)</big><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> <tt class="docutils literal"><span class="pre">None</span></tt> 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 <tt class="docutils literal"><span class="pre">None</span></tt> turns off the feature. <em>basepathattrs</em> are stroke
attributes for the axis or <tt class="docutils literal"><span class="pre">None</span></tt> to turn it off. <em>basepathattrs</em> is merged
with <tt class="docutils literal"><span class="pre">[style.linecap.square]</span></tt>.</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 <tt class="docutils literal"><span class="pre">[text.halign.center,</span> <span class="pre">text.vshift.mathaxis]</span></tt>. <em>labeldirection</em> is
an instance of <em>rotatetext</em> to rotate the labels relative to the axis tick
direction or <tt class="docutils literal"><span class="pre">None</span></tt>.</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 <tt class="docutils literal"><span class="pre">[text.halign.center,</span> <span class="pre">text.vshift.mathaxis]</span></tt>. <em>titledirection</em> is
an instance of <em>rotatetext</em> to rotate the title relative to the axis tick
direction or <tt class="docutils literal"><span class="pre">None</span></tt>. <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><tt class="descclassname">graph.axis.painter.</tt><tt class="descname">linked</tt><big>(</big><em>innerticklength=ticklength.short</em>, <em>outerticklength=None</em>, <em>tickattrs=</em><span class="optional">[</span><span class="optional">]</span>, <em>gridattrs=None</em>, <em>basepathattrs=</em><span class="optional">[</span><span class="optional">]</span>, <em>labeldist=&quot;0.3 cm&quot;</em>, <em>labelattrs=None</em>, <em>labeldirection=None</em>, <em>labelhequalize=0</em>, <em>labelvequalize=1</em>, <em>titledist=&quot;0.3 cm&quot;</em>, <em>titleattrs=None</em>, <em>titledirection=rotatetext.parallel</em>, <em>titlepos=0.5</em>, <em>texrunner=None</em><big>)</big><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"><tt class="xref py py-class docutils literal"><span class="pre">regular</span></tt></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><tt class="descclassname">graph.axis.painter.</tt><tt class="descname">bar</tt><big>(</big><em>innerticklength=None</em>, <em>outerticklength=None</em>, <em>tickattrs=</em><span class="optional">[</span><span class="optional">]</span>, <em>basepathattrs=</em><span class="optional">[</span><span class="optional">]</span>, <em>namedist=&quot;0.3 cm&quot;</em>, <em>nameattrs=</em><span class="optional">[</span><span class="optional">]</span>, <em>namedirection=None</em>, <em>namepos=0.5</em>, <em>namehequalize=0</em>, <em>namevequalize=1</em>, <em>titledist=&quot;0.3 cm&quot;</em>, <em>titleattrs=</em><span class="optional">[</span><span class="optional">]</span>, <em>titledirection=rotatetext.parallel</em>, <em>titlepos=0.5</em>, <em>texrunner=None</em><big>)</big><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. <tt class="docutils literal"><span class="pre">None</span></tt>
turns off the ticks inside and outside the graph, respectively. <em>tickattrs</em> are
stroke attributes for the ticks or <tt class="docutils literal"><span class="pre">None</span></tt> 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"><tt class="xref py py-class docutils literal"><span class="pre">regular</span></tt></a>. All other parameters have the same meaning as in
<a class="reference internal" href="#graph.axis.painter.regular" title="graph.axis.painter.regular"><tt class="xref py py-class docutils literal"><span class="pre">regular</span></tt></a>.</p>
</dd></dl>

<dl class="class">
<dt id="graph.axis.painter.linkedbar">
<em class="property">class </em><tt class="descclassname">graph.axis.painter.</tt><tt class="descname">linkedbar</tt><big>(</big><em>innerticklength=None</em>, <em>outerticklength=None</em>, <em>tickattrs=</em><span class="optional">[</span><span class="optional">]</span>, <em>basepathattrs=</em><span class="optional">[</span><span class="optional">]</span>, <em>namedist=&quot;0.3 cm&quot;</em>, <em>nameattrs=None</em>, <em>namedirection=None</em>, <em>namepos=0.5</em>, <em>namehequalize=0</em>, <em>namevequalize=1</em>, <em>titledist=&quot;0.3 cm&quot;</em>, <em>titleattrs=None</em>, <em>titledirection=rotatetext.parallel</em>, <em>titlepos=0.5</em>, <em>texrunner=None</em><big>)</big><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"><tt class="xref py py-class docutils literal"><span class="pre">bar</span></tt></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><tt class="descclassname">graph.axis.painter.</tt><tt class="descname">split</tt><big>(</big><em>breaklinesdist=&quot;0.05 cm&quot;</em>, <em>breaklineslength=&quot;0.5 cm&quot;</em>, <em>breaklinesangle=-60</em>, <em>titledist=&quot;0.3 cm&quot;</em>, <em>titleattrs=</em><span class="optional">[</span><span class="optional">]</span>, <em>titledirection=rotatetext.parallel</em>, <em>titlepos=0.5</em>, <em>texrunner=None</em><big>)</big><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"><tt class="xref py py-class docutils literal"><span class="pre">regular</span></tt></a>.</p>
</dd></dl>

<dl class="class">
<dt id="graph.axis.painter.linkedsplit">
<em class="property">class </em><tt class="descclassname">graph.axis.painter.</tt><tt class="descname">linkedsplit</tt><big>(</big><em>breaklinesdist=&quot;0.05 cm&quot;</em>, <em>breaklineslength=&quot;0.5 cm&quot;</em>, <em>breaklinesangle=-60</em>, <em>titledist=&quot;0.3 cm&quot;</em>, <em>titleattrs=None</em>, <em>titledirection=rotatetext.parallel</em>, <em>titlepos=0.5</em>, <em>texrunner=None</em><big>)</big><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"><tt class="xref py py-class docutils literal"><span class="pre">split</span></tt></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"><tt class="xref py py-mod docutils literal"><span class="pre">graph.axis.rater</span></tt></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"><tt class="xref py py-mod docutils literal"><span class="pre">graph.axis.rater</span></tt></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><tt class="descclassname">graph.axis.rater.</tt><tt class="descname">cube</tt><big>(</big><em>opt</em>, <em>left=None</em>, <em>right=None</em>, <em>weight=1</em><big>)</big><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 <tt class="docutils literal"><span class="pre">0</span></tt> and <em>right</em> is set to <tt class="docutils literal"><span class="pre">3*opt</span></tt>. Weight is
a multiplicator to the result.</p>
<p>The rater calculates <tt class="docutils literal"><span class="pre">width*((x-opt)/(other-opt))**3</span></tt> to rate the value <tt class="docutils literal"><span class="pre">x</span></tt>,
where <tt class="docutils literal"><span class="pre">other</span></tt> is <em>left</em> (<tt class="docutils literal"><span class="pre">x``&lt;*opt*)</span> <span class="pre">or</span> <span class="pre">*right*</span> <span class="pre">(``x</span></tt>&gt;*opt*).</p>
</dd></dl>

<dl class="class">
<dt id="graph.axis.rater.distance">
<em class="property">class </em><tt class="descclassname">graph.axis.rater.</tt><tt class="descname">distance</tt><big>(</big><em>opt</em>, <em>weight=0.1</em><big>)</big><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 <tt class="docutils literal"><span class="pre">weight*(opt/x-1)</span></tt> (<tt class="docutils literal"><span class="pre">x``&lt;*opt*)</span> <span class="pre">or</span>
<span class="pre">``weight*(x/opt-1)</span></tt> (<tt class="docutils literal"><span class="pre">x</span></tt>&gt;*opt*) for all elements <tt class="docutils literal"><span class="pre">x</span></tt> 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><tt class="descclassname">graph.axis.rater.</tt><tt class="descname">rater</tt><big>(</big><em>ticks</em>, <em>labels</em>, <em>range</em>, <em>distance</em><big>)</big><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><tt class="descclassname">graph.axis.rater.</tt><tt class="descname">linear</tt><big>(</big><em>ticks=[cube(4), cube(10, weight=0.5)], labels=[cube(4)], range=cube(1, weight=2), distance=distance(&quot;1 cm&quot;)</em><big>)</big><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"><tt class="xref py py-class docutils literal"><span class="pre">rater</span></tt></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><tt class="descclassname">graph.axis.rater.</tt><tt class="descname">lin</tt><big>(</big><em>...</em><big>)</big><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"><tt class="xref py py-class docutils literal"><span class="pre">linear</span></tt></a> described above.</p>
</dd></dl>

<dl class="class">
<dt id="graph.axis.rater.logarithmic">
<em class="property">class </em><tt class="descclassname">graph.axis.rater.</tt><tt class="descname">logarithmic</tt><big>(</big><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(&quot;1 cm&quot;)</em><big>)</big><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"><tt class="xref py py-class docutils literal"><span class="pre">rater</span></tt></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><tt class="descclassname">graph.axis.rater.</tt><tt class="descname">log</tt><big>(</big><em>...</em><big>)</big><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"><tt class="xref py py-class docutils literal"><span class="pre">logarithmic</span></tt></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 <tt class="xref py py-mod docutils literal"><span class="pre">graph.axis.positioner</span></tt>: 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><tt class="descclassname">graph.axis.positioners.</tt><tt class="descname">positioner</tt><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">
<tt class="descclassname">positioner.</tt><tt class="descname">vbasepath</tt><big>(</big><em>v1=None</em>, <em>v2=None</em><big>)</big><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">
<tt class="descclassname">positioner.</tt><tt class="descname">vgridpath</tt><big>(</big><em>v</em><big>)</big><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 <tt class="docutils literal"><span class="pre">None</span></tt> 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">
<tt class="descclassname">positioner.</tt><tt class="descname">vtickpoint_pt</tt><big>(</big><em>v</em><big>)</big><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 <tt class="docutils literal"><span class="pre">(x,</span> <span class="pre">y)</span></tt> in
points.</p>
</dd></dl>

<dl class="method">
<dt id="graph.axis.positioners.positioner.vtickdirection">
<tt class="descclassname">positioner.</tt><tt class="descname">vtickdirection</tt><big>(</big><em>v</em><big>)</big><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 <tt class="docutils literal"><span class="pre">(dx,</span>
<span class="pre">dy)</span></tt>. 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">
  <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 <tt class="docutils literal"><span class="pre">graph.axis.axis</span></tt>: Axes</a></li>
<li><a class="reference internal" href="#module-graph-axis-tick-axes-ticks">Module <tt class="docutils literal"><span class="pre">graph.axis.tick</span></tt>: Axes ticks</a></li>
<li><a class="reference internal" href="#module-graph-axis-parter-axes-partitioners">Module <tt class="docutils literal"><span class="pre">graph.axis.parter</span></tt>: Axes partitioners</a></li>
<li><a class="reference internal" href="#module-graph-axis-texter-axes-texter">Module <tt class="docutils literal"><span class="pre">graph.axis.texter</span></tt>: Axes texter</a></li>
<li><a class="reference internal" href="#module-graph-axis-painter-axes-painter">Module <tt class="docutils literal"><span class="pre">graph.axis.painter</span></tt>: Axes painter</a></li>
<li><a class="reference internal" href="#module-graph-axis-rater-axes-rater">Module <tt class="docutils literal"><span class="pre">graph.axis.rater</span></tt>: Axes rater</a></li>
<li><a class="reference internal" href="#module-graph-axis-positioner-axes-positioners">Module <tt class="docutils literal"><span class="pre">graph.axis.positioner</span></tt>: Axes positioners</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="graph.html"
                        title="previous chapter">Graphs</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="box.html"
                        title="next chapter">Module <tt class="docutils literal"><span class="pre">box</span></tt>: Convex box handling</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/axis.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <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="manual.html">PyX 0.12.1 Manual</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2011, Jörg Lehmann, Michael Schindler, André Wobst.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>