#N struct plot-template float x float y array array1 array1-template array array2 array2-template array array3 array3-template;
#N struct array1-template float y;
#N struct array2-template float x float y;
#N struct array3-template float y float w;
#N canvas 561 23 519 318 12;
#N canvas 564 184 788 529 plot-template 0;
#X obj 558 392 struct plot-template float x float y array array1 array1-template array array2 array2-template array array3 array3-template, f 20;
#X text 27 51 Optional flags:;
#X text 32 217 Arguments:;
#X text 23 24 Creation arguments:;
#X msg 41 360 1;
#X msg 74 360 0;
#X text 129 380 (if no -v [field name] flag was given);
#X text 48 235 - optional word "curve" to specify Bezier curve \; - array field name to plot \; - color (0=black \, 999=white \, 900=red \, 90=green \, 9=blue \, 555=grey \, etc.) \; - line width \; - relative x and y location \; - x spacing, f 49;
#X text 558 354 here's the [struct] for all this:, f 19;
#X text 57 438 This plots a red trace (500) of width 1 starting at point (10 \, 15). Horizontal spacing is 20 and the black diamonds come from the template of the array1 element itself - check [pd array1-template]., f 54;
#X obj 515 195 plot -c array3 9 1 100 50 35;
#X text 453 231 This draws the blue curved array. If a "w" variable is present in the template as for array3 (see [pd array3-template]) \, the line width argument is ignored and the "w" variable sets the width value for each element. The value of 'w' is drawn in [pd array3-template]., f 41;
#X obj 74 407 plot array1 500 1 10 15 20;
#X text 46 74 - "-c": sets to Bezier curve plot \; - "-n": make invisible initially \; - "-v [const or name]": set visibility of array \; - "-vs [const or name]": to set visibility of element scalars \; - "-e [const or name]": enable/disable editing \; - "-x [name]": use different field name for x \; - "-y [name]": use different field name for y \; - "-w [name]": use different field name for w, f 52;
#X obj 479 54 plot -n curve array2 90 4 150 -30;
#X obj 479 22 tgl 19 0 empty empty empty 0 -10 0 12 #dfdfdf #000000 #000000 0 1;
#X text 505 22 <-- visibility;
#X text 430 86 The [plot] above plots a curved green spiral with: color 70 \, line width 3 \, location (100 \, 0). Open the [pd array2-template] subpatch to check the template for "array2". Since the template contains an "x" variable \, [plot] ignores the 'x spacing' argument and takes x from the data itself., f 48;
#X text 108 360 <-- inlet sets visibility (1: visible \, 0: invisible);
#X connect 4 0 12 0;
#X connect 5 0 12 0;
#X connect 15 0 14 0;
#X restore 266 139 pd plot-template;
#N canvas 565 310 468 256 array1-template 0;
#X obj 88 182 filledpolygon 0 0 0 -5 0 0 5 5 0 0 -5;
#X obj 82 79 struct array1-template float y;
#X text 62 25 template for array1 \, contains only a "y' field for the value of "y" in the array., f 51;
#X text 110 139 This adds a diamond shape to each element in the array, f 28;
#X restore 266 162 pd array1-template;
#N canvas 575 374 439 206 array2-template 0;
#X obj 78 115 struct array2-template float x float y;
#X text 26 32 template for array2. This also contains a "x' field for the 'x' spacing of elements \, so you can drag/set them anywhere and the 'x' spacing argument is ignored in [plot]., f 53;
#X text 71 154 no drawing instructions for the elements;
#X restore 266 184 pd array2-template;
#X text 21 268 see also:;
#X obj 25 20 plot;
#X obj 163 258 drawpolygon;
#N canvas 578 306 549 226 array3-template 0;
#X obj 151 98 struct array3-template float y float w;
#X text 53 28 template for array3. This contains a "w' field for line width \, so you can drag/set it for each element in the array \, so the line width argument is ignored in [plot]., f 62;
#X obj 164 140 drawnumber w -5 -15;
#X text 145 171 draw values for 'w' field;
#X restore 266 206 pd array3-template;
#X text 292 274 updated for Pd version 0.52;
#X obj 98 283 array;
#N canvas 166 29 391 243 plot-data 1;
#X scalar plot-template 33 78 \; -46 \; 75 \; -5 \; 47 \; 10 \; \; -9 -4 \; 0 10 \; 20 0 \; 0 -30 \; -40 0 \; 0 50 \; 53 -19 \; \; 50 7 \; 6 17 \; 15 10 \; 32 1 \; -5 4 \; -28 20 \; 18 5 \; \;;
#X coords 0 243 1 242 0 0 0;
#X restore 120 181 pd plot-data;
#X obj 146 283 element;
#X obj 8 51 cnv 1 500 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#N canvas 702 130 597 508 reference 0;
#X obj 9 45 cnv 5 575 5 empty empty INLET: 8 18 0 13 #202020 #000000 0;
#X obj 9 100 cnv 2 575 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 9 134 cnv 2 575 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 8 484 cnv 5 575 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X text 128 59 float -;
#X text 146 107 NONE, f 54;
#X obj 9 158 cnv 1 575 1 empty empty flags: 8 12 0 13 #9f9f9f #000000 0;
#X obj 9 328 cnv 1 575 1 empty empty args: 8 12 0 13 #9f9f9f #000000 0;
#X text 73 336 1) symbol -;
#X text 73 372 3) float* - color (default 0)., f 70;
#X obj 27 16 plot;
#X text 129 186 "-n": makes it invisible initially., f 61;
#X text 157 335 (optional) 'curve' sets to Bezier curve (default polygon).;
#X text 73 354 2) symbol -;
#X text 73 390 4) float* - line width (default 1)., f 70;
#X text 80 408 5) list* - relative x and y location (default 0 0)., f 69;
#X text 73 426 6) float* - x spacing., f 70;
#X text 174 449 * can also be field names.;
#X text 129 167 "-c": sets to Bezier curve plot., f 61;
#X text 66 263 "-x <symbol>": sets a different field name for x., f 70;
#X text 66 281 "-y <symbol>": sets a different field name for y., f 70;
#X text 66 300 "-w <symbol>": sets a different field name for w., f 70;
#X text 31 244 "-e <float/symbol": constant of field name to enable/disable mouse actions., f 75;
#X text 24 205 "-v <float/symbol>": constant of field name to make it visible/invisible., f 76;
#X text 17 224 "-vs <float/symbol>": constant of field name to set scalars visible/invisible., f 78;
#X text 157 353 array field name to plot., f 58;
#X text 185 59 sets visibility (1: visible \, 0: invisible) if no "-v" flag is given., f 48;
#X text 69 16 - draw array in a scalar.;
#X restore 333 21 pd reference;
#X text 431 22 <= click;
#X obj 8 242 cnv 1 500 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X obj 97 258 drawtext;
#X text 77 139 explanation is in here -->;
#X text 67 20 - draw array in a scalar;
#X text 74 63 Use [plot] to draw array fields in scalars. Arrays have a separate template for its elements \, whose drawing instructions are also drawn by [plot]., f 50;
