From 1489a4b93023f2905398e852e4e169f7a6ee9c2a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Wobst?= Date: Wed, 24 May 2006 09:51:42 +0000 Subject: [PATCH] add example documentation to the split axes git-svn-id: https://pyx.svn.sourceforge.net/svnroot/pyx/trunk/pyx@2807 069f4177-920e-0410-937b-c2a4a81bcd90 --- examples/splitgraphs/minimal.py | 3 --- examples/splitgraphs/minimal.txt | 8 ++++++++ examples/splitgraphs/splitatvalue.py | 5 ----- examples/splitgraphs/splitatvalue.txt | 11 +++++++++++ 4 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 examples/splitgraphs/minimal.txt create mode 100644 examples/splitgraphs/splitatvalue.txt diff --git a/examples/splitgraphs/minimal.py b/examples/splitgraphs/minimal.py index 1be9856d..01d3c7de 100644 --- a/examples/splitgraphs/minimal.py +++ b/examples/splitgraphs/minimal.py @@ -1,6 +1,3 @@ -# In the most simple case we create a data column -# containing a tuple and use a splitaxis. - from pyx import * g = graph.graphxy(width=8, x=graph.axis.split()) diff --git a/examples/splitgraphs/minimal.txt b/examples/splitgraphs/minimal.txt new file mode 100644 index 00000000..badf1a61 --- /dev/null +++ b/examples/splitgraphs/minimal.txt @@ -0,0 +1,8 @@ +Minimal split-axis example + +This minimal example creates a split-axis by two simple modifications. ... +First a splitaxis instance is passed to the graph constructor and secondly the +data provided for this axis is modified to contain a tuple of two items. The +first item is used as a dictionary key to identify the subaxis, to which the +presented data belongs to. The second item in the tuple is used as the value on +this subaxis. diff --git a/examples/splitgraphs/splitatvalue.py b/examples/splitgraphs/splitatvalue.py index 57daf8d6..ad511d61 100644 --- a/examples/splitgraphs/splitatvalue.py +++ b/examples/splitgraphs/splitatvalue.py @@ -1,8 +1,3 @@ -# You can use the splitatvalue function to split data at -# certain values. When splitting at several positions, the -# splitatvalue function marks odd regions to be a "None", -# which will in the end be ignored by a splitaxis. - from pyx import * pf = graph.data.paramfunction diff --git a/examples/splitgraphs/splitatvalue.txt b/examples/splitgraphs/splitatvalue.txt new file mode 100644 index 00000000..c7ea5092 --- /dev/null +++ b/examples/splitgraphs/splitatvalue.txt @@ -0,0 +1,11 @@ +Split axis at certain values + +A typical use-case for a split axis is to use some special positions on the +axis to mark the axis breaks. ... For that the `splitatvalue` function is +available in all places, where expressions are evaluated in the `graph.data` +classes. Here we create a special parametric function where split positions for +the x axis are added by the `splitatvalue` function and the y function is a +simple polynomial of high order. Note that you can set several split positions +by additional parameters of the `splitatvalue` function. In that case +the `splitatvalue` function marks odd regions to be a "None", by which those +data values are ignored by the `splitaxis` instance. -- 2.11.4.GIT