~ubuntu-branches/debian/sid/pyx/sid

« back to all changes in this revision

Viewing changes to examples/3dgraphs/surface.txt

  • Committer: Bazaar Package Importer
  • Author(s): Stuart Prescott
  • Date: 2011-05-20 00:13:52 UTC
  • mto: (9.1.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20110520001352-odcuqpdezuusbbw1
Tags: upstream-0.11.1
ImportĀ upstreamĀ versionĀ 0.11.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Simple 3d surface
 
2
 
 
3
This first simple example provides data for the x, y and z coordinates. PyX
 
4
creates a rectangular grid from the data from the first two coordinates without
 
5
relying on a special ordering of the data. ...
 
6
 
 
7
! In this example we turn off the other two axes x2 and y2, which would be
 
8
plotted on the opposite side of the bottom horizontal plane. The data are
 
9
plotted prior to the axes by the dodata call.
 
10
 
 
11
! A missing point will create a hole in the surface.
 
12
 
 
13
! The surface is plotted using a mesh. In case of a huge number of data points,
 
14
you may want to replace the mesh by a bitmap rasterized on a different (i.e.
 
15
lower) resolution. This can reduce the file size and may also resolve various
 
16
printing problems (unfortunately those are quite common with mesh data). To
 
17
enable the mesh by bitmap replacement feature use the option `meshasbitmap`
 
18
(together with its `meshasbitmap_resolution` option)::
 
19
 
 
20
    d = document.document([document.page(g)])
 
21
    d.writeEPSfile("color", mesh_as_bitmap=1)
 
22
    d.writePDFfile("color", mesh_as_bitmap=1)
 
23
 
 
24
!! The underlying rectangular grid is created by the gridpos style. By changing
 
25
its parameters you can also create the base rectangular grid from others than
 
26
the first two coordinates.