From 19fb540f1afeddf91a63d5e09810f87f895f89d7 Mon Sep 17 00:00:00 2001 From: Gert Ingold Date: Wed, 31 Mar 2004 07:57:29 +0000 Subject: [PATCH] info on changes added question on docs expanded typos corrected git-svn-id: https://pyx.svn.sourceforge.net/svnroot/pyx/trunk/pyx@1613 069f4177-920e-0410-937b-c2a4a81bcd90 --- faq/pyxfaq.tex | 45 +++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/faq/pyxfaq.tex b/faq/pyxfaq.tex index 7b3aa90d..f60ac6d9 100644 --- a/faq/pyxfaq.tex +++ b/faq/pyxfaq.tex @@ -101,12 +101,15 @@ capable of printing PostScript files directly, \texttt{ghostscript} may also be useful to translate the EPS file produced by \PyX{} into something your printer will understand.} -\question{a}{Where can I get help if my question is not answered in this FAQ?} +\question{a}{Where can I get help if my question is not answered in this +FAQ? \changed} {} -{The \PyX{} sources contain a reference manual and a set of examples -demonstrating various features of \PyX. If the feature you are looking for is -among them, using the appropriate part of the example code or adapting it for -your purposes may help. +{The \PyX{} sources contain a reference manual which is also available +online at \url{http://pyx.sourceforge.net/manual/}. Furthermore, there +exists a set of examples demonstrating various features of \PyX, which is +available in the sources or can be browsed at \url{http://pyx.sourceforge.net/examples.html}. +If the feature you are looking for is among them, using the appropriate part +of the example code or adapting it for your purposes may help. There is also a user discussion list about \PyX{} which you can subscribe to at \url{http://lists.sourceforge.net/lists/listinfo/pyx-user}. The archive of @@ -151,7 +154,7 @@ but \textbf{freely usable and distributable, even for commercial use}. information on Python including tutorials. } -\question{c}{What do I need to import in order to use \PyX?} +\question{c}{What do I need to import in order to use \PyX? \changed} {checked for 0.6} {It is recommended to begin your Python code with \begin{progcode} @@ -193,7 +196,8 @@ c.text(0, 0, r"\${\cs alpha}{\cs beta}{\cs gamma}\$") \subsection{General aspects} -\question{c}{How do I generate a graph from data as simply as possible?} +\question{c}{How do I generate a graph from data as simply as possible? +\changed} {checked for 0.6} {\label{q:mingraphdata} Suppose that you have a data file \texttt{x.dat} containing values for @@ -216,7 +220,8 @@ A minimal example is also provided in the \PyX{} distribution as \path{examples/graphs/minimal.py}. } -\question{a}{How do I generate a graph of a function as simply as possible?} +\question{a}{How do I generate a graph of a function as simply as possible? +\changed} {checked for 0.6} {The following example will draw a parabola: \begin{progcode} @@ -238,7 +243,7 @@ Another, slightly more complex, example is also provided in the \PyX{} distribution as \path{examples/graphs/piaxis.py}. } -\question{a}{How can I stack graphs?} +\question{a}{How can I stack graphs? \changed} {} {\PyX{} always needs a canvas to draw on. One possibility therefore consists in creating a new canvas with @@ -294,7 +299,7 @@ in the last line requests to write the contents of this canvas to a file. %\end{progcode} } -\question{a}{How can I plot grid data? \new} +\question{a}{How can I plot grid data? \changed} {} {\PyX{} offers support for plotting three-dimensional data as two-dimensional color plots or grey-scale plots and of vector fields by providing ways to @@ -316,11 +321,11 @@ g.dodata() Here, we assume that the data are stored in \texttt{datafile.dat} and the columns contain $x_\mathrm{min}$, $x_\mathrm{max}$, $y_\mathrm{min}$, $y_\mathrm{max}$, and the color value in this order. The columns are -numbered from 1, since the 0th column contain the line number. To +numbered from 1, since the 0th column contains the line number. To determine the color, we use the \texttt{ReverseRainbow} palette. The last line instructs \PyX{} to plot the rectangles before plotting the axes. Otherwise, the axes might be covered partially by the rectangles -and, in particular, the ticks might not be visible. Grey-scale plots +and, in particular, the ticks might not be visible. Gray-scale plots can easily be generated by specifying the palette \texttt{Gray} or \texttt{ReverseGray} (cf.\ appendix C of the manual for a list of predefined palettes). @@ -380,11 +385,11 @@ tg = graph.graphxy(width=10,\\ Previous releases of \PyX{} offered the possibility to stroke a zero line for a given axis by specifying \texttt{zeropathattrs} in the painter constructor. This feature was removed in \PyX{} 0.6, but you can easily -draw a zero line by your own. In order to do so you first have fix the -layout information of the graph. Then you can use, for instance, the -\texttt{ygridpath} method of a graph which returns a grid path at the given -axis value. The so obtainted path can easily be stroked on the graph -canvas: +draw a zero line by your own. In order to do so you first have to fix the +layout information of the graph (see first line of the code given below). +Then you can use, for instance, the \texttt{ygridpath} method of a graph +which returns a grid path at the given axis value. The so obtained path +can easily be stroked on the graph canvas: \begin{progcode} g.finish()\\ g.stroke(g.ygridpath(0)) @@ -394,7 +399,7 @@ g.stroke(g.ygridpath(0)) \subsection{Data properties} -\question{a}{How do I choose the symbol?} +\question{a}{How do I choose the symbol? \changed} {checked for 0.6} {\label{q:choose_symbol} Suppose a graph called \texttt{g} has been initialized, e.g. by using @@ -408,7 +413,7 @@ g.plot(graph.data.file("test.dat"),\\ \end{progcode} } -\question{a}{How do I choose the color of the symbols?} +\question{a}{How do I choose the color of the symbols? \changed} {checked for 0.6} {Colors are not properties of the symbol as such and can therefore not be specified in \texttt{symbolattrs} directly. The color is rather related @@ -423,7 +428,7 @@ graph.style.symbol(graph.style.symbol.circle,\\ you will obtain a circle filled in green with a red borderline. } -\question{a}{How do I choose the line style?} +\question{a}{How do I choose the line style? \changed} {checked for 0.6} {If you do not want to use symbols, you can set the line style as in this example -- 2.11.4.GIT