|5-min Time Zone - If True Plot Category|
19:16 @Ens_HA: This is the 5-min Time Zone template and DYO property form that creates the visual
19:17 @Ens_HA: The idea is to show some kind of fixed time period using color bands for a chart whose bars are variable time. So for this example the color bars change every 5 minutes.
19:17 @Ens_HA: Line A gets the bar's time stamp, and stores it in GV
9:18 @Ens_HA: Line B will read the time value, and divide it by the period size, which is #=5
19:18 @Ens_HA: if you want the color band to be a longer period of time, you would edit the # value to be the new period width in minutes.
9:19 @Ens_HA: the time then uses the modulo function to generate values in the range of [0,1,2,3]
19:19 @Ens_HA: there are other functions to do other modulos, but I like it doing a mod 4 - mod # is basically the remainder from a division
19:20 @Ens_HA: 10 mod 4 would be 2, because 2 is the remainder from the division of 10/4
19:21 @Ens_HA: so the value stored by Line B will be either a 0, a 1, a 2 or a 3
19:21 dblue2: Modular arithmetic is a system of arithmetic for integers, sometimes referred to as "clock arithmetic", where numbers "wrap around" after they reach a certain value (the modulus). For example, whilst 8 + 6 equals 14 in conventional arithmetic, in modulo 12 arithmetic the answer is two, as two is the remainder after dividing 14 by the modulus 12
19:22 @Ens_HA: we will use this as the basis for selecting 1 of 4 colors.
19:22 @Ens_HA: Lines D through G do the Zone coloring based on the current modulo of the time calculations
9:23 @Ens_HA: The new category IF True Plot will test the condition selected, and if this is True, then and only then will the Marker be shown.
19:23 @Ens_HA: So, when =0 we plot the green zone
19:23 @Ens_HA: when =1 we plot the blue zone
19:24 @Ens_HA: when =2 we plot the yellow zone
19:24 @Ens_HA: when =3 we plot the red zone
19:24 @Ens_HA: that covers all possibilities because  must be a 0, 1, 2, or a 3
19:24 @Ens_HA: if the line is False the marker is not plotted....... but the next line of the DYO will still execute/evaluate
9:25 @Ens_HA: ok, any questions about the design of this little example??
19:25 zol2: Nice Howard.
19:26 @Buffy2: Why is the none row in there?
Howard - the none row is a change of mind of doing something there.
It will just go on to the next line.
Last updated 01/28/2005