1State(3)              User Contributed Perl Documentation             State(3)
2
3
4

NAME

6       State - A package to keep track of plotting commands
7

SYNOPSIS

9         use PDL::Graphics::State;
10

DESCRIPTION

12       This is a very simple, at present almost trivial, package to keep track
13       of the current set of plotting commands.
14

USAGE

16       You create a new object by calling the "new" operator
17
18         $state = PDL::Graphics::State->new();
19
20       Then for each new command you call "add" on this object so that for a
21       call to "line" of the form
22
23         line $x, $y, $opt;
24
25       the call to "add" would be like
26
27         $state->add(\&line, 'line', [$x, $y], $opt);
28
29       which is stored internally as:
30
31         [\&line, 'line', [$x, $y], $opt]
32
33       The state can later be extracted using "get" which returns the state
34       object which is an array of anonymous arrays like the one above where
35       the first object is a reference to the function, the second an
36       anomymous array of arguments to the function and finally an anonymous
37       hash with options to the command.
38
39       If you know the order in which you inserted commands they can be
40       removed by calling "remove" with the number in the stack. No further
41       interaction is implemented except "clear" which clears the stack and
42       "copy" which returns a "deep" copy of the state.
43

AUTHOR

45       Jarle Brinchmann (jarle@astro.ox.ac.uk) after some prodding by Karl
46       Glazebrook.
47
48       All rights reserved. There is no warranty. You are allowed to
49       redistribute this software / documentation under certain conditions.
50       For details, see the file COPYING in the PDL distribution. If this file
51       is separated from the PDL distribution, the copyright notice should be
52       included in the file.
53
54
55
56perl v5.32.0                      2020-09-17                          State(3)
Impressum