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

« back to all changes in this revision

Viewing changes to examples/axis/painter.py

  • Committer: Bazaar Package Importer
  • Author(s): Graham Wilson
  • Date: 2004-12-25 06:42:57 UTC
  • Revision ID: james.westby@ubuntu.com-20041225064257-31469ij5uysqq302
Tags: upstream-0.7.1
ImportĀ upstreamĀ versionĀ 0.7.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Axis painters performs the painting of an axis. By default, ticks
 
2
# are stroked inside of the graph (in the path examples there is no
 
3
# graph but don't mind) while labels and the axis title are plotted
 
4
# outside. The axis title is rotated along the axis (without writing it
 
5
# upside down), while the tick labels are not rotated. The axis painters
 
6
# takes a variety of keyword arguments to modify the default
 
7
# behaviour.
 
8
 
 
9
from pyx import *
 
10
from pyx.graph import axis
 
11
 
 
12
ap = axis.painter.regular(outerticklength=axis.painter.ticklength.normal)
 
13
 
 
14
c = axis.pathaxis(path.curve(0, 0, 3, 0, 1, 4, 4, 4),
 
15
                        axis.linear(min=0, max=10, title="axis title",
 
16
                                    painter=ap))
 
17
c.writeEPSfile("painter")