From 50ac093099082175e527148dca1eba0b94cfb094 Mon Sep 17 00:00:00 2001 From: Gert Ingold Date: Sun, 25 Apr 2004 17:50:40 +0000 Subject: [PATCH] corrected several mistakes, mostly typos git-svn-id: https://pyx.svn.sourceforge.net/svnroot/pyx/trunk/pyx@1712 069f4177-920e-0410-937b-c2a4a81bcd90 --- manual/axis.tex | 101 +++++++++++++++++++-------------------- manual/box.tex | 8 ++-- manual/color.tex | 4 +- manual/connector.tex | 10 ++-- manual/epsfile.tex | 2 +- manual/graph.tex | 130 +++++++++++++++++++++++++-------------------------- manual/mathtree.tex | 4 +- manual/text.tex | 12 ++--- manual/trafo.tex | 4 +- manual/unit.tex | 4 +- 10 files changed, 140 insertions(+), 139 deletions(-) diff --git a/manual/axis.tex b/manual/axis.tex index 476733c3..635e304e 100644 --- a/manual/axis.tex +++ b/manual/axis.tex @@ -1,8 +1,9 @@ \chapter{Axes\label{axis}} -Axes are a fundamental component of graphs although there might be use -cases outside of the graph system. Internally axes are constructed out -of components, which handle different tasks and axis need to fullfill: +Axes are a fundamental component of graphs although there might be +applications outside of the graph system. Internally axes are +constructed out of components, which handle different tasks axes +need to fulfill: \begin{definitions} \term{axis} @@ -20,16 +21,16 @@ of components, which handle different tasks and axis need to fullfill: \term{texter} Creates labels for ticks when they are not set manually. \term{painter} - Responsible to paint the axis. + Responsible for painting the axis. \term{rater} Calculate ratings, which can be used to select the best suitable partitioning. \end{definitions} -The names above map directly to modules, which are provided in the -directory \file{graph/axis}. Sometimes it might be conventient to -import the axis directory directly rather access them through the -graph. This would look like: +The names above map directly to modules which are provided in the +directory \file{graph/axis}. Sometimes it might be convenient to +import the axis directory directly rather than to access iit through +the graph. This would look like: \begin{verbatim} from pyx import * graph.axis.painter() # and the like @@ -42,7 +43,7 @@ In most cases different implementations are available through different classes, which can be combined in various ways. There are various axis examples distributed with \PyX{}, where you can see some of the features of the axis with a few lines of code each. Hence we -can here directly step on to the reference of the available +can here directly come to the reference of the available components. \section{Axes} @@ -58,8 +59,8 @@ The position of an axis is defined by an instance of a class providing the following methods: \begin{methoddesc}[axispos]{basepath}{x1=None, x2=None} - Returns a path instance for the the base path. \var{x1} and \var{x2} - are the axis range, the base path should cover. + Returns a path instance for the base path. \var{x1} and \var{x2} + define the axis range, the base path should cover. \end{methoddesc} \begin{methoddesc}[axispos]{vbasepath}{v1=None, v2=None} @@ -67,7 +68,7 @@ the following methods: \end{methoddesc} \begin{methoddesc}[axispos]{gridpath}{x} - Returns a path instance for the the grid path at position \var{x}. + Returns a path instance for the grid path at position \var{x}. Might return \code{None} when no grid path is available. \end{methoddesc} @@ -93,20 +94,19 @@ the following methods: \end{methoddesc} Instances of the following classes can be passed to the \var{**axes} -keyword arguments of a graph. Those instances should be used once -only. +keyword arguments of a graph. Those instances should only be used once. \begin{classdesc}{linear}{min=None, max=None, reverse=0, divisor=None, title=None, parter=parter.autolinear(), manualticks=[], density=1, maxworse=2, rater=rater.linear(), texter=texter.mixed(), painter=painter.regular()} - This class provides a linear axis. \var{min} and \var{max} are the + This class provides a linear axis. \var{min} and \var{max} define the axis range. When not set, they are adjusted automatically by the data to be plotted in the graph. Note, that some data might want to access the range of an axis (\emph{e.g.} the \class{function} class when no range was provided there) or you need to specify a range when using the axis without plugging it into a graph (\emph{e.g.} - when drawing a axis along a path). + when drawing an axis along a path). \var{reverse} can be set to indicate a reversed axis starting with bigger values first. Alternatively you can fix the axis range by @@ -116,7 +116,7 @@ only. factor by that. \var{title} is the title of the axis. \var{parter} is a partitioner instance, which creates suitable ticks - for the axis range. Those ticks are merged with manual given ticks + for the axis range. Those ticks are merged with ticks manually given by \var{manualticks} before proceeding with rating, painting \emph{etc.} Manually placed ticks win against those created by the partitioner. For automatic partitioners, which are able to calculate @@ -126,7 +126,7 @@ only. unappropriate or not at all valid in terms of rating label distances). But within a range of say 0.5 to 2 (even bigger for large graphs) it can help to get less or more ticks than the default - would lead to. \var{maxworse} is a the number of trials with more + would lead to. \var{maxworse} is the number of trials with more and less ticks when a better rating was already found. \var{rater} is a rater instance, which rates the ticks and the label distances for being best suitable. It also takes into account \var{density}. @@ -163,14 +163,14 @@ This class is an abbreviation of \class{logarithmic} described above. \begin{classdesc}{linked}{linkedaxis, painter=painter.linked()} This class provides an axis, which is linked to another axis instance. This means, it shares all its properties with the axis it - is linked too except for the painter. Thus a linked axis is painted + is linked to except for the painter. Thus a linked axis is painted differently. - A standard use case are the \code{x2} and \code{y2} axes in an + A standard application are the \code{x2} and \code{y2} axes in an x-y-graph. Linked axes to the \code{x} and \code{y} axes are created automatically when not disabled by setting those axes to \code{None}. By that, ticks are stroked at both sides of an - x-y-graph. However, linked axes can be used for in other cases as + x-y-graph. However, linked axes can be used in other cases as well. You can link axes within a graph or between different graphs as long as the orgininal axis is finished first (it must fix its layout first). @@ -180,14 +180,14 @@ This class is an abbreviation of \class{logarithmic} described above. splitdist=0.1, relsizesplitdist=1, title=None, painter=painter.split()} This class provides an axis, splitting the input values to its - subaxes depeding on the range of the subaxes. Thus the subaxes + subaxes depending on the range of the subaxes. Thus the subaxes need to have fixed range, up to the minimum of the first axis and the maximum of the last axis. \var{subaxes} actually takes the list - of subaxes. \var{splitlist} defines the positions of the spliting + of subaxes. \var{splitlist} defines the positions of the splitting in graph coordinates. Thus the length of \var{subaxes} must be the length of \var{splitlist} plus one. If an entry in \var{splitlist} is \code{None}, the axes aside define the split position taking into - account the ratio of the axes ranges (meassured by an internal + account the ratio of the axes ranges (measured by an internal \code{relsize} attribute of each axis). \var{splitdist} is the space reserved for a splitting in graph @@ -230,23 +230,23 @@ This class is an abbreviation of \class{logarithmic} described above. subaxis. When others has only one entry, it is passed as a value, otherwise as a list. The result of the conversion done by the subaxis is mapped into the graph coordinate range for this discrete - value. When neigher \var{subaxis} nor \var{multisubaxis} is set, - others must be a single value in range [0:1]. This value is used for - the position at the subaxis without converion. + value. When neither \var{subaxis} nor \var{multisubaxis} is set, + others must be a single value in the range [0:1]. This value is used + for the position at the subaxis without conversion. When \var{subaxis} is set, it is used for the conversion of others. When \var{multisubaxis} is set, it must be an instance of \var{bar} - as well. It is than dublicated for each of the discrete values + as well. It is then duplicated for each of the discrete values allowed for the axis. By that, you can create nested bar axes with - a different discrete values for each discrete value of the axis. It + different discrete values for each discrete value of the axis. It is not allowed to set both, \var{subaxis} and \var{multisubaxis}. \var{dist} is used as the spacing between the ranges for each distinct value. It is measured in the same units as the subaxis - results, thus the default value of \code{0.5} means halve the width + results, thus the default value of \code{0.5} means half the width between the distinct values as the width for each distinct value. \var{firstdist} and \var{lastdist} are used before the first and - after the last value. When set to \code{None}, halve of \var{dist} + after the last value. When set to \code{None}, half of \var{dist} is used. \var{title} is the title of the split axes and \var{painter} is a @@ -292,7 +292,7 @@ The following classes are part of the module \module{graph.axis.tick}. \end{itemize} \var{power} is an integer to calculate \code{\var{x}**\var{power}}. - This is usefull at certain places in partitioners. + This is useful at certain places in partitioners. \end{classdesc} \begin{classdesc}{tick}{x, ticklevel=0, labellevel=0, label=None, @@ -475,8 +475,8 @@ This class is an abbreviation of \class{autologarithmic} described above. The following classes are part of the module \module{graph.axis.texter}. Instances of the classes can be passed to the texter keyword argument of regular axes. Texters are used to define the label text for ticks, -which request to have a label, but not label text was specified -actually. A typical case are ticks created by partitioners described +which request to have a label, but for which no label text has been specified +so far. A typical case are ticks created by partitioners described above. \begin{classdesc}{decimal}{prefix="", infix="", suffix="", equalprecision=0, @@ -486,7 +486,7 @@ above. Instances of this class create decimal formatted labels. The strings \var{prefix}, \var{infix}, and \var{suffix} are added to - the label at the begin, immediately after the plus or minus, and at + the label at the beginning, immediately after the plus or minus, and at the end, respectively. \var{decimalsep}, \var{thousandsep}, and \var{thousandthpartsep} are strings used to separate integer from fractional part and three-digit groups in the integer and fractional @@ -498,7 +498,7 @@ above. contain one string insert operators \samp{\%s} for the period. \var{labelattrs} is a list of attributes to be added to the label - attributes given in the painter. It should be used to setup TeX + attributes given in the painter. It should be used to setup \TeX{} features like \code{text.mathmode}. Text format options like \code{text.size} should instead be set at the painter. \end{classdesc} @@ -578,7 +578,7 @@ above. Instances of this class create labels formated as fractions. The strings \var{prefix}, \var{infix}, and \var{suffix} are added to - the label at the begin, immediately after the plus or minus, and at + the label at the beginning, immediately after the plus or minus, and at the end, respectively. The strings \var{prefixnum}, \var{infixnum}, and \var{suffixnum} are added to the labels numerator accordingly whereas \var{prefixdenom}, \var{infixdenom}, @@ -612,7 +612,7 @@ above. into account \var{denomprefix}, \var{denominfix}, \var{denomsuffix} \var{minuspos} and the sign of the number. - \var{labelattrs} has the same meaning than for \var{decimal}. + \var{labelattrs} has the same meaning as for \var{decimal}. \end{classdesc} \section{Painter} @@ -633,8 +633,8 @@ passed to the painter keyword argument of regular axes. exceeded before an 180 degree rotation is performed. \end{classdesc} -The following two class variables are initialized with the most common -use case: +The following two class variables are initialized for the most common +applications: \begin{memberdesc}{parallel} \code{rotatetext(90)} @@ -656,8 +656,9 @@ tick stroking. They are named \code{ticklength.SHORT}, \code{ticklength.normal}, \code{ticklength.long}, \dots, \code{ticklength.LONG}. \code{ticklength.normal} is initialized with a length of \code{0.12} and the reciprocal of the golden mean as -\code{factor} whereas the others have a modified inital value by -multiplication or division by multiples of $\sqrt{2}$ appropriately. +\code{factor} whereas the others have a modified initial value +obtained by multiplication with or division by appropriate multiples of +$\sqrt{2}$. \begin{classdesc}{regular}{innerticklength=ticklength.normal, outerticklength=None, @@ -702,7 +703,7 @@ multiplication or division by multiples of $\sqrt{2}$ appropriately. horizontal axes, respectively. \var{titledist} is the distance of the title from the rest of the - axis as a visual \PyX{}. \var{titleattrs} is a list of text + axis as a visual \PyX{} length. \var{titleattrs} is a list of text attributes for the title. It is merged with \samp{[text.halign.center, text.vshift.mathaxis]}. \var{titledirection} is an instance of \var{rotatetext} to rotate @@ -781,10 +782,10 @@ multiplication or division by multiples of $\sqrt{2}$ appropriately. Instances of this class are suitable painters for bar axes. \var{innerticklength} and \var{outerticklength} are visual \PyX{} - length to mark the different bar regions along the axis inside and + lengths to mark the different bar regions along the axis inside and outside of the graph. \code{None} turns off the ticks inside and outside the graph, respectively. \var{tickattrs} are stroke - attributes for the ticks or \code{None} to turns all ticks off. + attributes for the ticks or \code{None} to turn all ticks off. The parameters with prefix \var{name} are identical to their \var{label} counterparts in \class{regular}. All other parameters have @@ -818,16 +819,16 @@ multiplication or division by multiples of $\sqrt{2}$ appropriately. The rating of axes is implemented in \module{graph.axis.rater}. When an axis partitioning scheme returns several partitioning -possibilities, the partitions needs to be rated by a positive number. -The lowest rated axis partitioning is considered best. +possibilities, the partitions need to be rated by a positive number. +The axis partitioning rated lowest is considered best. The rating consists of two steps. The first takes into account only the number of ticks, subticks, labels and so on in comparison to optimal numbers. Additionally, the extension of the axis range by ticks and labels is taken into account. This rating leads to a preselection of possible partitions. In the second step, after the -layout of prefered partitionings is calculated, the distance of the -labels in a partition is taken into account as well at a smaller +layout of preferred partitionings has been calculated, the distance of +the labels in a partition is taken into account as well at a smaller weight factor by default. Thereby partitions with overlapping labels will be rejected completely. Exceptionally sparse or dense labels will receive a bad rating as well. @@ -839,7 +840,7 @@ receive a bad rating as well. to the result. The rater calculates - \code{\var{widht}*((x-\var{opt})/(other-\var{opt}))**3} to rate the + \code{\var{width}*((x-\var{opt})/(other-\var{opt}))**3} to rate the value \code{x}, where \code{other} is \var{left} (\code{x}\textless\var{opt}) or \var{right} (\code{x}\textgreater\var{opt}). diff --git a/manual/box.tex b/manual/box.tex index da2d953d..a39bd6e2 100644 --- a/manual/box.tex +++ b/manual/box.tex @@ -16,7 +16,7 @@ Directions (for the alignment etc.) are usually provided as pairs (dx, dy) within this module. It is required, that at least one of these two numbers is unequal to zero. No further assumptions are taken. -\section{polygon} +\section{Polygon} A polygon is the most general case of a box. It is an instance of the class \verb|polygon|. The constructor takes a list of points (which @@ -67,7 +67,7 @@ raised the box \end{description} -\section{functions working on a box list} +\section{Functions working on a box list} \begin{description} \raggedright @@ -79,12 +79,12 @@ cases. \item[\texttt{linealignequal(boxes, a, dx, dy)}:] as above, but performing a line alignment \item[\texttt{tile(boxes, a, dx, dy)}:] tiles the boxes \verb|boxes| -with a distance \verb|a| between the boxes (additional the maximal box +with a distance \verb|a| between the boxes (in addition the maximal box extent in the given direction (\verb|dx|, \verb|dy|) is taken into account) \end{description} -\section{rectangular boxes} +\section{Rectangular boxes} For easier creation of rectangular boxes, the module provides the specialized class \verb|rect|. Its constructor first takes four diff --git a/manual/color.tex b/manual/color.tex index 0fa38105..14dcece2 100644 --- a/manual/color.tex +++ b/manual/color.tex @@ -6,14 +6,14 @@ PostScript provides different color models. They are available to the PostScript level. This implies, that there are no conversion routines between different color models available. However, some color model conversion routines are included in Python's standard library in -the module \texttt{colorsym}. Furthermore also the comparision of +the module \texttt{colorsym}. Furthermore also the comparison of colors within a color model is not supported, but might be added in future versions at least for checking color identity and for ordering gray colors. There is a class for each of the supported color models, namely \verb|gray|, \verb|rgb|, \verb|cmyk|, and \verb|hsb|. The constructors -take variables appropriate to the color model. Additionally, a list of +take variables appropriate for the color model. Additionally, a list of named colors is given in appendix~\ref{colorname}. \section{Example} diff --git a/manual/connector.tex b/manual/connector.tex index e45a2dbd..38501384 100644 --- a/manual/connector.tex +++ b/manual/connector.tex @@ -24,12 +24,12 @@ between the connecting arc and the straight connecting line. (Default: \verb|relangle=45|, \verb|relbulge=None|, \verb|absbulge=None|)\medskip -Note that the bulge- override the angle-keyword. When both \verb|relbulge| and -\verb|absbulge| are given they will be added. +Note that the bulge-keywords override the angle-keyword. When both +\verb|relbulge| and \verb|absbulge| are given they will be added. \section{Class curve} -The construktor takes both angle- and bulge-keywords. Here, the bulges are +The constructor takes both angle- and bulge-keywords. Here, the bulges are used as distances between bezier-curve control points:\medskip \verb|absangle1| or \verb|relangle1|\\ @@ -38,8 +38,8 @@ relative if both are given. (Default: \verb|relangle1=45|, \verb|relangle2=45|, \verb|absangle1=None|, \verb|absangle2=None|)\medskip \verb|absbulge| and \verb|relbulge|, where they will be added if both are -given.\\ (Default: \verb|absbulge|=None \verb|relbulge|=0.39; these default -values produce similar output like the defaults of the arc-class.)\medskip +given.\\ (Default: \verb|absbulge|=None, \verb|relbulge|=0.39; these default +values produce output similar to the defaults of the arc-class.)\medskip Note that relative angle-keywords are counted in the following way: diff --git a/manual/epsfile.tex b/manual/epsfile.tex index c04c2fa4..0ba0b2f6 100644 --- a/manual/epsfile.tex +++ b/manual/epsfile.tex @@ -1,6 +1,6 @@ \chapter{Module epsfile: EPS file inclusion} -With help of the \verb|epsfile.epsfile| class, you can easily embed +With the help of the \verb|epsfile.epsfile| class, you can easily embed another EPS file in your canvas, thereby scaling, aligning the content at discretion. The most simple example looks like \begin{quote} diff --git a/manual/graph.tex b/manual/graph.tex index f414d012..e8876a2d 100644 --- a/manual/graph.tex +++ b/manual/graph.tex @@ -7,12 +7,12 @@ additional graph geometries while reusing most of the existing components. Creating a graph splits into two basic steps. First you have to create -a graph instance. The most simples form would look like: +a graph instance. The most simple form would look like: \begin{verbatim} from pyx import * g = graph.graphxy(width=8) \end{verbatim} -The graph instance \code{g} created in this example can than be used +The graph instance \code{g} created in this example can then be used to actually plot something into the graph. Suppose you have some data in a file \file{graph.dat} you want to plot. The content of the file could look like: @@ -73,8 +73,8 @@ Creating a graph involves a variety of tasks, which thus can be separated into components without significant additional costs. This structure manifests itself also in the \PyX{} source, where there are different modules for the different tasks. They interact by some -welldefined interfaces. They certainly has to be completed and -stabilized in its details, but the basic structure came up in the +welldefined interfaces. They certainly have to be completed and +stabilized in their details, but the basic structure came up in the continuous development quite clearly. The basic parts of a graph are: \begin{definitions} @@ -82,18 +82,18 @@ continuous development quite clearly. The basic parts of a graph are: Defines the geometry of the graph by means of graph coordinates with range [0:1]. Keeps lists of plotted data, axes \emph{etc.} \term{data} - Produces or prepare data to be plotted in graphs. + Produces or prepares data to be plotted in graphs. \term{style} - Performs the plotting of the data into the graph. It get data, - convert them via the axes into graph coordinates and uses the graph + Performs the plotting of the data into the graph. It gets data, + converts them via the axes into graph coordinates and uses the graph to finally plot the data with respect to the graph geometry methods. \term{key} Responsible for the graph keys. \term{axis} Creates axes for the graph, which take care of the mapping from data values to graph coordinates. Because axes are also responsible for - creating ticks and labels, showing up in the graph themselfs and - other things, this task is splitted into several independend + creating ticks and labels, showing up in the graph themselves and + other things, this task is splitted into several independent subtasks. Axes are discussed separately in chapter~\ref{axis}. \end{definitions} @@ -109,7 +109,7 @@ However, there is a shortcut to access this class via \begin{classdesc}{graphxy}{xpos=0, ypos=0, width=None, height=None, ratio=goldenmean, key=None, backgroundattrs=None, axesdist="0.8 cm", **axes} - This class provides a x-y-graph. A graph instance is also a full + This class provides an x-y-graph. A graph instance is also a fully functional canvas. The position of the graph on its own canvas is specified by @@ -118,7 +118,7 @@ ratio=goldenmean, key=None, backgroundattrs=None, axesdist="0.8 cm", the size of the graph area not taking into account the additional space needed for the axes. Note that you have to specify at least \var{width} or \var{height}. \var{ratio} will be used as the ratio - between \var{width} and \var{height} when only one of these are + between \var{width} and \var{height} when only one of these is provided. \var{key} can be set to a \class{graph.key.key} instance to create @@ -133,18 +133,18 @@ ratio=goldenmean, key=None, backgroundattrs=None, axesdist="0.8 cm", \var{**axes} receives axes instances. Allowed keywords (axes names) are \code{x}, \code{x2}, \code{x3}, \emph{etc.} and \code{y}, - \code{y2}, \code{y3}, \emph{etc.} When not providing a \code{x} or + \code{y2}, \code{y3}, \emph{etc.} When not providing an \code{x} or \code{y} axis, linear axes instances will be used automatically. When not providing a \code{x2} or \code{y2} axis, linked axes to the \code{x} and \code{y} axes are created automatically. You may set those axes to \code{None} to disable the automatic creation of axes. - The even numbered axes are plotted at the top (\code{y} axes) and - right (\code{x} axes) while the others are plotted at the bottom + The even numbered axes are plotted at the top (\code{x} axes) and + right (\code{y} axes) while the others are plotted at the bottom (\code{x} axes) and left (\code{y} axes) in ascending order each. - Axes instances should be used once only. + Axes instances should only be used once. \end{classdesc} -Some instance attributes might be usefull for outside read-access. +Some instance attributes might be useful for outside read-access. Those are: \begin{memberdesc}{axes} @@ -160,11 +160,11 @@ method \method{plot()} is provided: \begin{methoddesc}{plot}{data, style=None} Adds \var{data} to the list of data to be plotted. Sets \var{style} - the be used for plotting the data. When \var{style} is \code{None}, + to be used for plotting the data. When \var{style} is \code{None}, the default style for the data as provided by \var{data} is used. \var{data} should be an instance of any of the data described in - section~\ref{graph:data}. This instance should used once only. + section~\ref{graph:data}. This instance should only be used once. When a style is used several times within the same graph instance, it is kindly asked by the graph to iterate its appearence. Its up @@ -179,18 +179,18 @@ While a graph instance only collects data initially, at a certain point it must create the whole plot. Once this is done, further calls of \method{plot()} will fail. Usually you do not need to take care about the finalization of the graph, because it happens automatically -once you write the plot into a file. However, sometime position -methods (described below) are nice to be accessable. For that, at +once you write the plot into a file. However, sometimes position +methods (described below) are nice to be accessible. For that, at least the layout of the graph must be done. By calling the \method{do}-methods yourself you can also alter the order in which -the graph is plotted. Multiple calls the any of the +the graph is plotted. Multiple calls to any of the \method{do}-methods have no effect (only the first call counts). The orginal order in which the \method{do}-methods are called is: \begin{methoddesc}{dolayout}{} Fixes the layout of the graph. As part of this work, the ranges of the axes are fitted to the data when the axes ranges are allowed to - addjust themselfs to the data ranges. The other \method{do}-methods + adjust themselves to the data ranges. The other \method{do}-methods ensure, that this method is always called first. \end{methoddesc} @@ -234,7 +234,7 @@ The graph provides some methods to access its geometry: \begin{methoddesc}{vgeodesic}{vx1, vy1, vx2, vy2} Returns the geodesic between points \var{vx1}, \var{vy1} and - \var{vx1}, \var{vy1} as a path. All parameters are in graph + \var{vx2}, \var{vy2} as a path. All parameters are in graph coordinates with range [0:1]. For \class{graphxy} this is a straight line. \end{methoddesc} @@ -244,7 +244,7 @@ The graph provides some methods to access its geometry: connect the two points. \end{methoddesc} -% dirty hack to add a hole list of methods to the index: +% dirty hack to add a whole list of methods to the index: \index{xbasepath()@\texttt{xbasepath()} (graphxy method)} \index{xvbasepath()@\texttt{xvbasepath()} (graphxy method)} \index{xgridpath()@\texttt{xgridpath()} (graphxy method)} @@ -293,9 +293,9 @@ graph. The classes are implemented in \module{graph.data}. line of the file. Lines matching \var{commentpattern} are ignored except for the column name search of the last non-emtpy comment line before the data. By default a line starting with one of the - characters \character{\#}, \character{\%}, or \character{!} are - treated as comments. A line is analysed by repeatingly matching - \var{stringpattern} and, whenever the stringpattern does not match + characters \character{\#}, \character{\%}, or \character{!} is + treated as comment. A line is analysed by repeatedly matching + \var{stringpattern} and, whenever the stringpattern does not match, by \var{columnpattern}. When the \var{stringpattern} matches, the result is taken as the value for the next column without further transformations. When \var{columnpattern} matches, it is tried to @@ -314,7 +314,7 @@ graph. The classes are implemented in \module{graph.data}. \var{**columns}. You may set \var{title} to \code{None} to disable the title. - \var{parser} is the parser for mathematical expression provided in + \var{parser} is the parser for mathematical expressions provided in \var{**columns}. When in doubt, this is probably uninteresting for you. \var{context} allows for accessing external variables and functions when evaluating mathematical expressions for columns. As @@ -323,9 +323,9 @@ graph. The classes are implemented in \module{graph.data}. Finally, \var{columns} defines the data columns. To make it a bit more complicated, there are file column names and new created data column names, namely the keywords of \var{**columns}. File column - names occure when the data file contains a comment line immediately + names occur when the data file contains a comment line immediately in front of the data. This line will be parsed skipping the comment - character (even if it occures multiple times) as if it would be + character (even if it occurs multiple times) as if it would be regular data, but it will not be converted to floats even if it would be possible to convert them. The values of \var{**columns} can refer to column numbers in the file (starting with \code{1}). The @@ -339,7 +339,7 @@ graph. The classes are implemented in \module{graph.data}. expression\textgreater)}, where \code{\textless number\textgreater} is a non-negative integer and \code{\textless expression\textgreater} a valid mathematical expression itself. For - the later negative numbers count the columns from the end. + the latter, negative numbers count the columns from the end. Example: \begin{verbatim} graph.data.file("test.dat", a=1, b="B", c="2*B+$3") @@ -354,12 +354,12 @@ graph.data.file("test.dat", a=1, b="B", c="2*B+$3") \samp{[1.234, 5.678]}, \samp{[1.0, 3.0]}, and \samp{[4.0, 10.0]}, respectively. - When creating the several data instances accessing the same file, + When creating several data instances accessing the same file, the file is read only once. There is an inherent caching of the file contents. \end{classdesc} -For the sake of completeness the default patterns: +For the sake of completeness we list the default patterns: \begin{memberdesc}{defaultcommentpattern} \code{re.compile(r\textquotedbl (\#+|!+|\%+)\e s*\textquotedbl)} @@ -386,19 +386,19 @@ For the sake of completeness the default patterns: default \var{expression} is used. You may set \var{title} to \code{None} to disable the title. - \var{min} and \var{max} give the range of the variable. If not set - the range spans the hole axis range. The axis range might be set + \var{min} and \var{max} give the range of the variable. If not set, + the range spans the whole axis range. The axis range might be set explicitly or implicitly by ranges of other data. \var{points} is the number of points for which the function is calculated. The - points are lineary choosen in terms of graph coordinates. + points are choosen linearly in terms of graph coordinates. \var{parser} is the parser for the mathematical expression. When in doubt, this is probably uninteresting for you. \var{context} allows for accessing external variables and functions. As an example you may use \code{context=locals()} or something similar. - Note when accessing external variables: When doing so, at first it - renders unclear, which of the variables should be used as the + Note when accessing external variables: In principle, it is unclear, + which of the variables should be used as the dependent variable. The solution is, that there should be exactly one variable, which is a valid and used axis name. Example: @@ -428,7 +428,7 @@ For the sake of completeness the default patterns: default \var{expression} is used. You may set \var{title} to \code{None} to disable the title. - \var{parser} is the parser for mathematical expression. When in + \var{parser} is the parser for mathematical expressions. When in doubt, this is probably uninteresting for you. \var{context} allows for accessing external variables and functions. As an example you may use \code{context=locals()} or something similar. @@ -436,7 +436,7 @@ For the sake of completeness the default patterns: \begin{classdesc}{list}{points, title="user provided list", maxcolumns=None, addlinenumbers=1, **columns} - This class creates graph data from external provided data. + This class creates graph data from externally provided data. \var{points} is a list of lines, where each line is a list of data values for the columns. @@ -448,11 +448,11 @@ For the sake of completeness the default patterns: line, will be checked and adjusted to the number of columns. \var{addlinenumbers} is a boolean indicating whether line numbers - should be added or not. Note that the line numbers are storred in + should be added or not. Note that the line numbers are stored in column \code{0}. A transformation (see \class{data} below) will always keep the first column. When not adding line numbers, you should be aware, that the numbering in \var{**columns} becomes - different form the usual case, where the first column containing + different from the usual case, where the first column containing data (not the line number) has column number \code{1}. The keywords of \var{**columns} become the data column names. The @@ -465,12 +465,12 @@ For the sake of completeness the default patterns: \begin{classdesc}{data}{data, title=notitle, parser=dataparser(), context={}, **columns} This class provides graph data out of other graph data. \var{data} - is the source of the data. All other paramters work like the equally - called parameters in \class{graph.data.file}. Indeed, the later is - build on top of this class by reading the file and caching its + is the source of the data. All other parameters work like the equally + called parameters in \class{graph.data.file}. Indeed, the latter is + built on top of this class by reading the file and caching its contents in a \class{graph.data.list} instance. The columns are then selected by creating new data out of the existing data. Note that - the data itself is not copied as long as no new columns need to be + the data themselves are not copied as long as no new columns need to be calculated. \end{classdesc} @@ -494,7 +494,7 @@ For the sake of completeness the default patterns: \declaremodule{}{graph.style} \modulesynopsis{Graph style} -Please note that we're talking about graph styles here. Those are +Please note that we are talking about graph styles here. Those are responsible for plotting symbols, lines, bars and whatever else into a graph. Do not mix it up with path styles like the line width, the line style (solid, dashed, dotted \emph{etc.}) and others. @@ -506,8 +506,8 @@ method of a graph. The classes are implemented in \module{graph.style}. errorscale=0.5, symbolattrs=[], errorbarattrs=[], lineattrs=[], epsilon=1e-10} - This class is a style for plot symbols, lines and errorbars into a - graph. \var{symbol} refers to a (changable) symbol method (see + This class is a style for plotting symbols, lines and errorbars into a + graph. \var{symbol} refers to a (changeable) symbol method (see below). The symbol is drawn at size \var{size} (a visual \PyX{} length; also changeable) using \var{symbolattrs}. \var{symbolattrs} are merged with the decorator \class{deco.stroked}. \var{errorscale} @@ -534,7 +534,7 @@ method of a graph. The classes are implemented in \module{graph.style}. \end{tableii} Minimal and maximal values are calculated from delta by subtracting - and adding it to the value itself. Most of the data names are mutal + and adding it to the value itself. Most of the data names are mutually exclusive (whenever a minimal or maximal value would be set twice). \end{classdesc} @@ -608,7 +608,7 @@ variables, namely: \end{memberdesc} \class{symbolline} provides two changeable decorators for alternated filling -and stroking. Those are especially usefull in combination with the +and stroking. Those are especially useful in combination with the \method{change}-\method{twice}-symbol methods above. They are: \begin{memberdesc}{changestrokedfilled} @@ -619,7 +619,7 @@ and stroking. Those are especially usefull in combination with the attr.changelist([deco.filled, deco.stroked]) \end{memberdesc} -Finally, there is a changeable linestyle used by default. It is +Finally, there is a changeable line style used by default. It is defined as: \begin{memberdesc}{changelinestyle} @@ -637,7 +637,7 @@ defined as: \end{classdesc} \begin{classdesc}{line}{errorbarattrs=[]} - This class is a style to stroke lines into graph. It is equivalent + This class is a style to stroke lines into a graph. It is equivalent to \class{symbollines} except that it does not allow for symbols and errorbars. Thus it also does not accept data names for error bars. Instances of \class{line} are the default style for the data classes @@ -649,9 +649,9 @@ defined as: errorscale=0.5, symbolattrs=[], errorbarattrs=[], epsilon=1e-10} This class enhances \class{symbol} by adding text to the symbol. The - text to be written has provided in the additional data column named + text to be written has to be provided in the additional data column named \code{text}. \var{textdx} and \var{textdy} are the position of the - text with respect of the symbol. \var{textattrs} are text + text with respect to the symbol. \var{textattrs} are text attributes for the output of the text. All other parameters have the same meaning as in the \class{symbol} class. \end{classdesc} @@ -660,32 +660,32 @@ defined as: lineattrs=[], arrowattrs=[], epsilon=1e-10} This class is a style to plot short lines with arrows into a two-dimensional graph. The position of the arrow is defined by two - data columns named like an axes for each graph dimension. Two + data columns named like an axis for each graph dimension. Two additional data columns named \code{size} and \code{angle} define the size and angle for each arrow. \code{size} is taken as a factor to \var{arrowsize} and \var{linelength}, the size of the arrow and the length of the line the arrow is plotted at. \code{angle} is the - angle the arrow points to with respect to a horizonal lines. The - \code{angle} is taken in degree and use in mathematical positive + angle the arrow points to with respect to a horizontal line. The + \code{angle} is taken in degrees and used in mathematically positive sense. \var{lineattrs} and \var{arrowattrs} are styles for the arrow - line and arrow head respectively. \var{epsilon} is used to + line and arrow head, respectively. \var{epsilon} is used to determine, when the arrow is outside of the graph (in graph coordinates). \end{classdesc} \begin{classdesc}{rect}{palette=color.palette.Gray} This class is a style to plot coloured rectangles into a - two-dimensional graph. The position of the rectangles are given by 4 + two-dimensional graph. The positions of the rectangles are given by four data columns named \code{Xmin} and \code{Xmax} where \code{X} stands - for two axes names, one for each graph dimension. The additional + for two axis names, one for each graph dimension. The additional data column named \code{color} specifies the color of the rectangle defined by \var{palette}. Thus the valid color range is [0:1]. \begin{note} Although this style can be used for plotting coloured surfaces, it - will lead to a huge memory footprint of \PyX together with a + will lead to a huge memory footprint of \PyX{} together with a long running time and large outputs. Improved support for coloured - surfaces are planned for the future. + surfaces is planned for the future. \end{note} \end{classdesc} @@ -694,7 +694,7 @@ defined as: This class is a style to plot bars into a two-dimensional graph. The bars are plotted on top of a specialized axis, namely a bar axis. The data column for this bar axis is named \code{Xname} where - \code{X} is an axis name. The bar value have a name an axis of the + \code{X} is an axis name. The bar value has the name of an axis of the other graph dimension. Suppose the name of this value axis is \code{Y} than you can stack further bars on top of this bar by providing additional data columns consecutively named @@ -740,7 +740,7 @@ implemented in \module{graph.key}. define whether the key should be placed horizontally and vertically inside of the graph or not. - \var{symbolwidth} and \var{symbolheight} is passed to the style to + \var{symbolwidth} and \var{symbolheight} are passed to the style to control the size of the style illustration. \var{symbolspace} is the space between the illustration and the text. \var{textattrs} are attributes for the text creation. They are merged with diff --git a/manual/mathtree.tex b/manual/mathtree.tex index f9972ba1..afe80ba9 100644 --- a/manual/mathtree.tex +++ b/manual/mathtree.tex @@ -3,10 +3,10 @@ At several points within \PyX{} mathematical expressions can be provided in form of string parameters. They are evaluated by the -module \verb|mathtree|. This module is not described futher in this +module \verb|mathtree|. This module is not described further in this user manual, because it is considered to be a technical detail. We just give a list of available operators, functions and predefined -variable names here here. +variable names here. \begin{description} \item[Operators:] diff --git a/manual/text.tex b/manual/text.tex index 246caf1c..f7c68b33 100644 --- a/manual/text.tex +++ b/manual/text.tex @@ -6,7 +6,7 @@ The \verb|text| module seamlessly integrates the famous typesetting technique of \TeX/\LaTeX{} into \PyX. The basic procedure is: \begin{itemize} -\item start a \TeX/\LaTeX{} instance as soon as an \TeX/\LaTeX{} +\item start a \TeX/\LaTeX{} instance as soon as a \TeX/\LaTeX{} preamble setting or a text creation is requested \item create boxes containing the requested text and shipout those boxes to the dvi file @@ -70,8 +70,8 @@ The \verb|texrunner| instance provides several methods to be called by the user. First there is a method called \verb|set|. It takes the same kewword arguments as the constructor and its purpose is to provide an access to the \verb|texrunner| settings for a given instance. This is -important for the \verb|defaulttextunner|. The \verb|set| method -fails, when a modification can't be applied anymore (e.g. +important for the \verb|defaulttexrunner|. The \verb|set| method +fails, when a modification cannot be applied anymore (e.g. \TeX/\LaTeX{} was already started). The \verb|preamble| method can be called before the \verb|text| method @@ -156,7 +156,7 @@ in \verb|\displaystyle| (\verb|nomathmode| removes this attribute) \section{Using the graphics-bundle with \LaTeX} -The packages in \LaTeX-graphics bundle (color.sty, graphics.sty, +The packages in the \LaTeX-graphics bundle (color.sty, graphics.sty, graphicx.sty, \ldots) make extensive use of \verb|\special| commands. Here are some notes on this topic. Please install the appropriate driver file \verb|pyx.def|, which defines all the specials, in your @@ -217,7 +217,7 @@ For reference purpose, the following specials can be handled by the Message parsers are used to scan the output of \TeX/\LaTeX. The output is analysed by a sequence of message parsers. Each of them analyses -the output and remove those parts of the output, it feels responsible +the output and removes those parts of the output, it feels responsible for. If there is nothing left in the end, the message got validated, otherwise an exception is raised reporting the problem. @@ -233,7 +233,7 @@ parser name&purpose\\ \medskip More specialised message parsers should become available as required. -Please feal free to contribute (e.g. with ideas/problems; code is +Please feel free to contribute (e.g. with ideas/problems; code is desired as well, of course). There are further message parsers for \PyX{}s internal use, but we skip them here as they are not interesting from the users point of view. diff --git a/manual/trafo.tex b/manual/trafo.tex index f80fe9ec..498c5705 100644 --- a/manual/trafo.tex +++ b/manual/trafo.tex @@ -2,7 +2,7 @@ \label{trafo} -With the \verb|trafo| modulo \PyX\ supports linear transformations, which can +With the \verb|trafo| module \PyX\ supports linear transformations, which can then be applied to canvases, B\'ezier paths and other objects. It consists of the main class \verb|trafo| representing a general linear transformation and subclasses thereof, which provide special operations @@ -70,7 +70,7 @@ followed by XXX\\ \section{Subclasses of trafo} -The \verb|trafo| module provides provides a number of subclasses of +The \verb|trafo| module provides a number of subclasses of the \verb|trafo| class, each of which corresponds to one \verb|trafo| method. They are listed in the following table: diff --git a/manual/unit.tex b/manual/unit.tex index 726dd75c..2c54b4a6 100644 --- a/manual/unit.tex +++ b/manual/unit.tex @@ -75,7 +75,7 @@ a numerical factor, converted to a string and compared with each other. \section{Subclasses of length} A number of subclasses of \verb|length| are already predefined. They -only differ in their defaults for \verb|type| and \verb|unit|. Note +only differ by their defaults for \verb|type| and \verb|unit|. Note that again the default value for the quantifier is \verb|1|, such that, for instance, \texttt{5*m(1)==m(5)}. @@ -96,7 +96,7 @@ Subclass of \texttt{length} & Type & Unit & Subclass of \texttt{length} & Type & \texttt{t\_pt(x)} & true & points & \texttt{w\_pt(x)} & width & points\\ \texttt{u\_m(x)} & user & m & \texttt{x\_m(x)} & \TeX & m \\ \texttt{u\_cm(x)} & user & cm & \texttt{x\_cm(x)} & \TeX & cm \\ -\texttt{u\_mm(x)} & user & mm & \texttt{x\_mm(x)} & \TeX & mm w\\ +\texttt{u\_mm(x)} & user & mm & \texttt{x\_mm(x)} & \TeX & mm \\ \texttt{u\_inch(x)} & user & inch & \texttt{x\_inch(x)} & \TeX & inch \\ \texttt{u\_pt(x)} & user & points & \texttt{x\_pt(x)} & \TeX & points\\ -- 2.11.4.GIT