~ubuntu-branches/ubuntu/trusty/pyx/trusty

« back to all changes in this revision

Viewing changes to examples/axis/rating.txt

  • Committer: Bazaar Package Importer
  • Author(s): Stuart Prescott
  • Date: 2011-05-20 00:13:52 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110520001352-7jfc1unuvduxji05
Tags: 0.11.1-1
* New upstream release.
* Change documentation build system to sphinx in line with new upstream docs.
* Rebuild lfs files as part of build process.
* Refresh patchs for new version:
  - drop manual-latex-define.patch no longer needed with sphinx.
  - drop siteconfig-static.patch: not needed with new build system
  - drop pyx-text-warnings26.patch: warnings fixed upstream
* Add patch sphinx-mathjax.patch to use pngmath in sphinx rather than mathjax
  which is not yet in Debian.
* Add patch createlfs-no-foiltex.patch to skip generation of foiltex-based
  lfs files that would require non-free components.
* Switch to dpkg-source 3.0 (quilt) format.
* Switch from python-support to dh_python2 as build helper.
* Update copyright format to newer DEP-5 specification.
* Add new files to copyright file.
* Bump standards version to 3.9.2 (no changes required).
* Set DM-Upload-Allowed: yes

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Rater: How a nicely looking axis partition is chosen
 
2
 
 
3
We here demonstrate how an axis actually chooses its partition. ...
 
4
 
 
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).
 
10
 
 
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.
 
14
 
 
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!
 
21
 
 
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`.
 
26
 
 
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.
 
33