Document new "set_mini" plot method - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrancesco Abbate <francesco.bbt@gmail.com>2012年02月01日 14:11:57 +0100
committerFrancesco Abbate <francesco.bbt@gmail.com>2012年02月01日 19:58:40 +0100
commit2bb30e5124ac8a9d2178bd514e900ce6c0f229fd (patch)
treeaacac765c8ec0324296a25bf2e9dbf964e41338c
parentebdf1b9f85a4dca54bd785b9b41308c5c6026845 (diff)
downloadgsl-shell-2bb30e5124ac8a9d2178bd514e900ce6c0f229fd.tar.gz
Document new "set_mini" plot method
Diffstat
-rw-r--r--doc/user-manual/graphics-categories-example.png bin0 -> 15123 bytes
-rw-r--r--doc/user-manual/graphics.rst 25
2 files changed, 25 insertions, 0 deletions
diff --git a/doc/user-manual/graphics-categories-example.png b/doc/user-manual/graphics-categories-example.png
new file mode 100644
index 00000000..37effa4b
--- /dev/null
+++ b/doc/user-manual/graphics-categories-example.png
Binary files differ
diff --git a/doc/user-manual/graphics.rst b/doc/user-manual/graphics.rst
index c929b420..8b65764a 100644
--- a/doc/user-manual/graphics.rst
+++ b/doc/user-manual/graphics.rst
@@ -514,6 +514,31 @@ You can add elements to a plot in any moments even when it is already shown. GSL
Save the plot in the given filename in SVG format.
Two optional parameters can be given to specify the width and height of the drawing area.
+
+ .. method:: set_mini(placement, p)
+
+ Add the plot ``p`` as a small plot is the side area of the main plot.
+ The argument ``placement`` is used to give the placement of the mini plot and should be on of the letters 'l', 'r', 'b', 't'.
+ They stands for "left", "right", "bottom" and "top" respectively.
+
+ .. method:: set_categories(axis, categories)
+
+ Configure the given ``axis`` (a letter, 'x' or 'y') to use a custom set of labels specified by ``categories``.
+ This latter should be a list of that gives in a sequence, the values where the label should be placed and the label text itself.
+ The coordinate refers to the plot system of coordinates.
+
+ Example::
+
+ use 'math'
+
+ p = graph.fxplot(sin, 0, 2*pi)
+ p:set_categories('x', {0, '0', pi, 'pi', 2*pi, '2 pi'})
+ p.title = 'Sin function'
+
+ will produce the following plot:
+
+ .. figure:: graphics-categories-example.png
+
.. attribute:: title
The title of the plot. You can change or set the title using
generated by cgit v1.2.3 (git 2.39.1) at 2025年10月04日 21:13:35 +0000

AltStyle によって変換されたページ (->オリジナル) /