aboutsummaryrefslogtreecommitdiff
path: root/doc/pddp/plot-help.pd
blob: 15667312149723aa5e4f7f5e53f95b36fe466d6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
#N struct plot-help-template float x float y array array1 plot-help-array1-template
array array2 plot-help-array2-template array array3 plot-help-array3-template
;
#N struct plot-help-array1-template float y;
#N struct plot-help-array2-template float x float y;
#N struct plot-help-array3-template float y float w;
#N canvas 0 0 555 619 10;
#X obj 0 595 cnv 15 552 21 empty \$0-pddp.cnv.footer empty 20 12 0
14 -228856 -66577 0;
#X obj 0 0 cnv 15 552 40 empty \$0-pddp.cnv.header plot 3 12 0 18 -204280
-1 0;
#X obj 0 121 cnv 3 550 3 empty \$0-pddp.cnv.inlets inlets 8 12 0 13
-228856 -1 0;
#N canvas 107 245 436 344 META 0;
#X text 12 85 LIBRARY internal;
#X text 12 125 WEBSITE http://crca.ucsd.edu/~msp/;
#X text 12 25 LICENSE SIBSD;
#X text 12 105 AUTHOR Miller Puckette;
#X text 12 165 HELP_PATCH_AUTHORS Updated for Pd version 0.35. Jonathan
Wilkes revised the patch to conform to the PDDP template for Pd version
0.42.;
#X text 12 5 KEYWORDS control GUI data_structure array;
#X text 12 45 DESCRIPTION draw array elements of scalars;
#X text 12 65 INLET_0 float;
#X text 12 145 RELEASE_DATE 1997;
#X restore 500 597 pd META;
#X obj 0 205 cnv 3 550 3 empty \$0-pddp.cnv.outlets outlets 8 12 0
13 -228856 -1 0;
#X obj 0 229 cnv 3 550 3 empty \$0-pddp.cnv.argument arguments 8 12
0 13 -228856 -1 0;
#X obj 0 525 cnv 3 550 3 empty \$0-pddp.cnv.more_info more_info 8 12
0 13 -228856 -1 0;
#N canvas 109 428 428 163 Related_objects 0;
#X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
14 -204280 -1 0;
#X text 8 2 [plot] Related Objects;
#X obj 172 53 struct;
#X obj 222 53 drawpolygon;
#X obj 97 53 drawsymbol;
#X obj 302 53 drawcurve;
#X text 17 89 Other Data Structure Objects;
#X obj 255 123 element;
#X obj 86 123 get;
#X obj 117 123 set;
#X obj 146 123 getsize;
#X obj 200 123 setsize;
#X obj 32 123 pointer;
#X obj 26 53 drawnumber;
#X restore 102 597 pd Related_objects;
#X obj 78 130 cnv 17 3 65 empty \$0-pddp.cnv.let.0 0 5 9 0 16 -228856
-162280 0;
#X text 98 129 float;
#X text 98 183 list;
#X obj 491 3 plot;
#X obj 465 20 pddp/pddplink http://wiki.puredata.info/en/plot -text
pdpedia: plot;
#N canvas 92 134 428 403 plot-help-data 0;
#X scalar plot-help-template 32 98 \; 2 \; -32 \; 12 \; -54 \; -9 \;
\; 0 0 \; 7 14 \; 27 -10 \; 0 -30 \; -40 0 \; 0 50 \; 60 0 \; \; 11
7 \; 20 5 \; 22 14 \; -20 5 \; 20 11 \; -11 8 \; -17 16 \; \;;
#X obj 0 0 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
14 -204280 -1 0;
#X text 19 206 Above is a scalar defined by "plot-help-template". It
contains three arrays \, each of which has an associated [plot] object
that determines how they will be displayed.;
#X text 7 1 [plot] Window to Display Data Structures;
#X text 19 256 You can click and drag control points that correspond
to the elements of an array.;
#X text 19 286 If the [struct] that defines the array elements has
a "y" field but no "x" field \, then you can click on one control point
\, then drag horizontally to change multiple elements in one swipe
(as you can with the "Put" menu array).;
#X text 19 345 To see/edit the data itself \, select "properties" for
the scalar by right clicking on the purple square.;
#X restore 371 58 pd plot-help-data;
#N canvas 96 163 428 436 plot-help-template 0;
#X obj 22 42 plot array1 500 1 10 15 20;
#X text 19 67 This first example plots the red trace (500) \, width
1 \, at point (10 \, 15) \, with horizontal spacing 20 The black diamonds
come from the template of the array1 element itself.;
#X text 19 228 If a "w" variable is present in the template as for
array3 \, it is added to the line width.;
#X obj 21 374 filledpolygon 509 509 0 -10 -10 10 -10 10 10 -10 10;
#X obj 22 292 struct plot-help-template float x float y array array1
plot-help-array1-template array array2 plot-help-array2-template array
array3 plot-help-array3-template;
#X obj 22 127 plot curve array2 70 3 100 0;
#X obj 22 208 plot curve array3 9 1 120 50 20;
#X obj 0 0 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
14 -204280 -1 0;
#X text 7 1 [plot] plot-help-template;
#X text 19 269 Here is the [struct] for all this:;
#X text 19 149 This is the green spiral (color 70 \, line width 3 \,
location (100 \, 0). Since the template for array2 contains an "x"
variable \, play ignores x spacing requests and takes x from the data
itself.;
#X text 18 397 Purple square to mark the left upper corner of the scalar
;
#X restore 371 81 pd plot-help-template;
#N canvas 25 161 428 241 plot-help-array1-template 0;
#X obj 0 0 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
14 -204280 -1 0;
#X text 7 1 [plot] Element of "array1" in "plot-help-template";
#X obj 24 198 filledpolygon 0 0 0 -5 0 0 5 5 0 0 -5;
#X obj 23 168 struct plot-help-array1-template float y;
#X text 20 38 The following data structure is defined as an element
of "array1" in the data structure "plot-help-template". It defines
one "y" field \, which is a reserved field that controls the y-value
of GUI objects associated with this template. Notice there is no "x"
field defined-- this means that when the array is plotted \, you can
click on one of the elements (i.e. \, the small black squares defined
by [filledpolygon]) and drag horizontally to change the y-value for
other elements as well.;
#X restore 12 51 pd plot-help-array1-template;
#N canvas 18 155 428 183 plot-help-array2-template 0;
#X obj 0 0 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
14 -204280 -1 0;
#X text 7 1 [plot] Element of "array2" in "plot-help-template";
#X obj 22 134 struct plot-help-array2-template float x float y;
#X text 20 36 This data structure is defined as an element for "array2"
in "plot-help-template". No drawing instructions are associated with
this [struct]. The only graphic visible in the "plot-help-data" subwindow
is the trace itself. The thickness and color of the line are defined
solely using the 2nd [plot] object in the "plot-help-template" subwindow.
;
#X restore 12 73 pd plot-help-array2-template;
#N canvas 19 222 428 285 plot-help-array3-template 0;
#X obj 0 0 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
14 -204280 -1 0;
#X text 7 1 [plot] Element of "array3" in "plot-help-template";
#X obj 22 223 struct plot-help-array3-template float y float w;
#X text 19 36 This data structure is defined as the element for "array3"
in "plot-help-template". Since the reserved "w" field is defined here
\, you can adjust the width of the line at each element (the mouse
pointer will change to two vertical arrows when you hover over an area
that allows you to change the width). The graphical result is the wavy
blue line in the "plot-help-data" window. For both width and y-value
\, you can click an element and drag horizontally to select and adjust
other elements.;
#X text 19 174 For both width and y-value \, you can click an element
and drag horizontally to select and adjust other elements.;
#X restore 12 94 pd plot-help-array3-template;
#X text 202 82 explanation is in here-->;
#X text 168 129 - sending a zero to the inlet of [plot] will turn off
visibility for the drawing. A nonzero value will turn it back on. By
default the drawing is visible \, unless the -v flag is given as an
argument.;
#X text 98 210 (none);
#X text 11 23 draw array elements of scalars;
#X text 168 183 - a list will be truncated to the first element.;
#X text 80 414 2) float;
#X text 80 442 3) float;
#X text 80 459 4) float;
#X text 80 477 5) float;
#X text 80 493 6) float;
#X text 168 397 - the field to plot.;
#X text 168 414 - RGB color for the trace (0=black \, 999=white \,
900=red \, 90=green \, 9=blue \, 555=grey \, etc.).;
#X text 168 442 - line width of the trace.;
#X text 168 459 - relative x location.;
#X text 168 477 - relative y location.;
#X text 168 493 - x spacing (ignored if the template for the array
contains an "x" variable).;
#X text 80 247 0-6 flags;
#X text 168 248 - "-n" flag to make the drawing invisible initially.
;
#X text 168 264 - "-v [variable]" flag to assign a variable to make
the number visible/invisible.;
#X text 168 292 - "-vs [constant or variable]" flag to set visibility
of scalars along the path of the plot.;
#X text 168 319 - "-x [variable]" flag to use a different x variable.
;
#X text 168 339 - "-y [variable]" flag to use a different y variable.
;
#X text 168 359 - "-w [variable]" flag to use a different w variable.
;
#X text 168 376 - word "curve" to specify bezier.;
#X text 80 397 1) symbol atom;
#X text 79 263 (symbols atoms);
#X obj 4 597 pddp/pddplink all_about_help_patches.pd -text Usage Guide
;
#X obj 98 545 pddp/pddplink all_about_arrays.pd;
#X obj 98 575 pddp/pddplink ../4.data.structures/05.array.pd -text
doc/4.data.structures/05.array.pd;
#X obj 288 530 pddp/pddplink ../4.data.structures/09.scaling.pd -text
doc/4.data.structure/09.scaling.pd;
#X obj 288 545 pddp/pddplink ../4.data.structures/10.onoff.pd -text
doc/4.data.structures/10.onoff.pd;
#X obj 288 560 pddp/pddplink ../4.data.structures/11.array.controls.pd
-text doc/4.data.structures/11.array.controls.pd;
#X obj 98 530 pddp/pddplink all_about_z_order.pd;
#X obj 98 560 pddp/pddplink scalar-help.pd;