add ...
[PyX/mjg.git] / examples / axis / rating.txt
blobba9f6b83409551cc6b689b786fd4fe94cdd61b9f
1 Rating of axis partitionings
3 In this example several axes with the same parameters are plotted on a path
4 scaled at 3 different sizes. Note that the axes adjust the ticks appropriately
5 to the available space. For that a `partitioner` (the short form `parter` is
6 used in the code) creates several possible solutions for placing ticks and
7 labels at the axis. ...
9 However, we do not address this partioning feature here (we just use the
10 default), but we show you the rating facilities instead. Still, we don't modify
11 the defaults either, but we want to discuss certain features of this system.
13 The rating mechanism takes into account the number of ticks and subticks, but
14 also the distances between the labels. Thus, the example in the middle has less
15 ticks than the right version, because there is more space available at the
16 larger path. More interestingly more labels are also shown on the very left
17 path, although it is smaller than the middle one. This is due to the fact, that
18 there is not enough room for labels with a decimal place on the smaller axis!
20 ! The rating mechanism is configurable and exchangeable by passing rater
21 instances to the `rater` keyword of the axis constructor. But instead of
22 reconfiguring the whole rating mechanism, simple adjustments to favour more or
23 less ticks are easily possible by the axis keyword argument `density`.
25 !! In this example the same axis instance is used several times. This works
26 since the axis does not store any data within its own instance. Instead, an
27 `anchoredaxis` instance is created by the `pathaxis` which embbeds the axis in
28 a proper environment. Among others a place for storing information for this
29 specific use of the axis instance is provided that way. When using axes in a
30 graph the graph instance takes care of the proper setup of the anchored axes
31 instances.