Automating the Custom Chart

Each of the steps discussed above to create a custom chart interactively can be done with custom macros or functions. Here are the commands to create the custom chart:

 

W1: gsin(100, 0.01);setvunits("Volts")

W2: gcos(100, 0.01);setvunits("Amps")

 

To simplify processing, we define the following macros:

 

#define foc1 focus(1);scales(7);staggery(0);setxy(0,1,-4.8,1.2);spany(-1.5,1.5);setytic(1);setxtic(0.1);

 

#define foc2 focus(2);scales(14);staggery(0);setxy(0,1,-4.8,1.2);spany(-1.5,1.5);setytic(1);setxtic(0.1);

 

#define foc3 focus(3);scales(2);staggery(0);setxy(0,1,-2,6);spany(-2,2);setytic(2);

 

In W3, type the following commands:

 

W1;overlay(w2,red);overlay(xy(w1,w2),green);foc1;foc2;foc3;screenopt(1,1,0,1,1)