|
From: Joerg L. <jo...@us...> - 2005-07-13 14:31:23
|
Hi,
after quite some time, we finally managed to prepare a new major release,
PyX 0.8. Many improvements and fixes are included (see the attached list of
changes), but there are a couple of highlights which should be mentioned
separately: PyX now supports PDF output and the generation of multi-page
PS/PDF documents. The internals of the path system have been cleaned up and its
external interface has been streamlined. The axis data handling of the graph
component has undergone a major revision.
Note that there are several changes in PyX's API which are are potentially
relevant for "average" PyX users:
- The paperformat argument of the writeEPSfile, writetofile, etc. methods of
the canvas, accepts no longer a string (e.g. "A4"), but a paperformat
instance (e.g. document.paperformat.A4). A backward compatibility layer has
been added, which issues a deprecation warning. Note that the support for the
old API will be removed in the next major revision of PyX.
- The graph.data.function class expects the function specification to be of the
form "y(x)=x**2" (instead of "y=x**2"). Again, a backward compatibility layer
has been added, which will be removed in the next major revision.
- There is a change in the argument handling of the path methods that expect a
parameter specifying a position along the path: When a number/length is
passed, it is now interpreted as an arc length. If you want to specify the
position by a tuple (subpath index, internal parameter t), you have to
construct a corresponding normpathparam instance (please consult the
documentation for more details).
- The most notable change in the graph subsystem is that the axes dictionary of
a graph instance now contains a composite datatype, which stores all
axis-related information including positioning methods. Instead of code like
"g.axispos['x2'].gridpath(0)" you now have to use "g.axis['x2'].gridpath(0)".
You also need to use the composite axis information to create linked axis
between graphs.
- Bar and split axes have been unified, which necessitate some changes in their
data handling. Nested bar axes now need to be constructed explicitly by
nestedbar instances.
Finally, we remark that starting from this release PyX requires Python 2.1
or newer.
Enjoy,
André, Jörg, and Michael
----
0.8 (2005/07/13):
- changed requirements to python 2.1 or newer:
- nested scopes are needed without fallback solution by the path module
(at other places fallback solutions for missing nested scopes are missing as well)
- use warning module for warnings
- path module:
- path parameters and argument handling
- the arct to arc/arcn conversion (needed for bbox calculation and for conversion into
normpath) has been fixed
- document module: new
- container classes for document and pages
- document.paperformat class (strings are deprecated)
- canvas module:
- writeEPSfile wraps a canvas in a single page document and performs the output
- bbox module:
- add _pt methods
- pdfwriter module:
- completely rewritten: support for fonts and patterns has been added
- pswriter module: new
- separate PS output from canvas
- new signature of outputPS methods: writer and context are passed as additional
arguments
- color module:
- allow selection on zero range palette (reported by Francisco Borges, cf. bug #1116257)
- prolog module: removed due to code reorganisation
- graph modules:
- modifications on __init__.py in graph and axis subdirectories to
make "from pyx.graph import *" working as expected
- graph styles:
- addontop added to stackedbarpos
- column -> columnname renaming where appropriate
- histogram style added
- graph data:
- function needs explicit variable definition (implicit variable definition is deprecated)
- column names are inherited by data.data() except when copy=0;
unused columns are silently ignored now
- dynamic function data on a logarithmic axis uses isinstance check now
(although it removes the only (mis)use of axis.inverse, it is a
temporary solution only)
- graph key:
- extend graph keys to allow for several columns
- axis data handling refactoring:
- introcuded an axis positioner (module graph.axis.positioner)
- introduced anchoredaxis to make axis data and positioning local to a graph
- linkedaxis is a special version of anchoredaxis and is generic
(it uses the new linkpainter provided by an axis)
- unification of split and bar axes;
removed some black magic in baraxis in favor of a nestedbar axis
- x linked to x2 etc. is now possible
- axis.inverse was removed (the only place it was (mis)used was by a function)
- graphxy:
- allow to transform axis after layout
- [xy]axisat arguments in the constructor to easily move [xy]-axes
to a position defined the orthogonal axis
- remove axispos (use the axis dictionary now, since it now contains
anchored axis instances and those have shortcuts for the axis positioner
methods)
- dvifile:
- tfm->dvi conversion rounding bugfix
- fix parsing of empty strings ("") in fontmap files (reported by John Owens, bug #1218983)
- text module:
- support for halign of boxes and content of boxes (see halign example)
- take units xscale into account in parbox
- messageparser for replaced fontsizes: Warning -> implemented by texmessage.fontwarning
- messageparser for size differences at the end: Warning not Exception -> implemented by texmessage.fontwarning
- messageparser for overfull/underfull vbox/hbox: Warning not Exception -> implemented by texmessage.boxwarning
- dvicopy flag removed
- allow argument of set to be None
- rename nomathmode and nophantom to clearmathmode and clearphantom
- texmessagepattern for easy creation of simple TeX message parsers
- allow long file names in file checking TeX message parsers
- no newline removal to not disturbe TeX messages when reporting errors
- reworked documentation to use the python documentation standards
- style module:
- linewidth is no longer a unit.length subclass but expects a such as first argument
- epsfile module:
- correct EOL handling while reading DSC's (reported by Markus Meyer)
- pattern module: new
- moved canvas.pattern to its own module together with the new PDFpattern class
- add some default patterns: hatched and crosshatched
- deformer module:
- improve the smoothing deformer
- add a parallel deformer
- tex module:
- the very old tex module finally got removed completely
- contrib directory:
- a simple converter from dvi to EPS/PS/PDF files (dviconvert.py) has been added
- a simple imagine to EPS/PS/PDF converter (imgconvert.py) has been added
- a simple dvitype.py has been added
- update address of FSF all over the place
|