update upload data
[PyX.git] / examples / axis / rating.txt
blob9e7463256bbb87cc88de9ec4e240ee2b1aaabea7
1 Rater: How a nicely looking axis partition is chosen
3 We here demonstrate how an axis actually chooses its partition. ...
5 There are good-looking partitions of an axis and bad-looking ones. The element
6 which chooses one or the other, is the `rater` of an axis. It asks yet another
7 element, the `parter` to suggest several partitions and then chooses the best,
8 according to criteria such as tick distance, number of ticks, subticks, etc.
9 (The partitioning process itself is explained in a later example).
11 In this example we show the influence of the tick distances: Several axes with
12 the same parameters are plotted on a path which is scaled. Note that the axes
13 choose the ticks appropriately to the available space.
15 The rating mechanism takes into account the number of ticks and subticks, but
16 also the distances between the labels. Thus, the example in the middle has less
17 ticks than the right version, because there is more space available at the
18 larger path. More interestingly more labels are also shown on the very left
19 path, although it is smaller than the middle one. This is due to the fact, that
20 there is not enough room for labels with a decimal place on the smaller axis!
22 ! The rating mechanism is configurable and exchangeable by passing rater
23 instances to the `rater` keyword of the axis constructor. But instead of
24 reconfiguring the whole rating mechanism, simple adjustments to favour more or
25 less ticks are easily possible by the axis keyword argument `density`.
27 !! In this example, the same axis instance is used several times. This works
28 since the axis does not store any data within its own instance. Instead, an
29 `anchoredaxis` instance is created by the `pathaxis` which embeds the axis in a
30 proper environment. This way, a place for storing information for this specific
31 use of the axis instance is provided. When using axes in a graph, the graph
32 instance takes care of the proper setup of the anchored axes instances.