ÿþ< ! - -  
 / * *  
 T h i s   f i l e   i s   j s g r a p h 2 . j s ,   a n d   n o t   j s g r a p h 4 . j s  
 2 0 1 1 - 0 1 - 1 0 - 1 2 - 0 1   i n   j s g r a p h 2 . j s   a d d e d  
   v a r   s h o w X Y c o o r d 1 o r N o t 0  
   v a r   x a t L ,   y a t L  
 Y o u   c a n   s w i t c h   f r o m    
 h t t p : / / f r e e m a n 2 . c o m / j s g r a p h 2 . j s    
 t o    
 h t t p : / / f r e e m a n 2 . c o m / j s g r a p h 4 . j s  
 i f   y o u   n e e d   O N L Y   X Y G r a p h . j s   :   v 2 . 3  
 L i u , H s i n h a n   2 0 1 1 - 0 1 - 1 0 - 1 2 - 1 6  
  
  
 2 0 0 9 - 0 6 - 1 1 - 1 4 - 3 5   s t a r t  
 T o   u s e   t h i s   f i l e   j s g r a p h 2 . j s ,   i n   y o u r   w e b  
 p a g e   a d d   n e x t   c o d e  
  
 < s c r i p t   t y p e = " t e x t / j a v a s c r i p t "  
   s r c = h t t p : / / f r e e m a n 2 . c o m / j s g r a p h 2 . j s >  
 < / s c r i p t >  
  
 ( a n d   a d d   V M L   d e c l a r a t i o n   c o d e   b e l o w )  
  
 t h e n   i n   y o u r   w e b   p a g e   y o u   c a n   c a l l   t h e  
 f o l l o w i n g   f u n c t i o n s  
  
 f u n c t i o n   X Y L i n e ( )  
 f u n c t i o n   A r r o w ( )  
 f u n c t i o n   L a b e l ( )  
 f u n c t i o n   X Y G r a p h ( )  
 X Y G r a p h . p r o t o t y p e . P l o t   =   f u n c t i o n   ( X Y L i n e )  
 X Y G r a p h . p r o t o t y p e . D e l e t e L a s t   =   f u n c t i o n   ( )  
 X Y G r a p h . p r o t o t y p e . F i n d e d g e   =   f u n c t i o n   ( x 1 , x 2 , y 1 , y 2 , x m a x , x m i n , y m a x , y m i n )  
 X Y G r a p h . p r o t o t y p e . V M L p o i n t s h a p e   =   f u n c t i o n   ( s h a p e n a m e )  
 X Y G r a p h . p r o t o t y p e . D r a w a r r o w   =   f u n c t i o n   ( a r r o w d e f )  
 X Y G r a p h . p r o t o t y p e . D r a w l a b e l   =   f u n c t i o n   ( l a b e l d e f )  
 / / a b o v e   i s   w r i t t e n   b y   J .   G e b e l e i n ,   L a s t   U p d a t e d   2 0 0 6 . 0 1 . 1 1  
 / / b e l o w   i s   A b   h i e r   ( 1 7 .   3 .   2 0 0 0 )   v o n   K e n ' s   S c r i p t   & # 2 5 2 ; b e r n o m m e n :  
 f u n c t i o n   f a c t o r i a l ( n )  
 f u n c t i o n   l o g g a m m a ( x )  
 f u n c t i o n   g a m m a ( x )  
 / / b e l o w   i s   w r i t t e n   b y   L i u H H   ( f r e e m a n 2 . c o m )  
 f u n c t i o n   s t e p f ( t 0 , b g n 0 )   / / s t e p   f u n c t i o n  
 f u n c t i o n   o p e n 0 l x r ( x x )   / / o p e n / c l o s e   d o c u m e n t  
 f u n c t i o n   c l o s e l x r ( y y )   / /  
 f u n c t i o n   o p e n T a b l e ( d r a w I D , t a b l e 0 1 )  
 / / o p e n T a b l e ( )   w o r k   w i t h   f u n c t i o n   X Y G r a p h ( )    
 / / o p e n T a b l e ( )   a l l o w   u s e   X Y G r a p h ( )   m a n y   t i m e s  
 2 0 0 9 - 0 6 - 1 1 - 1 4 - 4 7   s t o p  
  
 / / 9 5 0 6 2 4 1 3 4 1   c h a n g e   ' b o l d '   t o   ' r e g u l a r '  
 / / 9 5 0 6 2 4 1 3 4 7   c h a n g e   ' b o l d '   t o   ' r e g u l a r '  
 / / 9 5 0 6 2 4 1 3 5 5   c h a n g e   ' A r i a l '   t o   ' D o t u m '   c h a r a c t e r   t h i n n e r  
  
 2 0 0 9 - 0 6 - 1 1 - 1 4 - 5 2   s t a r t  
 t h i s   f i l e  
 h t t p : / / f r e e m a n 2 . c o m / j s g r a p h 2 . j s  
 i s   p a r t   o f  
 h t t p : / / f r e e m a n 2 . c o m / g r a p h 0 9 e . h t m  
  
 N o w   a n y   f i l e   c a n   i n c l u d e   j s g r a p h 2 . j s   t o   a d d  
 g r a p h   f u n c t i o n .   B u t   n e e d   t o   p a y   a t t e n t i o n   t o  
 n e x t   t w o   p o i n t s .  
  
 F i r s t :     o n l y   M S I E   5 . 0   a n d   l a t e r   s u p p o r t   V M L   c o d e  
                 V M L   =   V e c t o r   M a r k u p   L a n g u a g e  
 S e c o n d :   g r a p h   p a g e   m u s t   i n c l u d e   n e x t   t h r e e   l i n e s  
                 o n   t o p   o f   p a g e   i n   < h e a d >   a n d   < / h e a d >  
 [ [  
 < s t y l e   t y p e = " t e x t / c s s " >  
 	 v \ : *   {   b e h a v i o r :   u r l ( # d e f a u l t # V M L ) ;   }  
 < / s t y l e >  
 ] ]  
  
 o t h e r w i s e   a l l   g r a p h   e l e m e n t s   d i s - i n t e g r a t e ! !  
  
 Y o u   c a n   f i n d   e x a m p l e   c o d e   a t   n e x t   U R L  
 h t t p : / / w w w . s t r u c t u r a . i n f o / X Y G r a p h / E x a m p l e s . h t m  
 o r   F r e e m a n ' s   w e b   p a g e  
 h t t p : / / f r e e m a n 2 . c o m / g r a p h 0 3 e . h t m  
 a n d  
 h t t p : / / f r e e m a n 2 . c o m / g r a p h 0 9 e . h t m  
  
 g r a p h 0 3 e . h t m   u s e   o l d e r   v e r s i o n   o f   o p e n T a b l e ( )  
 g r a p h 0 9 e . h t m   u s e   n e w e r   v e r s i o n   o f   o p e n T a b l e ( )  
 s t r u c t u r e   s l i g h t   d i f f e r e n t   a n d   n o t   c o m p a t i b l e .  
  
 y o u   c a n   l e a r n   f r o m  
 E x a m p l e s . h t m   n o n - o p e n T a b l e ( )   d r a w i n g   c o d e  
 g r a p h 0 3 e . h t m   n o n - o p e n T a b l e ( )   d r a w i n g   c o d e  
 g r a p h 0 9 e . h t m   u s e - o p e n T a b l e ( )   d r a w i n g   c o d e  
 i n   o t h e r   w o r d s ,   i g n o r e  
 g r a p h 0 3 e . h t m   u s e - o p e n T a b l e ( )   d r a w i n g   c o d e  
  
 n o n - o p e n T a b l e ( )   d r a w i n g   c o d e   i s   p o w e r f u l .  
 I t   a l l o w   y o u   d r a w   m a n y   l i n e s ,   a l l o w   y o u   p u t  
 m a n y   a r r o w   m a n y   l a b e l s .   B u t   y o u   m u s t   w r i t e  
 p r o g r a m   t o   d r a w   c u r v e s .  
  
 u s e - o p e n T a b l e ( )   d r a w i n g   c o d e   a l l o w   a t   m o s t  
 f i v e   l i n e s ,   a t   m o s t   o n e   a r r o w ,   a t   m o s t   o n e  
 l a b e l .   Y o u   d o   n o t   n e e d   t o   w r i t e   p r o g r a m .  
 u s e - o p e n T a b l e ( )   d r a w i n g   c o d e   i s   a   l a z y - b o y  
 d e s i g n .  
  
 T h a n k   y o u   f o r   v i s i t i n g   F r e e m a n ' s   w e b   s i t e .  
 F r e e m a n    
 2 0 0 9 - 0 6 - 1 1 - 1 5 - 1 2   s t o p  
 / * * /  
  
  
 / / 2 0 1 0 - 1 2 - 1 7 - 2 2 - 3 0   ( / / 9 9 1 2 1 7 2 2 3 0 )  
 / / T h i s   v e r s i o n   X Y G r a p h   v 2 . 3   i s   m o d i f i e d  
 / / a d d e d  
 v a r   s h o w X Y c o o r d 1 o r N o t 0 = 1 ;   / / 9 9 1 2 1 4 0 6 4 1  
  
 / / 2 0 1 0 - 1 2 - 2 8 - 1 6 - 3 3   ( 9 9 1 2 2 8 1 6 3 3 )  
 / / ' L '   i s   a   s y m b o l   o f   x - a x i s   a n d   y - a x i s  
 / / c r o s s   p o i n t .  
 / / x a t L = 0 ;   m e a n   t h a t   a t   x y   c r o s s   p o i n t  
 / / x   h a s   v a l u e   z e r o .   S i m i l a r l y   f o r   y a t L = 0 ;  
 v a r   x a t L = 0 ;  
 v a r   y a t L = 0 ;    
 / / d e f i n e   a s   g l o b a l   v a r i a b l e ,   a l l o w   o t h e r    
 / / f u n c t i o n   t o   m o d i f y   x , y   v a l u e   a t   c r o s s .  
 / / s e e   f u n c t i o n   x y a t L ( a r g 1 )   a t  
 / /   h t t p : / / f r e e m a n 2 . c o m / x y g r a p h 2 . h t m  
 / / 2 0 1 0 - 1 2 - 2 8 - 1 6 - 3 9   ( 9 9 1 2 2 8 1 6 3 9 )  
  
  
 / * = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =  
  
   X Y G r a p h . j s   :   v 2 . 3  
  
   b y   J .   G e b e l e i n ,   L a s t   U p d a t e d   2 0 0 6 . 0 1 . 1 1  
  
   C o n t a c t :   i n f o @ S t r u c t u r a . i n f o  
  
   A l l   r i g h t s   r e s e r v e d .  
   C o p y r i g h t   2 0 0 6   S t r u c t u r a . i n f o  
  
  
   T h i s   s c r i p t   g e n e r a t e s   a n   X Y   G r a p h  
   u s i n g   V e c t o r   M a r k u p   L a n g u a g e   ( V M L )  
   a n d   r e t u r n s  
   a n   h t m l   s t r i n g   f o r   d i s p l a y   v i a  
   J a v a s c r i p t .     L a b e l s   f o r   p o i n t s   o n  
   a   l i n e ,   i n d i v i d u a l  
   l a b e l s   a n d   a r r o w s   m a y   b e   d r a w n   w i t h  
   f u l l y   c u s t o m i z a b l e   f e a t u r e s .    
   M u l t i p l e   l i n e s    
   w i t h   u n l i m i t e d   p o i n t s   a n d   c u s t o m i z a b l e  
   f o r m a t s   c a n   b e   d r a w n   o n   t h e   s a m e   p l o t  
   w i t h    
   i n t e l l i g e n t   d a t a   a x e s   t h a t   p r o v i d e   a  
   b e s t   f i t   t o   t h e   d a t a   f o r   s i m p l e ,   d y n a m i c    
   p r o g r a m m i n g .      
  
   T h e   V M L   u s e d   b y   t h i s   s c r i p t   i s   f u l l y  
   s u p p o r t e d   b y   I n t e r n e t   E x p l o r e r   5   o r  
   l a t e r ,    
   a n d   w i l l   r u n   o n   a n y   w e b s i t e   o r   i n t r a n e t ,  
   o n l i n e   o r   o f f l i n e .     D a t a   f o r   t h e   g r a p h  
   m a y   b e   g e n e r a t e d   f r o m   s t a t i c   o r   d y n a m i c  
   J a v a s c r i p t   a n d   u s e r   f o r m   i n t e r f a c e s ,   o r  
   e v e n   f r o m   c o m p l e x   a c t i v e   s e r v e r   d a t a b a s e  
   p r o g r a m s .  
  
   U s e   o f   t h i s   c o d e   i s   f r e e   f o r   a l l  
   n o n - c o m m e r c i a l   w e b s i t e s .     I f   y o u   f i n d  
   t h i s   c o d e  
   t o   b e   u s e f u l ,   I   w i l l   g l a d l y   a c c e p t  
   P a y P a l   d o n a t i o n s   t o   i n f o @ S t r u c t u r a . i n f o .  
   I    
   p r o v i d e   f r e e   e m a i l   s u p p o r t   a n d   w i l l   t r y  
   t o   a c c o m o d a t e   y o u r   v a r i o u s   n e e d s   i n t o  
   i m p r o v i n g   t h i s   p r o g r a m .  
  
   F o r   c o m m e r c i a l   u s e   I   a s k   f o r   a   o n e   t i m e  
   l i c e n s i n g   f e e   o f   $ 3 9 . 9 5   p e r   d o m a i n ,   o r    
   $ 9 9 . 9 5   f o r   a n   u n l i m i t e d   l i c e n s e .   B o t h  
   w i l l   c o v e r   a l l   f u t u r e   v e r s i o n   u p g r a d e s  
   a n d    
   a l l o w   f o r   c u s t o m i z a t i o n   o f   t h e   s o u r c e  
   c o d e .   A n   u n l i m i t e d   l i c e n s e   w i l l   a l l o w  
   u n r e s t r i c t e d   u s e   b y   a   s i n g l e   o r g a n i z a t i o n  
   i n c l u d i n g   r e d i s t r i b u t i o n   o r   r e s a l e   a s    
   s u p p o r t i n g   c o d e   f o r   a   s o f t w a r e   p r o d u c t .  
  
   P l e a s e   l e a v e   t h i s   h e a d e r   i n t a c t   i f   y o u  
   i n t e n d   o n   s h a r i n g   t h i s   c o d e .  
  
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =  
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =  
  
 " X Y G r a p h "   o b j e c t   d o c u m e n t a t i o n  
  
 I n i t i a l i z e :    
 	 v a r   M y G r a p h   =   n e w   X Y G r a p h ( ) ;  
 	 M y G r a p h . x m a x   =   1 0 ;  
   / /   s e t   p r o p e r t i e s   a s   d e s i r e d  
 	 	  
 P r o p e r t i e s :    
 	 S e e   c o n s t r u c t o r   s c r i p t   w i t h  
   i n l i n e   c o m m e n t s   b e l o w .  
 	  
 M e t h o d s :  
 	 M y G r a p h . P l o t ( X Y L i n e   [ ,   X Y L i n e _ 1 ,   . . . ] )  
   / /   r e t u r n s   h t m l   c o d e   f o r   d i s p l a y  
  
 N o t e s :  
  
   I n p u t   x , y   c o o r d i n a t e   p a i r s   u s i n g   t h e  
   " X Y L i n e "   o b j e c t   f o u n d   i n   t h i s   s c r i p t .  
  
   T h e   o n l y   r e q u i r e d   i n p u t   i s   t h e   x   a n d  
   y   d a t a ,   a l l   f o r m a t t i n g   a n d   o t h e r  
   p a r a m e t e r s   e i t h e r   h a v e   d e f a u l t   v a l u e s  
   d e f i n e d   i n   t h i s   s c r i p t ,   o r   a r e  
   a u t o m a t i c a l l y   c a l c u l a t e d   a s   r e q u i r e d  
   t o   b e s t   d i s p l a y   t h e   d a t a .  
  
   M u l t i p l e   X Y L i n e   o b j e c t s   m a y   b e   p a s s e d  
   t o   t h e   P l o t   f u n c t i o n   f o r   g r a p h i n g .  
  
   E x t r e m e   v a l u e s   + / - 9 9 9 E + 9 9   a n d   " N a N "  
   a r e   c l i p p e d   f r o m   t h e   d a t a   s e t .  
  
   U n l i k e   s t a n d a r d   X Y   g r a p h s ,   l i n e s   a r e  
   d r a w n   p o i n t   t o   p o i n t   i n   a n y   d i r e c t i o n  
   w i t h o u t   l i m i t a t i o n .     T h i s   a l l o w s   s t e p  
   f u n c t i o n s ,   c i r c l e s ,   s h a p e s ,   e t c .  
  
   T h i s   s c r i p t   d o e s   n o t   o p t i m i z e   d a t a   f o r  
   b e t t e r   r e s o l u t i o n ,   i t   i s   u p   t o   t h e  
   p r o g r a m m e r   t o   i n p u t   t h e   d a t a   s p a c i n g   a s  
   d e s i r e d .  
  
   G e n e r a t i n g   s m o o t h   o u t p u t   r e q u i r e s  
   i n c r e a s i n g   t h e   n u m b e r   o f   d a t a   p o i n t s  
   a t   t h e  
   e x p e n s e   o f   c o m p u t a t i o n   t i m e .    
   G e n e r a l l y ,   1 0 0 0   p o i n t s   o r   l e s s   i s  
   a d e q u a t e .  
    
   F o r m a t t i n g   f o r   t e x t   m a y   b e   m o d i f i e d  
   u s i n g   C S S .  
  
   F o r m a t t i n g   f o r   t h e   a x e s   a n d   l i n e s   m a y  
   b e   m o d i f i e d   u s i n g   V M L   s t y l e s ,   f o r   m o r e    
   i n f o r m a t i o n   o n   V M L   s e e   t h e   W 3 C  
   d e f i n i t i o n   p a g e :  
   h t t p : / / w w w . w 3 . o r g / T R / N O T E - V M L  
  
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =  
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =  
  
 " X Y L i n e "   o b j e c t   d o c u m e n t a t i o n  
  
 I n i t i a l i z e :    
 	 v a r   M y L i n e   =   n e w   X Y L i n e ( ) ;  
 	 M y L i n e . x   =   [ 1 ,   2 ,   3 ,   4 ] ;  
   / /   s e t   x   a n d   y   d a t a   p o i n t s  
 	 M y L i n e . l a b e l   =   " p l o t   1 " ;  
   / /   s e t   p r o p e r t i e s   a s   d e s i r e d  
 	 	  
 P r o p e r t i e s :    
 	 S e e   c o n s t r u c t o r   s c r i p t   w i t h  
   i n l i n e   c o m m e n t s   b e l o w .  
  
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =  
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = * /  
  
  
 f u n c t i o n   X Y L i n e ( )   {  
  
 	 / /   A r r a y s   f o r   h o l d i n g   x ,   y   c o o r d i n a t e   v a l u e s   a n d   p o i n t   l a b e l s  
  
 	 t h i s . x   =   n e w   A r r a y ( ) ;  
 	 t h i s . y   =   n e w   A r r a y ( ) ;  
 	 t h i s . l a b e l s   =   n e w   A r r a y ( ) ;  
 	  
 	 / /   A s s i g n   V M L   c o m p l i a n t   p r o p e r t i e s   f o r   t h e   l i n e .  
 	 / /   N o t e   t h a t   n o n - p r i m a r y   c o l o r s   m u s t   b e   i n   # h e x   o r   r b g ( r , g , b )   f o r m a t .  
  
 / /   9 5 0 6 1 6 2 0 4 0   h e r e  
 / /   c o l o r = ' r e d '   o r  
 / /   c o l o r = ' b l u e '   d e t e r m i n e   c u r v e   c o l o r  
 / / 	 t h i s . V M L s t r o k e   =   " w e i g h t = ' 1 p t ' ;   c o l o r = ' r e d ' ;   d a s h s t y l e = ' s o l i d ' ; " ;  
 / /   9 5 0 6 2 0 1 9 5 7   o n l y   h e r e   c h a n g e   c o l o r  
 / / 	 t h i s . V M L s t r o k e   =   " w e i g h t = ' 3 p t ' ;   c o l o r = ' r e d ' ;   d a s h s t y l e = ' s o l i d ' ; " ;  
 	 t h i s . V M L s t r o k e   =   " w e i g h t = ' 1 p t ' ;   c o l o r = ' b l u e ' ;   d a s h s t y l e = ' s o l i d ' ; " ;  
  
  
 	 t h i s . d r a w l i n e = t r u e ; 	 / /   s e t   t o   t r u e   o r   f a l s e  
  
 	 / /   A s s i g n   a   l a b e l   f o r   t h e   l i n e  
  
 	 t h i s . l a b e l   =   " l i n e " ; 	 / /   d i s p l a y e d   w h e n   m o u s e   i s   o v e r   l i n e  
 	 t h i s . l a b e l f o n t   =   " ' A r i a l ' " ;  
 	 t h i s . l a b e l s i z e   =   " 8 " ;   / /   f o n t   s i z e   i n   " p t "  
 	 t h i s . l a b e l c o l o r   =   " b l a c k " ;  
  
 	 / /   A s s i g n   a   V M L   s h a p e t y p e   f o r   p l o t t i n g   d a t a   p o i n t s ,   s e e   d e f i n i t i o n s   a t   b o t t o m   o f   s c r i p t .  
 	 / /   U s i n g   t h e   ' n o n e '   s h a p e t y p e   p l o t s   i n v i s i b l e   p o i n t s   a n d   a l l o w s   c o o r d i n a t e s   t o   b e  
 	 / /   s h o w n   w h e n   t h e   m o u s e   i s   o v e r   t h e   p o i n t .     S e t   ' d r a w p o i n t s '   t o   f a l s e   t o   t u r n   o f f  
 	 / /   t h e   p o i n t s   c o m p l e t e l y   a n d   s p e e d   u p   g r a p h i n g   f o r   e x t e n s i v e   d a t a   s e t s .     T h e   g r a p h   s c r i p t  
 	 / /   a u t o m a t i c a l l y   t u r n s   o f f   p o i n t s   i f   t h e   d a t a   s e t   h a s   m o r e   t h a n   1 0 0 0   p o i n t s .  
  
 	 t h i s . V M L p o i n t s h a p e t y p e = " d i a m o n d " ; 	 / /   [   d i a m o n d ,   s q u a r e ,   t r i a n g l e ,   c i r c l e ,   x ,   n o n e   ]  
 	 t h i s . d r a w p o i n t s = t r u e ; 	   	 / /   s e t   t o   t r u e   o r   f a l s e  
 	 t h i s . d r a w l a b e l s = f a l s e ; 	 	 / /   s e t   t o   t r u e   o r   f a l s e  
 	 t h i s . m o u s e o v e r l a b e l s = f a l s e ; 	 / /   t r u e   w i l l   s h o w   t h e   " l a b e l s "   o n   m o u s e o v e r ,   f a l s e   w i l l   s h o w   x , y   c o o r d  
  
 	 / /   A s s i g n   V M L   p r o p e r t i e s   f o r   t h e   p o i n t s  
  
 	 t h i s . p o i n t s i z e = " 5 " ; 	   	 / /   s h a p e   d i s p l a y   s i z e   i n   " p t "  
 	 t h i s . p o i n t f i l l c o l o r = " b l u e " ; 	 / /   p o i n t   f i l l   c o l o r  
 	 t h i s . p o i n t s t r o k e c o l o r = " b l a c k " ; 	 / /   p o i n t   l i n e   c o l o r  
 }  
  
  
 f u n c t i o n   A r r o w ( )   {  
  
 	 / /   x   a n d   y   c o o r d i n a t e   v a l u e s   o f   a r r o w   o r i g i n  
  
 	 t h i s . x   =   0 ;  
 	 t h i s . y   =   0 ;  
 	 t h i s . r o t a t i o n   =   4 5 ;  
 	 t h i s . l e n g t h   =   2 5 ;  
 	  
 	 / /   A s s i g n   a   l a b e l   f o r   t h e   a r r o w  
  
 	 t h i s . l a b e l   =   " T e s t " ;  
  
 	 / /   A s s i g n   V M L   p r o p e r t i e s   f o r   t h e   a r r o w  
  
 	 t h i s . s i z e = " 1 0 " ; 	   	 / /   s h a p e   d i s p l a y   s i z e   i n   " p t "  
 	 t h i s . c o l o r = " r e d " ; 	 / /   a r r o w   c o l o r  
 	 t h i s . l a b e l c o l o r = " r e d " ; 	 / /   l a b e l   c o l o r  
 	 t h i s . l a b e l s i z e = " 1 2 " ; 	 / /   l a b e l   s i z e   i n   " p t "  
 	 t h i s . l i n e w e i g h t = " 2 " ;     / /   l i n e   w e i g h t   i n   " p t "  
 	 t h i s . d a s h s t y l e = " s o l i d " ;   / /   l i n e   s t y l e  
  
 	 / /   A r r o w   h e a d   s h a p e   d e f i n i t i o n  
  
 	 t h i s . a r r o w h e a d = ' < v : s h a p e t y p e   i d = " a r r o w h e a d "   c o o r d s i z e = " 5 0 0 , 5 0 0 "   p a t h = "   m   0   0   l   2 5 0   5 0 0   5 0 0   0   2 5 0   1 0 0   x   e "   / > ' ;  
  
 }   / /   e n d   f u n c t i o n  
  
  
  
 f u n c t i o n   L a b e l ( )   {  
  
 	 / /   x   a n d   y   c o o r d i n a t e   v a l u e s   o f   t h e   l a b e l   o r i g i n  
  
 	 t h i s . x   =   0 ;  
 	 t h i s . y   =   0 ;  
 	 t h i s . r o t a t i o n   =   4 5 ;  
 	 t h i s . l e n g t h   =   0 ;  
 	  
 	 / /   A s s i g n   a   l a b e l   t e x t  
  
 	 t h i s . l a b e l   =   " " ;  
  
 	 / /   A s s i g n   V M L   p r o p e r t i e s   f o r   t h e   l a b e l  
  
 	 t h i s . l a b e l c o l o r = " r e d " ; 	 / /   l a b e l   c o l o r  
 	 t h i s . l a b e l s i z e = " 1 2 " ; 	 / /   l a b e l   s i z e   i n   " p t "  
  
 / / 	 t h i s . V M L p o i n t s h a p e t y p e = " c i r c l e " ; 	 / /   [   d i a m o n d ,   s q u a r e ,   t r i a n g l e ,   c i r c l e ,   x ,   n o n e   ]  
 / / 9 5 0 6 1 7 2 1 0 3   c h a n g e   t o   n e x t  
 / / 	 t h i s . V M L p o i n t s h a p e t y p e = " n o n e " ; 	 / /   [   d i a m o n d ,   s q u a r e ,   t r i a n g l e ,   c i r c l e ,   x ,   n o n e   ]  
 / / t h e n   a l l   c i r c l e   d i s a p p e a r  
 / / 9 5 0 6 1 7 2 1 0 5   r e t u r n   t o   o r i g i n a l   s e t t i n g  
 	 t h i s . V M L p o i n t s h a p e t y p e = " c i r c l e " ; 	 / /   [   d i a m o n d ,   s q u a r e ,   t r i a n g l e ,   c i r c l e ,   x ,   n o n e   ]  
  
 	 t h i s . p o i n t s i z e = " 6 " ; 	   	 / /   s h a p e   d i s p l a y   s i z e   i n   " p t "  
 	 t h i s . p o i n t f i l l c o l o r = " r e d " ; 	 / /   p o i n t   f i l l   c o l o r  
 	 t h i s . p o i n t s t r o k e c o l o r = " b l a c k " ; 	 / /   p o i n t   l i n e   c o l o r  
  
 }   / /   e n d   f u n c t i o n  
  
  
  
 f u n c t i o n   X Y G r a p h ( )   {  
  
     / /   D a t a   P r o p e r t i e s  
  
 	 / /   T h e   m a x   a n d   m i n   v a l u e s   d e f i n e   t h e   u p p e r   a n d   l o w e r   a x i s   v a l u e s   t o   d i s p l a y .  
 	 / /   I f   n o t   s p e c i f i e d   t h e y   w i l l   a u t o m a t i c a l l y   f i t   t o   t h e   d a t a   l i m i t s .  
  
 	 t h i s . x m a x = n u l l ;  
 	 t h i s . x m i n = n u l l ;  
 	 t h i s . y m a x = n u l l ;    
 	 t h i s . y m i n = n u l l ;  
  
 	 / /   G r a p h   t i t l e s  
  
 	 t h i s . t i t l e = n u l l ;  
 	 t h i s . x a x i s = n u l l ;  
 	 t h i s . y a x i s = n u l l ;  
  
 	 / /   T i c   s c a l e   s p a c i n g ,   i f   n o t   s p e c i f i e d   i t   w i l l   b e   f i t   t o   t h e   d a t a .  
  
 	 t h i s . x s c a l e = n u l l ;  
 	 t h i s . y s c a l e = n u l l ;  
  
 	 / /   V a l u e   w h e r e   t h e   a x e s   c r o s s .     D e f a u l t   i s   a t   0 , 0  
 	 / /   S e t   t o   " N u m b e r . N E G A T I V E _ I N F I N I T Y "   t o   a l i g n   w i t h   t h e   m i n i m u m   a x i s   v a l u e .  
 	 / /   S e t   t o   " N u m b e r . P O S I T I V E _ I N F I N I T Y "   t o   a l i g n   w i t h   t h e   m a x i m u m   a x i s   v a l u e .  
  
 / / 	 t h i s . x i n t = 0 ;  
 / / 	 t h i s . y i n t = 0 ;  
 / / 9 9 1 2 2 8 1 6 4 0   c h a n g e   t o   n e x t  
 	 t h i s . x i n t = x a t L ;  
 	 t h i s . y i n t = y a t L ;  
  
 	 / /   T h e   l a s t   p l o t   s t r i n g   g e n e r a t e d   i s   m a i n t a i n e d   i n   m e m o r y  
  
 	 t h i s . l a s t p l o t = " " ;  
  
 	 / /   T r a c k s   t h e   c h a n g e s   m a d e   f r o m   a d d i t i o n a l   p l o t s   f o r   u s e   w i t h   D e l e t e L a s t ( )  
  
 	 t h i s . l a s t p l o t a d d e d =   n e w   A r r a y ( ) ;  
 	 t h i s . n u m p l o t s = 0 ;  
  
     / /   S t y l e   P r o p e r t i e s  
  
 	 t h i s . g h e i g h t = 2 0 0 ; 	 / /   P l o t t i n g   h e i g h t   i n   " p t "  
 	 t h i s . g w i d t h = 3 0 0 ; 	 / /   P l o t t i n g   w i d t h   i n   " p t "  
 	 t h i s . p a d _ t o p = 1 0 ; 	 / /   I n t e r n a l   p a d d i n g   m a r g i n s   i n   " p t "  
 	 t h i s . p a d _ b o t t o m = 1 0 ;  
 	 t h i s . p a d _ l e f t = 1 0 ;  
 	 t h i s . p a d _ r i g h t = 1 0 ;  
  
 	 t h i s . t i c s i z e = 5 ;   	 / /   T i c   s i z e   i n   " p t " ,   s e t   t o   " 0 "   t o   t u r n   o f f  
 	 t h i s . t i c s p a c e a v g = 3 0 ; 	 / /   A v e r a g e   a u t o   t i c   s p a c i n g   i n   " p t "  
 	 t h i s . x t i c l o c = " a u t o " ; 	 / /   x - a x i s   l a b e l s   " t o p " ,   " b o t t o m " ,   " a u t o "   o r   " n o n e "  
 	 t h i s . y t i c l o c = " a u t o " ; 	 / /   y - a x i s   l a b e l s   " r i g h t " ,   " l e f t " ,   " a u t o "   o r   " n o n e "  
 	 t h i s . u s e r x t i c l a b e l s = n u l l ; 	 / /   a l l o w s   t h e   u s e r   t o   o v e r r i d e   x   a x i s   t i c   l a b e l s  
 	 t h i s . u s e r y t i c l a b e l s = n u l l ; 	 / /   a l l o w s   t h e   u s e r   t o   o v e r r i d e   y   a x i s   t i c   l a b e l s  
  
 	 t h i s . V M L m i n o r x a x i s s t r o k e   =   " w e i g h t = ' 0 . 5 p t ' ;   c o l o r = ' # D 3 D 3 D 3 ' ;   d a s h s t y l e = ' d a s h ' ; " ;  
 	 t h i s . V M L m i n o r y a x i s s t r o k e   =   " w e i g h t = ' 0 . 5 p t ' ;   c o l o r = ' # D 3 D 3 D 3 ' ;   d a s h s t y l e = ' d a s h ' ; " ;  
 	 t h i s . V M L m a j o r a x i s s t r o k e   =   " w e i g h t = ' 1 p t ' ;   c o l o r = ' b l a c k ' ; " ;  
 	 t h i s . V M L b a c k g r o u n d f i l l   =   " c o l o r = ' w h i t e ' " ;  
 	 t h i s . V M L f r a m e s t r o k e   =   " c o l o r = ' w h i t e ' " ;  
  
 	 t h i s . C S S t i c f o n t   =   " f o n t :   8 p t   ' A r i a l ' ; " ;  
  
 / / 	 t h i s . C S S t i t l e f o n t   =   " f o n t :   1 0 p t   ' A r i a l ' ;   f o n t - w e i g h t :   b o l d ; " ;     / /   f o n t   s i z e s   m u s t   b e   s e t   i n   " p t "  
 / / 9 5 0 6 1 8 1 8 1 6   d e l e t e   [   f o n t - w e i g h t :   b o l d ; ]  
 	 t h i s . C S S t i t l e f o n t   =   " f o n t :   1 0 p t   ' A r i a l ' ; " ;     / /   f o n t   s i z e s   m u s t   b e   s e t   i n   " p t "  
  
 	 t h i s . C S S x a x i s f o n t   =   " f o n t :   8 p t   ' A r i a l ' ;   f o n t - w e i g h t :   b o l d ; " ;  
 	 t h i s . C S S y a x i s f o n t   =   " f o n t :   8 p t   ' A r i a l ' ;   f o n t - w e i g h t :   b o l d ; " ;  
 	 t h i s . V M L y a x i s f o n t c o l o r   =   " b l a c k " ;     / /   m u s t   s p e c i f y   y - a x i s   t i t l e   f o n t   c o l o r   s i n c e   i t   i s   V M L   o b j e c t  
  
 }  
  
 X Y G r a p h . p r o t o t y p e . t o S t r i n g   =   f u n c t i o n ( )   { r e t u r n   t h i s . l a s t p l o t ; }   / /   T h e   o b j e c t   w i l l   e v a l u a t e   t o   t h e   l a s t   p l o t  
  
  
  
 X Y G r a p h . p r o t o t y p e . P l o t   =   f u n c t i o n   ( X Y L i n e )   {  
  
 / /   P a r s e   i n p u t   t o   d e t e r m i n e   x , y   d a t a   l i m i t s   a n d   c l i p   e x t r e m e   v a l u e s  
 	 l i n e s   =   a r g u m e n t s ;    
 	 x m a x   =   N u m b e r . N E G A T I V E _ I N F I N I T Y ;   x m i n   =   N u m b e r . P O S I T I V E _ I N F I N I T Y ;  
 	 y m a x   =   N u m b e r . N E G A T I V E _ I N F I N I T Y ;   y m i n   =   N u m b e r . P O S I T I V E _ I N F I N I T Y ;  
 	 c l i p x m a x   =   ( t h i s . x m a x   ?   N u m b e r ( t h i s . x m a x )   :   9 9 9 E + 9 9 ) ;    
 	 c l i p x m i n   =   ( t h i s . x m i n   ?   N u m b e r ( t h i s . x m i n )   :   - 9 9 9 E + 9 9 ) ;  
 	 c l i p y m a x   =   ( t h i s . y m a x   ?   N u m b e r ( t h i s . y m a x )   :   9 9 9 E + 9 9 ) ;  
 	 c l i p y m i n   =   ( t h i s . y m i n   ?   N u m b e r ( t h i s . y m i n )   :   - 9 9 9 E + 9 9 ) ;  
 	 c l i p p e d = f a l s e ;  
  
 / /   f i x   i n p u t  
 	 t h i s . y i n t   =   N u m b e r ( t h i s . y i n t ) ;   t h i s . x i n t   =   N u m b e r ( t h i s . x i n t ) ;  
 	 t h i s . y m i n   =   N u m b e r ( t h i s . y m i n ) ;   t h i s . x m i n   =   N u m b e r ( t h i s . x m i n ) ;  
 	 t h i s . y m a x   =   N u m b e r ( t h i s . y m a x ) ;   t h i s . x m a x   =   N u m b e r ( t h i s . x m a x ) ;  
  
 	 i f   ( t h i s . x m a x   <   t h i s . x m i n   & &   t h i s . x m a x )   { t e m p = t h i s . x m a x ;   t h i s . x m a x = t h i s . x m i n ;   t h i s . x m i n = t e m p ; }    
 	 i f   ( t h i s . y m a x   <   t h i s . y m i n   & &   t h i s . y m a x )   { t e m p = t h i s . y m a x ;   t h i s . y m a x = t h i s . y m i n ;   t h i s . y m i n = t e m p ; }  
  
 	 x m a x = t h i s . x m a x ;   x m i n = t h i s . x m i n ;   y m a x = t h i s . y m a x ;   y m i n = t h i s . y m i n ;  
  
     f o r   ( v a r   n = 0 ;   n < l i n e s . l e n g t h ;   n + + )   {  
 	 v a r   j = 0 ;   t e m p x   =   n e w   A r r a y ( ) ;   t e m p y   =   n e w   A r r a y ( ) ;   t e m p l a b e l s   =   n e w   A r r a y ( ) ;  
 	 l i n e l e n   =   ( l i n e s [ n ] . y . l e n g t h   >   l i n e s [ n ] . x . l e n g t h   ?   l i n e s [ n ] . x . l e n g t h   :   l i n e s [ n ] . y . l e n g t h ) ;  
 	 f o r   ( v a r   i = 0 ;   i < l i n e l e n ;   i + + )   {  
 	 	 i f   ( ( l i n e s [ n ] . x [ i ]   < =   c l i p x m a x ) & & ( l i n e s [ n ] . x [ i ]   > =   c l i p x m i n ) & & ( l i n e s [ n ] . y [ i ]   < =   c l i p y m a x ) & & ( l i n e s [ n ] . y [ i ]   > =   c l i p y m i n ) & & ( i < = 1 0 0 0 ) )   {  
 	 	 	 i f   ( x m a x   <   l i n e s [ n ] . x [ i ] )   { x m a x   =   l i n e s [ n ] . x [ i ] } ;  
 	 	 	 i f   ( x m i n   >   l i n e s [ n ] . x [ i ] )   { x m i n   =   l i n e s [ n ] . x [ i ] } ;  
 	 	 	 i f   ( y m a x   <   l i n e s [ n ] . y [ i ] )   { y m a x   =   l i n e s [ n ] . y [ i ] } ;  
 	 	 	 i f   ( y m i n   >   l i n e s [ n ] . y [ i ] )   { y m i n   =   l i n e s [ n ] . y [ i ] } ;  
 	 	 	 t e m p x [ j ] = l i n e s [ n ] . x [ i ] ;    
 	 	 	 t e m p y [ j ] = l i n e s [ n ] . y [ i ] ;  
 	 	 	 i f ( l i n e s [ n ] . d r a w l a b e l s   | |   l i n e s [ n ] . m o u s e o v e r l a b e l s )   { t e m p l a b e l s [ j ] =   l i n e s [ n ] . l a b e l s [ j ] ; }  
 	 	 	 j + + ;  
 	 	 }  
 	 	 e l s e   i f   ( i s N a N ( l i n e s [ n ] . x [ i ] )   | |   i s N a N ( l i n e s [ n ] . y [ i ] ) )   { c l i p p e d = t r u e ; }  
 	 	 e l s e   i f   ( ( ( l i n e s [ n ] . x [ i + 1 ]   < =   c l i p x m a x ) & & ( l i n e s [ n ] . x [ i + 1 ]   > =   c l i p x m i n ) & & ( l i n e s [ n ] . y [ i + 1 ]   < =   c l i p y m a x ) & & ( l i n e s [ n ] . y [ i + 1 ]   > =   c l i p y m i n ) & & ( i < = 1 0 0 0 ) ) )   {  
 	 	 	 l a s t x y   =   t h i s . F i n d e d g e ( l i n e s [ n ] . x [ i + 1 ] , l i n e s [ n ] . x [ i ] , l i n e s [ n ] . y [ i + 1 ] , l i n e s [ n ] . y [ i ] , c l i p x m a x , c l i p x m i n , c l i p y m a x , c l i p y m i n ) ;  
 	 	 	 i f   ( M a t h . a b s ( l a s t x y [ 0 ] )   <   9 9 9 E + 9 9   & &   M a t h . a b s ( l a s t x y [ 1 ] )   <   9 9 9 E + 9 9 )   {  
 	 	 	 	 t e m p x [ j ] = l a s t x y [ 0 ] ;   t e m p y [ j ] = l a s t x y [ 1 ] ;    
 	 	 	 	 i f ( l i n e s [ n ] . d r a w l a b e l s   | |   l i n e s [ n ] . m o u s e o v e r l a b e l s )   { t e m p l a b e l s [ j ] = " " ; }  
 	 	 	 	 j + + ;  
 	 	 	 }  
 	 	 	 c l i p p e d = t r u e ;    
 	 	 }  
 	 	 e l s e   i f   ( ( ( l i n e s [ n ] . x [ i - 1 ]   < =   c l i p x m a x ) & & ( l i n e s [ n ] . x [ i - 1 ]   > =   c l i p x m i n ) & & ( l i n e s [ n ] . y [ i - 1 ]   < =   c l i p y m a x ) & & ( l i n e s [ n ] . y [ i - 1 ]   > =   c l i p y m i n ) ) & & ( i < = 1 0 0 0 ) )   {  
 	 	 	 l a s t x y   =   t h i s . F i n d e d g e ( l i n e s [ n ] . x [ i - 1 ] , l i n e s [ n ] . x [ i ] , l i n e s [ n ] . y [ i - 1 ] , l i n e s [ n ] . y [ i ] , c l i p x m a x , c l i p x m i n , c l i p y m a x , c l i p y m i n ) ;  
 	 	 	 i f   ( M a t h . a b s ( l a s t x y [ 0 ] )   <   9 9 9 E + 9 9   & &   M a t h . a b s ( l a s t x y [ 1 ] )   <   9 9 9 E + 9 9 )   {  
 	 	 	 	 t e m p x [ j ] = l a s t x y [ 0 ] ;   t e m p y [ j ] = l a s t x y [ 1 ] ;    
 	 	 	 	 i f ( l i n e s [ n ] . d r a w l a b e l s   | |   l i n e s [ n ] . m o u s e o v e r l a b e l s )   { t e m p l a b e l s [ j ] = " " ; }  
 	 	 	 	 j + + ;  
 	 	 	 }  
 	 	 	 i f   ( i + 1   ! =   l i n e l e n )   {  
 	 	 	 l i n e s . l e n g t h   + =   1 ;  
 	 	 	 l i n e s [ ( l i n e s . l e n g t h - 1 ) ]   =   n e w   A r r a y ( ) ;  
 	 	 	 l i n e s [ ( l i n e s . l e n g t h - 1 ) ] . V M L s t r o k e   =   l i n e s [ n ] . V M L s t r o k e ;  
 	 	 	 l i n e s [ ( l i n e s . l e n g t h - 1 ) ] . d r a w l i n e   =   l i n e s [ n ] . d r a w l i n e ;  
 	 	 	 l i n e s [ ( l i n e s . l e n g t h - 1 ) ] . l a b e l   =   l i n e s [ n ] . l a b e l ;  
 	 	 	 l i n e s [ ( l i n e s . l e n g t h - 1 ) ] . V M L p o i n t s h a p e t y p e   =   l i n e s [ n ] . V M L p o i n t s h a p e t y p e ;  
 	 	 	 l i n e s [ ( l i n e s . l e n g t h - 1 ) ] . p o i n t s i z e   =   l i n e s [ n ] . p o i n t s i z e ;  
 	 	 	 l i n e s [ ( l i n e s . l e n g t h - 1 ) ] . p o i n t f i l l c o l o r   =   l i n e s [ n ] . p o i n t f i l l c o l o r ;  
 	 	 	 l i n e s [ ( l i n e s . l e n g t h - 1 ) ] . p o i n t s t r o k e c o l o r   =   l i n e s [ n ] . p o i n t s t r o k e c o l o r ;  
 	 	 	 l i n e s [ ( l i n e s . l e n g t h - 1 ) ] . d r a w p o i n t s   =   l i n e s [ n ] . d r a w p o i n t s ;  
 	 	 	 l i n e s [ ( l i n e s . l e n g t h - 1 ) ] . l a b e l s i z e   =   l i n e s [ n ] . l a b e l s i z e ;  
 	 	 	 l i n e s [ ( l i n e s . l e n g t h - 1 ) ] . l a b e l f o n t   =   l i n e s [ n ] . l a b e l f o n t ;  
 	 	 	 l i n e s [ ( l i n e s . l e n g t h - 1 ) ] . l a b e l c o l o r   =   l i n e s [ n ] . l a b e l c o l o r ;  
 	 	 	 l i n e s [ ( l i n e s . l e n g t h - 1 ) ] . d r a w l a b e l s   =   l i n e s [ n ] . d r a w l a b e l s ;  
 	 	 	 l i n e s [ ( l i n e s . l e n g t h - 1 ) ] . m o u s e o v e r l a b e l s   =   l i n e s [ n ] . m o u s e o v e r l a b e l s ;  
 	 	 	 l i n e s [ ( l i n e s . l e n g t h - 1 ) ] . x = l i n e s [ n ] . x . s l i c e ( i ) ;  
 	 	 	 l i n e s [ ( l i n e s . l e n g t h - 1 ) ] . y = l i n e s [ n ] . y . s l i c e ( i ) ;    
 	 	 	 l i n e s [ n ] . x = t e m p x ;   l i n e s [ n ] . y = t e m p y ;    
 	 	 	 i f ( l i n e s [ n ] . d r a w l a b e l s   | |   l i n e s [ n ] . m o u s e o v e r l a b e l s )   {  
 	 	 	 	 l i n e s [ ( l i n e s . l e n g t h - 1 ) ] . l a b e l s = l i n e s [ n ] . l a b e l s . s l i c e ( i ) ;  
 	 	 	 	 l i n e s [ n ] . l a b e l s = t e m p l a b e l s ;  
 	 	 	 }  
 	 	 	 c l i p p e d = t r u e ;  
  
 	 	 	 b r e a k ;    
 	 	 	 }  
 	 	 }  
 	 	 e l s e   i f   ( i   >   1 0 0 0 )   {  
 	 	 	 l i n e s [ n ] . d r a w p o i n t s   =   f a l s e ;  
 	 	 	 l i n e s [ n ] . d r a w l a b e l s   =   f a l s e ;  
 	 	 	 l i n e s . l e n g t h   + =   1 ;  
 	 	 	 l i n e s [ ( l i n e s . l e n g t h - 1 ) ]   =   n e w   A r r a y ( ) ;  
 	 	 	 l i n e s [ ( l i n e s . l e n g t h - 1 ) ] . V M L s t r o k e   =   l i n e s [ n ] . V M L s t r o k e ;  
 	 	 	 l i n e s [ ( l i n e s . l e n g t h - 1 ) ] . d r a w l i n e   =   l i n e s [ n ] . d r a w l i n e ;  
 	 	 	 l i n e s [ ( l i n e s . l e n g t h - 1 ) ] . l a b e l   =   l i n e s [ n ] . l a b e l ;  
 	 	 	 l i n e s [ ( l i n e s . l e n g t h - 1 ) ] . d r a w p o i n t s   =   f a l s e ;  
 	 	 	 l i n e s [ ( l i n e s . l e n g t h - 1 ) ] . d r a w l a b e l s   =   f a l s e ;  
 	 	 	 l i n e s [ ( l i n e s . l e n g t h - 1 ) ] . x = l i n e s [ n ] . x . s l i c e ( i - 1 ) ;  
 	 	 	 l i n e s [ ( l i n e s . l e n g t h - 1 ) ] . y = l i n e s [ n ] . y . s l i c e ( i - 1 ) ;    
 	 	 	 l i n e s [ n ] . x = t e m p x ;   l i n e s [ n ] . y = t e m p y ;  
  
 	 	 	 b r e a k ;    
 	 	 }  
 	 	 e l s e   { c l i p p e d = t r u e ; }  
 	 }  
 	 l i n e s [ n ] . x = t e m p x ;   l i n e s [ n ] . y = t e m p y ;   l i n e s [ n ] . l a b e l s = t e m p l a b e l s ;  
     }  
  
 	 i f   ( t h i s . x i n t   = =   N u m b e r . N E G A T I V E _ I N F I N I T Y )   { t h i s . x i n t   =   x m i n ; }  
 	 i f   ( t h i s . x i n t   = =   N u m b e r . P O S I T I V E _ I N F I N I T Y )   { t h i s . x i n t   =   x m a x ; }  
 	 i f   ( t h i s . y i n t   = =   N u m b e r . N E G A T I V E _ I N F I N I T Y )   { t h i s . y i n t   =   y m i n ; }  
 	 i f   ( t h i s . y i n t   = =   N u m b e r . P O S I T I V E _ I N F I N I T Y )   { t h i s . y i n t   =   y m a x ; }  
  
  
  
 / /   I n t i a l i z e   d a t a  
  
 i f   ( t h i s . l a s t p l o t   = =   " " )   {   / /   d o n ' t   r e d r a w   g r a p h   b a c k g r o u n d   i f   c a l l e d   m u l t i p l e   t i m e s  
  
 	 x s c a l e = N u m b e r ( t h i s . x s c a l e ) ;   y s c a l e = N u m b e r ( t h i s . y s c a l e ) ;  
 	 x i n t = N u m b e r ( t h i s . x i n t ) ;   y i n t = N u m b e r ( t h i s . y i n t ) ;  
  
 	 g h e i g h t = N u m b e r ( t h i s . g h e i g h t ) ;   g w i d t h = N u m b e r ( t h i s . g w i d t h ) ;  
 	 t i c s i z e = N u m b e r ( t h i s . t i c s i z e ) ;  
  
 	 x t i c l o c = t h i s . x t i c l o c ;   y t i c l o c = t h i s . y t i c l o c ;  
  
 / /   I n i t i a l i z e   p a r a m e t e r s  
  
 	 g x p t = 1 0 0 ;  
 	 p a d _ t = g x p t * t h i s . p a d _ t o p ;   p a d _ b = g x p t * t h i s . p a d _ b o t t o m ;   / /   p a d d i n g  
 	 p a d _ l = g x p t * t h i s . p a d _ l e f t ;   p a d _ r = g x p t * t h i s . p a d _ r i g h t ;    
 	 g w t = M a t h . a b s ( M a t h . r o u n d ( g w i d t h * g x p t ) ) ;   / /   t o t a l   g r a p h   w i d t h ;  
 	 g h t = M a t h . a b s ( M a t h . r o u n d ( g h e i g h t * g x p t ) ) ;   / /   t o t a l   g r a p h   h e i g h t ;  
  
 	 g s t y l e = ' p o s i t i o n : a b s o l u t e ;   w i d t h = ' + g w t + ' ;   h e i g h t = ' + g h t ;   / /   r e p e t i t i v e   s t r i n g   c o n s t a n t  
 	 G X s t y l e = t h i s . C S S t i c f o n t + ' p o s i t i o n : a b s o l u t e ; ' ;  
 	 G Y s t y l e = t h i s . C S S t i c f o n t + ' p o s i t i o n : a b s o l u t e ; ' ;  
 	 G Y L s t y l e = t h i s . C S S t i c f o n t + ' p o s i t i o n : a b s o l u t e ;   t e x t - a l i g n : r i g h t ;   w i d t h : ' ;   / /   f i n i s h e d   l a t e r  
  
 / /   f i x   a u t o   s c a l e   x   a x i s  
 	 i f   ( x i n t   <   x m i n )   { x m i n = x i n t ; }  
 	 i f   ( x i n t   >   x m a x )   { x m a x = x i n t ; }  
  
 / /   x   a u t o   t i c   s c a l e  
           i f   ( x s c a l e   < =   0 )   {  
 	 x t i c m a x = ( g w i d t h - ( p a d _ r + p a d _ l ) / g x p t ) / t h i s . t i c s p a c e a v g ;  
 	 t i c d i v i s i o n = [ 0 . 1 , 0 . 2 , 0 . 2 5 , 0 . 5 ] ;  
 	 d i v p o w = 0 ;  
 	 i = 0 ;  
 	     w h i l e   ( ( x m a x - x m i n ) / ( t i c d i v i s i o n [ i ] * M a t h . p o w ( 1 0 , d i v p o w ) )   >   x t i c m a x )   {    
 	         i + + ;    
 	         i f   ( ! ( i   %   t i c d i v i s i o n . l e n g t h ) )   { d i v p o w + + ;   i = 0 ; }  
 	         i f   ( d i v p o w > 1 )   { x t i c m a x = ( g w i d t h - ( p a d _ r + p a d _ l ) / g x p t ) / ( N u m b e r ( t h i s . t i c s p a c e a v g ) + 5 ) ; }  
 	     }  
 	 i f   ( i = = 0   & &   d i v p o w = = 0 )   {  
 	     i = t i c d i v i s i o n . l e n g t h - 1 ;   d i v p o w = - 1 ;   x t i c m a x = ( g w i d t h - ( p a d _ r + p a d _ l ) / g x p t ) / ( N u m b e r ( t h i s . t i c s p a c e a v g ) + 1 0 ) ;  
 	     w h i l e   ( ( x m a x - x m i n ) / ( t i c d i v i s i o n [ i ] * M a t h . p o w ( 1 0 , d i v p o w ) )   <   x t i c m a x )   {    
 	         i - - ;    
 	         i f   ( i = = - 1 )   { d i v p o w - - ;   i = t i c d i v i s i o n . l e n g t h - 1 ;   x t i c m a x = ( g w i d t h - ( p a d _ r + p a d _ l ) / g x p t ) / ( N u m b e r ( t h i s . t i c s p a c e a v g ) + 3 0 ) ; }  
 	     }  
 	 }  
 	 x s c a l e = t i c d i v i s i o n [ i ] * M a t h . p o w ( 1 0 , d i v p o w ) ;  
           }  
  
  
 / /   f i x   a u t o   s c a l e   y   a x i s  
 	 i f   ( y i n t   <   y m i n )   { y m i n   =   y i n t ; }  
 	 i f   ( y i n t   >   y m a x )   { y m a x   =   y i n t ; }  
  
 / /   y   a u t o   t i c   s c a l e  
           i f   ( y s c a l e   < =   0 )   {  
 	 y t i c m a x = ( g h e i g h t - ( p a d _ t + p a d _ b ) / g x p t ) / t h i s . t i c s p a c e a v g ;  
 	 t i c d i v i s i o n = [ 0 . 1 , 0 . 2 , 0 . 2 5 , 0 . 5 ] ;  
 	 d i v p o w = 0 ;  
 	 i = 0 ;  
 	     w h i l e   ( ( y m a x - y m i n ) / ( t i c d i v i s i o n [ i ] * M a t h . p o w ( 1 0 , d i v p o w ) )   >   y t i c m a x )   {    
 	         i + + ;    
 	         i f   ( ! ( i   %   t i c d i v i s i o n . l e n g t h ) )   { d i v p o w + + ;   i = 0 ; }  
 	         i f   ( d i v p o w > 1 )   { y t i c m a x = ( g w i d t h - ( p a d _ t + p a d _ b ) / g x p t ) / ( N u m b e r ( t h i s . t i c s p a c e a v g ) + 5 ) ; }  
 	     }  
 	 i f   ( i = = 0   & &   d i v p o w = = 0 )   {  
 	     i = t i c d i v i s i o n . l e n g t h - 1 ;   d i v p o w = - 1 ;   y t i c m a x = ( g h e i g h t - ( p a d _ t + p a d _ b ) / g x p t ) / ( t h i s . t i c s p a c e a v g + 1 0 ) ;  
 	     w h i l e   ( ( y m a x - y m i n ) / ( t i c d i v i s i o n [ i ] * M a t h . p o w ( 1 0 , d i v p o w ) )   <   y t i c m a x )   {    
 	         i - - ;    
 	         i f   ( i = = - 1 )   { d i v p o w - - ;   i = t i c d i v i s i o n . l e n g t h - 1 ;   y t i c m a x = ( g h e i g h t - ( p a d _ t + p a d _ b ) / g x p t ) / ( t h i s . t i c s p a c e a v g + 3 0 ) ; }  
 	     }  
 	 }  
 	 y s c a l e = t i c d i v i s i o n [ i ] * M a t h . p o w ( 1 0 , d i v p o w ) ;  
           }  
  
 / /   f i x   a u t o   s c a l e   y   a x i s  
 	 i f   ( ! c l i p p e d )   {  
 	 	 y m i n   =   ( y m i n % y s c a l e   ?   y m i n - y m i n % y s c a l e - y s c a l e   :   y m i n ) ;  
 	 	 y m a x   =   ( y m a x % y s c a l e   ?   y m a x - y m a x % y s c a l e + y s c a l e   :   y m a x ) ;  
 	 }  
  
  
 / /   D e t e r m i n e   x   t i c   l a b e l s  
  
 	 x t i c l a b e l s   =   n e w   A r r a y ( ) ;   x t i c c h a r n u m = 1 ;  
 	 n u m x t i c l e f t   =   M a t h . f l o o r ( ( x i n t - x m i n ) / x s c a l e ) ;    
 	 n u m x t i c   =   n u m x t i c l e f t + M a t h . f l o o r ( ( x m a x - x i n t ) / x s c a l e ) + 1 ;  
 	 f o r   ( v a r   i = 0 ;   i < n u m x t i c ;   i + + )   {  
 	 	 x t i c l a b e l = ( i - n u m x t i c l e f t ) * x s c a l e + x i n t ;      
 	 	 n e g s t r = " " ;   e x p s t r = 0 ;  
 	 	 i f   ( x t i c l a b e l   <   0 )   { x t i c l a b e l * = - 1 ;   n e g s t r = " - " ; }  
 	 	 s w i t c h   ( t r u e )   { 	  
 	 	 c a s e   ( x t i c l a b e l   >   9 9 9 9 9 )   :    
 	 	 	 w h i l e   ( x t i c l a b e l > = 1 0 0 0 )   { x t i c l a b e l / = 1 0 0 0 ;   e x p s t r + + ; }  
 	 	 	 x t i c l a b e l = S t r i n g ( x t i c l a b e l ) . s l i c e ( 0 , 4 ) ;  
 	 	 	 x t i c l a b e l s [ i ] = n e g s t r + x t i c l a b e l + " E + " + ( e x p s t r * 3 ) ;  
 	 	 	 b r e a k ;  
 	 	 c a s e   ( x t i c l a b e l   <   0 . 0 0 1   & &   x t i c l a b e l ! = 0 )   :    
 	 	 	 w h i l e   ( x t i c l a b e l < = 0 . 0 0 1 )   { x t i c l a b e l * = 1 0 0 0 ;   e x p s t r + + ; }  
 	 	 	 x t i c l a b e l = ( M a t h . r o u n d ( x t i c l a b e l * M a t h . p o w ( 1 0 , 4 ) ) ) / M a t h . p o w ( 1 0 , 4 ) ;  
 	 	 	 x t i c l a b e l s [ i ] = n e g s t r + x t i c l a b e l + " E - " + ( e x p s t r * 3 ) ;  
 	 	 	 b r e a k ;  
 	 	 d e f a u l t :  
 	 	 	 x t i c l a b e l = ( M a t h . r o u n d ( x t i c l a b e l * M a t h . p o w ( 1 0 , 3 ) ) ) / M a t h . p o w ( 1 0 , 3 ) ;  
 	 	 	 x t i c l a b e l s [ i ] = n e g s t r + S t r i n g ( x t i c l a b e l ) . s l i c e ( 0 , 6 ) ;  
 	 	 	 b r e a k ;  
 	 	 }    
 	 	 x t i c c h a r n u m = M a t h . m a x ( x t i c c h a r n u m , S t r i n g ( x t i c l a b e l s [ i ] ) . l e n g t h ) ;  
 	 }  
 	 x t i c c h a r n u m l a s t = S t r i n g ( x t i c l a b e l s [ i - 1 ] ) . l e n g t h ;  
  
 	 i f   ( t h i s . u s e r x t i c l a b e l s ! = n u l l )   {  
 	 l e n = M a t h . m i n ( t h i s . u s e r x t i c l a b e l s . l e n g t h , x t i c l a b e l s . l e n g t h ) ;  
 	 f o r   ( v a r   i = 0 ;   i < l e n ;   i + + )   {  
 	 	 x t i c l a b e l s [ i ] = t h i s . u s e r x t i c l a b e l s [ i ] ;  
 	 } }  
  
  
 / /   D e t e r m i n e   y   t i c   l a b e l s  
  
 	 y t i c l a b e l s   =   n e w   A r r a y ( ) ;   y t i c c h a r n u m = 0 ;  
 	 n u m y t i c b o t   =   M a t h . f l o o r ( ( y i n t - y m i n ) / y s c a l e ) ;  
 	 n u m y t i c   =   n u m y t i c b o t + M a t h . f l o o r ( ( y m a x - y i n t ) / y s c a l e ) + 1 ;  
 	 f o r   ( v a r   i = 0 ;   i < n u m y t i c ;   i + + )   {  
 	 	 y t i c l a b e l = ( i - n u m y t i c b o t ) * y s c a l e + y i n t ;  
 	 	 n e g s t r = " " ;   e x p s t r = 0 ;  
 	 	 i f   ( y t i c l a b e l   <   0 )   { y t i c l a b e l * = - 1 ;   n e g s t r = " - " ; }  
 	 	 s w i t c h   ( t r u e )   {    
 	 	 c a s e   ( y t i c l a b e l   >   9 9 9 9 9 )   :    
 	 	 	 w h i l e   ( y t i c l a b e l > = 1 0 0 0 )   { y t i c l a b e l / = 1 0 0 0 ;   e x p s t r + + ; }  
 	 	 	 y t i c l a b e l = S t r i n g ( y t i c l a b e l ) . s l i c e ( 0 , 4 ) ;  
 	 	 	 y t i c l a b e l s [ i ] = n e g s t r + y t i c l a b e l + " E + " + ( e x p s t r * 3 ) ;  
 	 	 	 b r e a k ;  
 	 	 c a s e   ( y t i c l a b e l   <   0 . 0 0 1   & &   y t i c l a b e l ! = 0 )   :    
 	 	 	 w h i l e   ( y t i c l a b e l < = 0 . 0 0 1 )   { y t i c l a b e l * = 1 0 0 0 ;   e x p s t r + + ; }  
 	 	 	 y t i c l a b e l = ( M a t h . r o u n d ( y t i c l a b e l * M a t h . p o w ( 1 0 , 4 ) ) ) / M a t h . p o w ( 1 0 , 4 ) ;  
 	 	 	 y t i c l a b e l s [ i ] = n e g s t r + y t i c l a b e l + " E - " + ( e x p s t r * 3 ) ;  
 	 	 	 b r e a k ;  
 	 	 d e f a u l t :  
 	 	 	 y t i c l a b e l = ( M a t h . r o u n d ( y t i c l a b e l * M a t h . p o w ( 1 0 , 3 ) ) ) / M a t h . p o w ( 1 0 , 3 ) ;  
 	 	 	 y t i c l a b e l s [ i ] = n e g s t r + S t r i n g ( y t i c l a b e l ) . s l i c e ( 0 , 6 ) ;  
 	 	 	 b r e a k ;  
 	 	 }    
 	 	 y t i c c h a r n u m = M a t h . m a x ( y t i c c h a r n u m , S t r i n g ( y t i c l a b e l s [ i ] ) . l e n g t h ) ;  
 	 }  
  
 	 i f   ( t h i s . u s e r y t i c l a b e l s ! = n u l l )   {  
 	 l e n = M a t h . m i n ( t h i s . u s e r y t i c l a b e l s . l e n g t h , y t i c l a b e l s . l e n g t h ) ;  
 	 f o r   ( v a r   i = 0 ;   i < l e n ;   i + + )   {  
 	 	 y t i c l a b e l s [ i ] = t h i s . u s e r y t i c l a b e l s [ i ] ;  
 	 } }  
  
 / /   D e t e r m i n e   r e q u i r e d   e x t r a   p a d d i n g   a n d   a u t o   a x i s   l o c a t i o n  
 	 t i c _ p t = N u m b e r ( ( t h i s . C S S t i c f o n t . s l i c e ( 0 , t h i s . C S S t i c f o n t . i n d e x O f ( " p t " ) ) ) . s l i c e ( - 2 ) ) ;  
 	 G Y L s t y l e + = t i c _ p t * ( y t i c c h a r n u m + 1 ) * 0 . 5 + " p t ; " ;  
 	 i f   ( y t i c l o c ! = " n o n e " )   {  
 	     i f   ( ! n u m x t i c l e f t )   {  
 	 	 i f   ( y t i c l o c = = " a u t o " )   { y t i c l o c = " l e f t " ; }  
 	 	 i f   ( y t i c l o c ! = " r i g h t " )   {  
 	 	 	 p a d _ l + = 0 . 7 5 * y t i c c h a r n u m * t i c _ p t * g x p t ;  
 	 	 	 i f   ( t h i s . y a x i s )   { p a d _ l + = 0 . 5 * t h i s . p a d _ l e f t * g x p t ; }  
 	 	 }  
 	     }  
 	     i f   ( n u m x t i c l e f t   = =   n u m x t i c - 1 )   {  
 	 	 i f   ( y t i c l o c = = " a u t o " )   { y t i c l o c = " r i g h t " ; }  
 	 	 i f   ( y t i c l o c ! = " l e f t " )   { p a d _ r + = 0 . 7 5 * y t i c c h a r n u m * t i c _ p t * g x p t ; }  
 	     }  
 	 }  
  
 	 i f   ( x t i c l o c ! = " n o n e " )   {  
 	     i f   ( ! n u m y t i c b o t )   {  
 	 	 i f   ( x t i c l o c = = " a u t o " )   { x t i c l o c = " b o t t o m " ; }  
 	 	 i f   ( x t i c l o c ! = " t o p " )   { p a d _ b + = 0 . 7 5 * t i c _ p t * g x p t ; }  
 	     }  
 	     i f   ( n u m y t i c b o t   = =   n u m y t i c - 1 )   {  
 	 	 i f   ( x t i c l o c = = " a u t o " )   { x t i c l o c = " t o p " ; }  
 	 	 i f   ( x t i c l o c ! = " b o t t o m " )   { p a d _ t + = 0 . 7 5 * t i c _ p t * g x p t ; }  
 	     }  
 	 i f   ( ! ( ( n u m x t i c l e f t   = =   n u m x t i c - 1 )   & &   ( y t i c l o c = = " r i g h t " ) ) )   { p a d _ r + = 0 . 2 5 * x t i c c h a r n u m l a s t * t i c _ p t * g x p t ; }  
 	 }  
 	 i f   ( t h i s . t i t l e )   {  
 	 	 t i t l e _ p t = N u m b e r ( ( t h i s . C S S t i t l e f o n t . s l i c e ( 0 , t h i s . C S S t i t l e f o n t . i n d e x O f ( " p t " ) ) ) . s l i c e ( - 2 ) ) ;  
 	 	 p a d _ t + = 1 . 2 5 * t i t l e _ p t * g x p t ;  
 	 	 i f   ( x t i c l o c = = " t o p " )   p a d _ t + = 0 . 7 5 * t i c _ p t * g x p t ; }  
 	 i f   ( t h i s . x a x i s )   {  
 	 	 x a x i s _ p t = N u m b e r ( ( t h i s . C S S x a x i s f o n t . s l i c e ( 0 , t h i s . C S S x a x i s f o n t . i n d e x O f ( " p t " ) ) ) . s l i c e ( - 2 ) ) ;  
 	 	 p a d _ b - = 0 . 2 5 * p a d _ b ;  
 	 	 p a d _ b + = x a x i s _ p t * g x p t ;  
 	 	 i f   ( x t i c l o c = = " b o t t o m " )   p a d _ b + = 0 . 7 5 * t i c _ p t * g x p t ; }  
 	 i f   ( t h i s . y a x i s )   {  
 	 	 y a x i s _ p t = N u m b e r ( ( t h i s . C S S y a x i s f o n t . s l i c e ( 0 , t h i s . C S S y a x i s f o n t . i n d e x O f ( " p t " ) ) ) . s l i c e ( - 2 ) ) ;  
 	 	 p a d _ l - = 0 . 2 5 * p a d _ l ;  
 	 	 p a d _ l + = y a x i s _ p t * g x p t ; }  
  
  
 	 g w = g w t - p a d _ l - p a d _ r ;  
 	 g h = g h t - p a d _ t - p a d _ b ;  
  
 	 x s c l = g w / ( x m a x - x m i n ) ;  
 	 y s c l = g h / ( y m a x - y m i n ) ;  
  
 	 t h i s . x m i n = x m i n ;    
 	 t h i s . x m a x = x m a x ;    
 	 t h i s . y m i n = y m i n ;    
 	 t h i s . y m a x = y m a x ;  
  
 	 g x m i n = p a d _ l ;  
 	 g x m a x = g w + p a d _ l ;  
 	 g x i n t = ( x i n t - x m i n ) * x s c l + p a d _ l ;  
 	 g y m i n = g h + p a d _ t ;  
 	 g y m a x = p a d _ t ;  
 	 g y i n t = ( y m a x - y i n t ) * y s c l + p a d _ t ;  
 	 g y t i c = y s c a l e * y s c l ;  
 	 g x t i c = x s c a l e * x s c l ;  
 	 g t i c s i z e = M a t h . a b s ( M a t h . r o u n d ( t i c s i z e * g x p t ) ) ;  
  
 	 g s t r = ' < v : g r o u p   s t y l e = " a n t i a l i a s : t r u e ;   w i d t h = ' + g w i d t h + ' p t ;   h e i g h t = ' + g h e i g h t + ' p t "   c o o r d s i z e = " ' + g w t + ' , ' + g h t + ' "   c o o r d o r i g i n = " 0 , 0 " > ' ;  
 	 g s t r + = ' < v : r e c t   s t y l e = " ' + g s t y l e + ' "   > < v : s t r o k e   ' + t h i s . V M L f r a m e s t r o k e + '   / > < v : f i l l   ' + t h i s . V M L b a c k g r o u n d f i l l + '   / > < / v : r e c t > ' ;  
  
 i f ( s h o w X Y c o o r d 1 o r N o t 0 = = 1 )   / / 9 9 1 2 1 4 0 6 4 2  
 {   / / 9 7 1 2 2 9 1 5 4 7   d e l e t e   2 D   a x i s  
  
 / / 9 7 1 2 2 9 1 5 3 9   b e l o w   d r a w   2 D   a x i s   e q u a l   l e v e l   l i n e s  
  
 / /   d r a w   x - a x i s  
 	 i f ( x s c l ! = N u m b e r . P O S I T I V E _ I N F I N I T Y )   {  
 	 	 g s t r + = ' < v : l i n e   f r o m = " ' + g x m i n + ' , ' + M a t h . r o u n d ( g y i n t ) + ' "   t o = " ' + g x m a x + ' , ' + M a t h . r o u n d ( g y i n t ) + ' "   > < v : s t r o k e   ' + t h i s . V M L m a j o r a x i s s t r o k e + '   / > < / v : l i n e > ' ;  
 	 	 }  
 / /   d r a w   y - a x i s  
 	 i f ( y s c l ! = N u m b e r . P O S I T I V E _ I N F I N I T Y )   {  
 	 	 g s t r + = ' < v : l i n e   f r o m = " ' + M a t h . r o u n d ( g x i n t ) + ' , ' + g y m i n + ' "   t o = " ' + M a t h . r o u n d ( g x i n t ) + ' , ' + g y m a x + ' "   > < v : s t r o k e   ' + t h i s . V M L m a j o r a x i s s t r o k e + '   / > < / v : l i n e > ' ;  
 	 	 }  
 / /   d r a w   m i n o r   x - a x i s  
 	 y t i c m i n = g y i n t + n u m y t i c b o t * g y t i c ;  
 	 f o r   ( v a r   i = 0 ;   i < n u m y t i c ;   i + + )   {  
 	     c u r i n t = M a t h . r o u n d ( y t i c m i n - g y t i c * i ) ;  
 	     i f   ( c u r i n t ! = M a t h . r o u n d ( g y i n t ) )   { g s t r + = ' < v : l i n e   f r o m = " ' + g x m i n + ' , ' + c u r i n t + ' "   t o = " ' + g x m a x + ' , ' + c u r i n t + ' "   > < v : s t r o k e   ' + t h i s . V M L m i n o r x a x i s s t r o k e + '   / > < / v : l i n e > ' ; }  
 	 }  
  
 / /   d r a w   m i n o r   y - a x i s  
 	 x t i c m i n = g x i n t - n u m x t i c l e f t * g x t i c ;  
 	 f o r   ( v a r   i = 0 ;   i < n u m x t i c ;   i + + )   {  
 	     c u r i n t = M a t h . r o u n d ( g x t i c * i + x t i c m i n ) ;  
 	     i f   ( c u r i n t ! = M a t h . r o u n d ( g x i n t ) )   { g s t r + = ' < v : l i n e   f r o m = " ' + c u r i n t + ' , ' + g y m i n + ' "   t o = " ' + c u r i n t + ' , ' + g y m a x + ' "   > < v : s t r o k e   ' + t h i s . V M L m i n o r y a x i s s t r o k e + '   / > < / v : l i n e > ' ; }  
 	 }  
  
 / /   d r a w   x - a x i s   t i c s  
 	 g s t r + = ' < v : s h a p e   s t y l e = " ' + g s t y l e + ' " > < v : p a t h   v = " ' ;  
 	 f o r   ( v a r   i = 0 ;   i < n u m x t i c ;   i + + )   {   g s t r + = ' m   ' + M a t h . r o u n d ( x t i c m i n + i * g x t i c ) + ' , ' + M a t h . r o u n d ( g y i n t ) + '   r   0 , ' + ( ( x t i c l o c = = " t o p "   ?   - 1   :   1 ) * g t i c s i z e ) + '   x   ' ; }  
 	 g s t r + = ' e "   / > < v : s t r o k e   ' + t h i s . V M L m a j o r a x i s s t r o k e + '   / > < v : f i l l   o n = " f a l s e "   / > < / v : s h a p e > ' ;  
  
 / /   d r a w   y - a x i s   t i c s  
 	 g s t r + = ' < v : s h a p e   s t y l e = " ' + g s t y l e + ' " > < v : p a t h   v = " ' ;  
 	 f o r   ( v a r   i = 0 ;   i < n u m y t i c ;   i + + )   {   g s t r + = ' m   ' + M a t h . r o u n d ( g x i n t ) + ' , ' + M a t h . r o u n d ( y t i c m i n - i * g y t i c ) + '   r   ' + ( ( y t i c l o c = = " r i g h t "   ?   1   :   - 1 ) * g t i c s i z e ) + ' , 0   x   ' ; }  
 	 g s t r + = ' e "   / > < v : s t r o k e   ' + t h i s . V M L m a j o r a x i s s t r o k e + '   / > < v : f i l l   o n = " f a l s e "   / > < / v : s h a p e > ' ;  
 / / 9 7 1 2 2 9 1 5 3 9   a b o v e   d r a w   2 D   a x i s   e q u a l   l e v e l   l i n e s  
 / * 9 7 1 2 2 9 1 5 2 9   d e l   * /  
 }  
  
 / /   d r a w   t i t l e s  
 	 i f   ( t h i s . t i t l e )   {  
 	 n o n c h a r = 0 ;    
 	 f o r   ( v a r   i = 0 ;   i < t h i s . t i t l e . l e n g t h ;   i + + )   { i f   ( t h i s . t i t l e . c h a r A t ( i ) = = " ; " )   { n o n c h a r + + ; } }  
 	 g s t r + = ' < s p a n   s t y l e = " ' + t h i s . C S S t i t l e f o n t + '   p o s i t i o n : a b s o l u t e ;   t e x t - a l i g n : c e n t e r ;   t o p :   ' + 0 . 5 * t h i s . p a d _ t o p ;  
 	 g s t r + = ' p t ;   l e f t :   ' + ( 0 . 5 * g w t / g x p t - ( t h i s . t i t l e . l e n g t h - 5 . 5 * n o n c h a r ) * t i t l e _ p t * 0 . 2 5 ) + ' p t ; " > ' + t h i s . t i t l e + ' < / s p a n > ' ;  
 	 }  
 	 i f   ( t h i s . x a x i s )   {  
 	 n o n c h a r = 0 ;    
 	 f o r   ( v a r   i = 0 ;   i < t h i s . x a x i s . l e n g t h ;   i + + )   { i f   ( t h i s . x a x i s . c h a r A t ( i ) = = " ; " )   { n o n c h a r + + ; } }  
 	 g s t r + = ' < s p a n   s t y l e = " ' + t h i s . C S S x a x i s f o n t + '   p o s i t i o n : a b s o l u t e ;   t e x t - a l i g n : c e n t e r ;   t o p :   ' + ( ( g y m i n + 0 . 5 * ( p a d _ b - x a x i s _ p t * g x p t ) ) / g x p t + ( x t i c l o c = = " b o t t o m "   ?   0 . 7 5 * t i c _ p t : 0 ) ) ;  
 	 g s t r + = ' p t ;   l e f t :   ' + ( 0 . 5 * g w t / g x p t - ( t h i s . x a x i s . l e n g t h - 5 . 5 * n o n c h a r ) * x a x i s _ p t * 0 . 2 5 ) + ' p t ; " > ' + t h i s . x a x i s + ' < / s p a n > ' ;  
 	 }  
 	 i f   ( t h i s . y a x i s )   {    
 	 g s t r + = ' < v : s h a p e   s t y l e = " ' + g s t y l e ;  
 	 g s t r + = ' "   p a t h = " M   ' + ( ( 0 . 2 5 * t h i s . p a d _ l e f t + 0 . 5 * y a x i s _ p t ) * g x p t ) + ' , ' + g y m i n + '   L   ' + ( ( 0 . 2 5 * t h i s . p a d _ l e f t + 0 . 5 * y a x i s _ p t ) * g x p t ) + ' , ' + g y m a x + ' "   f i l l c o l o r = " ' + t h i s . V M L y a x i s f o n t c o l o r + ' " > ' ;  
 	 g s t r + = ' < v : s t r o k e   o n = " f a l s e "   / > < v : p a t h   t e x t p a t h o k = " t r u e "   / > ' ;  
 	 g s t r + = ' < v : t e x t p a t h   o n = " t r u e "   s t y l e = " ' + t h i s . C S S y a x i s f o n t + ' "   s t r i n g = " ' + t h i s . y a x i s + ' "   / > < / v : s h a p e > ' ;  
 	 }  
  
 }   / /   e n d   o f   d r a w   g r a p h   b a c k g r o u n d  
  
  
 / /   h o l d   o n   t o   p r e v i o u s   p l o t  
     i f   ( t h i s . l a s t p l o t   ! =   " " )   {  
 	 g s t r = t h i s . l a s t p l o t . s u b s t r i n g ( 0 , t h i s . l a s t p l o t . l e n g t h - 1 0 ) ;  
 	 g s t r t e m p = g s t r ;  
     }  
  
 / /   d r a w   l i n e s  
     f o r   ( v a r   n = 0 ;   n < l i n e s . l e n g t h ;   n + + )   {  
     i f   ( l i n e s [ n ] . d r a w l i n e   & &   l i n e s [ n ] . x . l e n g t h > 1 )   {  
 	 g s t r + = ' < v : p o l y l i n e   p o i n t s = " ' ;  
 	 f o r   ( i = 0 ;   i < l i n e s [ n ] . x . l e n g t h ;   i + + )   { g s t r + =   M a t h . r o u n d ( g x m i n + ( l i n e s [ n ] . x [ i ] - x m i n ) * x s c l ) + "   " + M a t h . r o u n d ( g y m i n - ( l i n e s [ n ] . y [ i ] - y m i n ) * y s c l ) + "   " ; }  
 	 g s t r + = ' "   t i t l e = " ' + l i n e s [ n ] . l a b e l + ' "   > < v : s t r o k e   ' + l i n e s [ n ] . V M L s t r o k e + '   / > < v : f i l l   o n = " f a l s e "   / > < / v : p o l y l i n e > ' ;  
     } }  
  
  
 / /   d r a w   p o i n t s  
     f o r   ( v a r   n = 0 ;   n < l i n e s . l e n g t h ;   n + + )   {  
     i f   ( l i n e s [ n ] . d r a w p o i n t s   & &   l i n e s [ n ] . x . l e n g t h > 0 )   {  
 	 g s t r + = t h i s . V M L p o i n t s h a p e ( l i n e s [ n ] . V M L p o i n t s h a p e t y p e ) ;  
 	 f o r   ( i = 0 ;   i < l i n e s [ n ] . x . l e n g t h ;   i + + )   {  
 	 	 g s t r + = ' < v : s h a p e   t y p e = " # ' + ( l i n e s [ n ] . V M L p o i n t s h a p e t y p e ) . t o L o w e r C a s e ( ) + ' "   s t y l e = " w i d t h : ' + l i n e s [ n ] . p o i n t s i z e * g x p t + ' ;   h e i g h t : ' + l i n e s [ n ] . p o i n t s i z e * g x p t ;  
 	 	 g s t r + = ' ;   t o p : ' + M a t h . r o u n d ( g y m i n - 0 . 5 * l i n e s [ n ] . p o i n t s i z e * g x p t - ( l i n e s [ n ] . y [ i ] - y m i n ) * y s c l ) + ' ;   l e f t : ' + M a t h . r o u n d ( g x m i n - 0 . 5 * l i n e s [ n ] . p o i n t s i z e * g x p t + ( l i n e s [ n ] . x [ i ] - x m i n ) * x s c l ) ;  
 	 	 p t i t l e   =   ( l i n e s [ n ] . m o u s e o v e r l a b e l s )   ?   l i n e s [ n ] . l a b e l s [ i ]   :   l i n e s [ n ] . x [ i ] + ' , ' + l i n e s [ n ] . y [ i ] ;    
 	 	 g s t r + = ' "   t i t l e = " ' + p t i t l e + ' "   f i l l c o l o r = " ' + l i n e s [ n ] . p o i n t f i l l c o l o r + ' " ' ;  
 	 	 g s t r + = '   s t r o k e c o l o r = " ' + l i n e s [ n ] . p o i n t s t r o k e c o l o r + ' "   / > ' ;  
 	 }  
     } }  
  
 / /   d r a w   l a b e l s  
     f o r   ( v a r   n = 0 ;   n < l i n e s . l e n g t h ;   n + + )   {    
     i f   ( l i n e s [ n ] . d r a w l a b e l s   & &   l i n e s [ n ] . l a b e l s . l e n g t h > 0 )   {    
 	 f o r   ( i = 0 ;   i < l i n e s [ n ] . l a b e l s . l e n g t h ;   i + + )   {    
 	 	 g s t r + = ' < s p a n   s t y l e = " f o n t :   ' + l i n e s [ n ] . l a b e l s i z e + ' p t   ' + l i n e s [ n ] . l a b e l f o n t + ' ;   p o s i t i o n : a b s o l u t e ; ' ;  
 	 	 g s t r + = '   t o p : ' + M a t h . r o u n d ( ( g y m i n - 1 . 5 * l i n e s [ n ] . l a b e l s i z e * g x p t - ( l i n e s [ n ] . y [ i ] - y m i n ) * y s c l ) / g x p t ) + ' p t ;   l e f t : ' + M a t h . r o u n d ( ( g x m i n + 0 . 5 * l i n e s [ n ] . l a b e l s i z e * g x p t + ( l i n e s [ n ] . x [ i ] - x m i n ) * x s c l ) / g x p t ) + ' p t ;   ' ;  
 	 	 g s t r + = '   c o l o r : ' + l i n e s [ n ] . l a b e l c o l o r + ' " > ' + l i n e s [ n ] . l a b e l s [ i ] + ' < / s p a n > ' ;  
 	 }  
     } }  
  
 i f ( s h o w X Y c o o r d 1 o r N o t 0 = = 1 )   / / 9 9 1 2 1 4 0 6 4 3  
 {   / / 9 7 1 2 2 9 1 5 4 8   d e l e t e   2 D   a x i s  
 / / 9 7 1 2 2 9 1 5 4 0   b e l o w   n e e d   v a r i a b l e   d e f i n e d   i n   " 9 7 1 2 2 9 1 5 2 9   d e l "   s e c t i o n  
  
 i f   ( t h i s . l a s t p l o t   = =   " " )   {   / /   d o n ' t   r e d r a w   g r a p h   b a c k g r o u n d   i f   c a l l e d   m u l t i p l e   t i m e s  
 / /   d r a w   x - a x i s   l a b e l s  
 	 i f   ( x t i c l o c ! = " n o n e " )   {  
 	 f o r   ( v a r   i = 0 ;   i < n u m x t i c ;   i + + )   {    
 	 	     i f   ( x t i c l o c = = " t o p " )   {  
 	 	 	 g s t r + = ' < s p a n   s t y l e = " ' + G X s t y l e + '   t o p :   ' + ( ( g y i n t - g t i c s i z e * 1 . 2 5 ) / g x p t - 8 ) + ' p t ;   l e f t :   ' + ( ( x t i c m i n + i * g x t i c - 0 . 5 * g t i c s i z e ) / g x p t ) + ' p t ; " > ' ;  
 	 	     }  
 	 	     e l s e   {  
 	 	 	 g s t r + = ' < s p a n   s t y l e = " ' + G X s t y l e + '   t o p :   ' + ( ( g y i n t + g t i c s i z e * 1 . 2 5 ) / g x p t ) + ' p t ;   l e f t :   ' + ( ( x t i c m i n + i * g x t i c - 0 . 5 * g t i c s i z e ) / g x p t ) + ' p t ; " > ' ;  
 	 	     }  
 	 	 g s t r + = x t i c l a b e l s [ i ] + ' < / s p a n > ' ;  
 	 } }  
  
 / /   d r a w   y - a x i s   l a b e l s  
 	 i f   ( y t i c l o c ! = " n o n e " )   {  
 	 f o r   ( v a r   i = 0 ;   i < n u m y t i c ;   i + + )   {    
 	 	     i f   ( y t i c l o c = = " r i g h t " )   {  
 	 	     	 g s t r + = ' < s p a n   s t y l e = " ' + G Y s t y l e + '   t o p :   ' + ( ( y t i c m i n - i * g y t i c - g t i c s i z e ) / g x p t ) + ' p t ;   l e f t :   ' + ( ( g x i n t + g t i c s i z e * 1 . 5 ) / g x p t ) + ' p t ; " > ' ;  
 	 	     }  
 	 	     e l s e   {  
 	 	     	 g s t r + = ' < s p a n   s t y l e = " ' + G Y L s t y l e + '   t o p :   ' + ( ( y t i c m i n - i * g y t i c - g t i c s i z e ) / g x p t ) + ' p t ;   l e f t :   ' + ( ( g x i n t - g t i c s i z e ) / g x p t - 0 . 5 * ( y t i c c h a r n u m + 1 ) * t i c _ p t ) + ' p t ; " > ' ;  
 	 	     }  
 	 	     g s t r + = y t i c l a b e l s [ i ] + ' < / s p a n > ' ;  
 	 } }  
 }   / /   e n d   o f   d r a w   g r a p h   b a c k g r o u n d  
 / * * 9 7 1 2 2 9 1 5 3 4   d e l  
 9 7 1 2 2 9 1 5 3 6   s u c c e s s   d e l e t e   2 D   a x i s  
   * /  
 }   / / 9 7 1 2 2 9 1 5 4 8   d e l e t e   2 D   a x i s  
  
  
 / /   c l o s e   a n d   r e t u r n   o u t p u t    
 	 g s t r + = ' < / v : g r o u p > ' ;  
     	 i f   ( t h i s . n u m p l o t s   >   0 )   { t h i s . l a s t p l o t a d d e d [ t h i s . n u m p l o t s ] = g s t r . l e n g t h - g s t r t e m p . l e n g t h ; }  
 	 e l s e   { t h i s . l a s t p l o t a d d e d [ 0 ] = g s t r . l e n g t h ; }  
 	 t h i s . n u m p l o t s + + ;  
 	 t h i s . l a s t p l o t = g s t r ;     / /   s a v e   t h i s   o u t p u t   i n   m e m o r y  
  
 	 r e t u r n   g s t r ;  
  
 }   / /   e n d   f u n c t i o n  
  
  
  
  
 / /   f u n c t i o n   t o   u n d o   l a s t   a d d e d   l i n e ,   l a b e l   o r   a r r o w   f r o m   t h e   p l o t  
  
 X Y G r a p h . p r o t o t y p e . D e l e t e L a s t   =   f u n c t i o n   ( )   {  
 	 i f   ( t h i s . n u m p l o t s   >   1 )   {  
 	 	 g s t r = t h i s . l a s t p l o t . s u b s t r i n g ( 0 , t h i s . l a s t p l o t . l e n g t h - t h i s . l a s t p l o t a d d e d [ t h i s . n u m p l o t s - 1 ] + 1 ) ;  
 	 	 g s t r + = ' < / v : g r o u p > ' ;  
 	 	 t h i s . l a s t p l o t = g s t r ;  
 	 	 t h i s . n u m p l o t s - - ;  
 	 }  
 	 r e t u r n   g s t r ;  
 }   / /   e n d   f u n c t i o n  
  
  
  
 X Y G r a p h . p r o t o t y p e . F i n d e d g e   =   f u n c t i o n   ( x 1 , x 2 , y 1 , y 2 , x m a x , x m i n , y m a x , y m i n )   {  
  
 	 x = 0 ;   y = 0 ;  
         i f   ( ! i s N a N ( x 2 ) )   {  
 	 i f   ( ! i s F i n i t e ( x 2 ) )   {  
 	 	 s w i t c h   ( x 2 )   {  
 	 	 	 c a s e   N u m b e r . P O S I T I V E _ I N F I N I T Y :   x 2   =   9 9 9 E + 9 9 ;   b r e a k ;  
 	 	 	 c a s e   N u m b e r . N E G A T I V E _ I N F I N I T Y :   x 2   =   - 9 9 9 E + 9 9 ;   b r e a k ;  
 	 	 }  
 	 }  
 	 i f   ( ! i s F i n i t e ( y 2 ) )   {  
 	 	 s w i t c h   ( y 2 )   {  
 	 	 	 c a s e   N u m b e r . P O S I T I V E _ I N F I N I T Y :   y 2   =   9 9 9 E + 9 9 ;   b r e a k ;  
 	 	 	 c a s e   N u m b e r . N E G A T I V E _ I N F I N I T Y :   y 2   =   - 9 9 9 E + 9 9 ;   b r e a k ;  
 	 	 }  
 	 }  
  
 	 a n g l e   =   M a t h . a t a n 2 ( y 2 - y 1 , x 2 - x 1 ) ;  
 	 a n g l e   + =   ( a n g l e   >   0   ?   0   :   2 * M a t h . P I ) ;  
  
 	 s l o p e   =   ( y 2 - y 1 ) / ( x 2 - x 1 ) ;  
 	 M x x   =   M a t h . a t a n 2 ( y m a x - y 1 , x m a x - x 1 ) ;   M x x   + =   ( M x x   >   0   ?   0   :   2 * M a t h . P I ) ;  
 	 M n x   =   M a t h . a t a n 2 ( y m a x - y 1 , x m i n - x 1 ) ;   M n x   + =   ( M n x   >   0   ?   0   :   2 * M a t h . P I ) ;  
 	 M n n   =   M a t h . a t a n 2 ( y m i n - y 1 , x m i n - x 1 ) ;   M n n   + =   ( M n n   >   0   ?   0   :   2 * M a t h . P I ) ;  
 	 M x n   =   M a t h . a t a n 2 ( y m i n - y 1 , x m a x - x 1 ) ;   M x n   + =   ( M x n   >   0   ?   0   :   2 * M a t h . P I ) ;  
  
 	 s w i t c h   ( t r u e )   {  
 	 	 c a s e   ( a n g l e > = M x x   & &   a n g l e < M n x )   :    
 	 	 	 y   =   y m a x ;  
 	 	 	 x   =   ( y m a x - y 1 ) / s l o p e + x 1 ;  
 	 	 	 b r e a k ;  
 	 	 c a s e   ( a n g l e > = M n x   & &   a n g l e < M n n )   :  
 	 	 	 x   =   x m i n ;  
 	 	 	 y   =   ( x m i n - x 1 ) * s l o p e + y 1 ;  
 	 	 	 b r e a k ;  
 	 	 c a s e   ( a n g l e > = M n n   & &   a n g l e < M x n )   :  
 	 	 	 y   =   y m i n ;  
 	 	 	 x   =   ( y m i n - y 1 ) / s l o p e + x 1 ;  
 	 	 	 b r e a k ;  
 	 	 c a s e   ( a n g l e > = M x n   | |   a n g l e < M x x )   :  
 	 	 	 x   =   x m a x ;  
 	 	 	 y   =   ( x m a x - x 1 ) * s l o p e + y 1 ;  
 	 	 	 b r e a k ;  
 	 }  
           }  
  
 	 r e t u r n   [ x , y ] ;    
 }   / /   e n d   f u n c t i o n  
  
  
  
 / /   p o i n t   s h a p e t y p e   d e f i n i t i o n s ,   t h e s e   c a n   b e   m o d i f i e d   a n d   e x p a n d e d  
  
 X Y G r a p h . p r o t o t y p e . V M L p o i n t s h a p e   =   f u n c t i o n   ( s h a p e n a m e )   {  
 	 s w i t c h   ( s h a p e n a m e . t o L o w e r C a s e ( ) )   {  
 	  
 	 c a s e   " d i a m o n d "   :  
 	 	 r e t u r n   ' < v : s h a p e t y p e   i d = " d i a m o n d "   c o o r d s i z e = " 5 0 0 , 5 0 0 "   p a t h = "   m   2 5 0   5 0 0   l   5 0 0   2 5 0   2 5 0   0   0   2 5 0   x   e "   / > ' ;  
 	 c a s e   " s q u a r e "   :  
 	 	 r e t u r n   ' < v : s h a p e t y p e   i d = " s q u a r e "   c o o r d s i z e = " 3 5 0 , 3 5 0 "   p a t h = "   m   0   0   l   0   3 5 0   3 5 0   3 5 0   3 5 0   0   x   e "   / > ' ;  
 	 c a s e   " t r i a n g l e "   :  
 	 	 r e t u r n   ' < v : s h a p e t y p e   i d = " t r i a n g l e "   c o o r d s i z e = " 4 0 0 , 4 0 0 "   p a t h = "   m   2 0 0   0   l   4 0 0   4 0 0   0   4 0 0   x   e "   / > ' ;  
 	 c a s e   " c i r c l e "   :  
 	 	 r e t u r n   ' < v : s h a p e t y p e   i d = " c i r c l e "   c o o r d s i z e = " 3 5 0 , 3 5 0 "   p a t h = "   m   0   1 7 5   l   2 3   2 6 2   8 8   3 2 7   1 7 5   3 5 0   2 6 2   3 2 7   3 2 7   2 6 2   3 5 0   1 7 5   3 2 7   8 8   2 6 2   2 3   1 7 5   0   8 8   2 3   2 3   8 8   x   e "   / > ' ;  
 	 c a s e   " x "   :  
 	 	 r e t u r n   ' < v : s h a p e t y p e   i d = " x "   c o o r d s i z e = " 3 5 0 , 3 5 0 "   p a t h = "   m   0   0   l   3 5 0   3 5 0   e   m   0   3 5 0   l   3 5 0   0   e "   / > ' ;  
 	 c a s e   " n o n e "   :  
 	 	 r e t u r n   ' < v : s h a p e t y p e   i d = " n o n e "   c o o r d s i z e = " 3 5 0 , 3 5 0 "   f i l l e d = " f a l s e "   s t r o k e d = " f a l s e "   p a t h = "   m   0   0   l   0   3 5 0   3 5 0   3 5 0   3 5 0   0   x   e "   / > ' ;  
 	 }  
 }   / /   e n d   f u n c t i o n  
  
  
  
 X Y G r a p h . p r o t o t y p e . D r a w a r r o w   =   f u n c t i o n   ( a r r o w d e f )   {  
  
 	 g s t r = g s t r . s u b s t r i n g ( 0 , g s t r . l e n g t h - 1 0 ) ;  
 	 g s t r t e m p = g s t r ;  
  
 	 a r r o w d e f . x   =   N u m b e r ( a r r o w d e f . x )  
 	 a r r o w d e f . y   =   N u m b e r ( a r r o w d e f . y )  
 	 a r r o w d e f . r o t a t i o n   =   N u m b e r ( a r r o w d e f . r o t a t i o n )  
 	 a r r o w d e f . l e n g t h   =   N u m b e r ( a r r o w d e f . l e n g t h )  
 	 a r r o w d e f . s i z e   =   N u m b e r ( a r r o w d e f . s i z e )  
  
 	 x p o i n t = M a t h . r o u n d ( g x m i n + ( a r r o w d e f . x - x m i n ) * x s c l + 0 . 5 * a r r o w d e f . s i z e * g x p t * M a t h . s i n ( a r r o w d e f . r o t a t i o n * M a t h . P I / 1 8 0 ) ) ;  
 	 y p o i n t = M a t h . r o u n d ( g y m i n - ( a r r o w d e f . y - y m i n ) * y s c l - 0 . 5 * a r r o w d e f . s i z e * g x p t * M a t h . c o s ( a r r o w d e f . r o t a t i o n * M a t h . P I / 1 8 0 ) ) ;  
  
 	 x p o i n t 2 = M a t h . r o u n d ( x p o i n t + a r r o w d e f . l e n g t h * g x p t * M a t h . s i n ( a r r o w d e f . r o t a t i o n * M a t h . P I / 1 8 0 ) ) ;  
 	 y p o i n t 2 = M a t h . r o u n d ( y p o i n t - a r r o w d e f . l e n g t h * g x p t * M a t h . c o s ( a r r o w d e f . r o t a t i o n * M a t h . P I / 1 8 0 ) ) ;  
  
 	 g s t r + = ' < v : l i n e   f r o m = " ' + x p o i n t + ' , ' + y p o i n t + ' "   t o = " ' + x p o i n t 2 + ' , ' + y p o i n t 2 + ' "   > < v : s t r o k e   w e i g h t = " ' + a r r o w d e f . l i n e w e i g h t + ' p t " ;   c o l o r = " ' + a r r o w d e f . c o l o r + ' " ;   d a s h s t y l e = " ' + a r r o w d e f . d a s h s t y l e + ' " ;   / > < / v : l i n e > ' ;  
  
 	 x p o i n t 3 = M a t h . r o u n d ( x p o i n t 2 + 1 . 2 5 * a r r o w d e f . l a b e l s i z e * g x p t * M a t h . s i n ( a r r o w d e f . r o t a t i o n * M a t h . P I / 1 8 0 ) ) ;  
 	 y p o i n t 3 = M a t h . r o u n d ( y p o i n t 2 - 1 . 2 5 * a r r o w d e f . l a b e l s i z e * g x p t ) ;  
  
 	 i f ( M a t h . c o s ( a r r o w d e f . r o t a t i o n * M a t h . P I / 1 8 0 ) > 0 . 7 0 7 )    
 	 	 { p o s i t i o n = '   t e x t - a l i g n : c e n t e r ;   t o p : ' + M a t h . r o u n d ( y p o i n t 3 / g x p t ) + ' p t ;   l e f t :   ' + M a t h . r o u n d ( x p o i n t 3 / g x p t - 0 . 2 5 * a r r o w d e f . l a b e l . l e n g t h * a r r o w d e f . l a b e l s i z e ) + ' p t ;   ' ; }  
 	 i f ( M a t h . c o s ( a r r o w d e f . r o t a t i o n * M a t h . P I / 1 8 0 ) < 0 . 7 0 7 )    
 	 	 { p o s i t i o n = '   t e x t - a l i g n : c e n t e r ;   t o p : ' + M a t h . r o u n d ( y p o i n t 2 / g x p t ) + ' p t ;   l e f t :   ' + M a t h . r o u n d ( x p o i n t 3 / g x p t - 0 . 2 5 * a r r o w d e f . l a b e l . l e n g t h * a r r o w d e f . l a b e l s i z e ) + ' p t ;   ' ; }  
 	 i f ( M a t h . s i n ( a r r o w d e f . r o t a t i o n * M a t h . P I / 1 8 0 ) > 0 . 7 0 7 )    
 	 	 { p o s i t i o n = '   t e x t - a l i g n : c e n t e r ;   t o p : ' + M a t h . r o u n d ( y p o i n t 2 / g x p t - a r r o w d e f . l a b e l s i z e * ( 0 . 5 + M a t h . c o s ( a r r o w d e f . r o t a t i o n * M a t h . P I / 1 8 0 ) ) ) + ' p t ;   l e f t :   ' + M a t h . r o u n d ( x p o i n t 3 / g x p t - 0 . 2 5 * a r r o w d e f . l a b e l . l e n g t h * a r r o w d e f . l a b e l s i z e ) + ' p t ;   ' ; }  
 	 i f ( M a t h . s i n ( a r r o w d e f . r o t a t i o n * M a t h . P I / 1 8 0 ) < 0 . 7 0 7 )    
 	 	 { p o s i t i o n = '   t e x t - a l i g n : c e n t e r ;   t o p : ' + M a t h . r o u n d ( y p o i n t 2 / g x p t - a r r o w d e f . l a b e l s i z e * ( 0 . 5 + M a t h . c o s ( a r r o w d e f . r o t a t i o n * M a t h . P I / 1 8 0 ) ) ) + ' p t ;   l e f t :   ' + M a t h . r o u n d ( x p o i n t 3 / g x p t - 0 . 2 5 * a r r o w d e f . l a b e l . l e n g t h * a r r o w d e f . l a b e l s i z e ) + ' p t ;   ' ; }  
  
 / / 	 g s t r + = ' < s p a n   s t y l e = " f o n t :   ' + a r r o w d e f . l a b e l s i z e + ' p t   A r i a l ;   f o n t - w e i g h t : b o l d ;   p o s i t i o n : a b s o l u t e ; ' ;  
 / / 9 5 0 6 2 4 1 3 4 1   c h a n g e   ' b o l d '   t o   ' r e g u l a r '  
 	 g s t r + = ' < s p a n   s t y l e = " f o n t :   ' + a r r o w d e f . l a b e l s i z e + ' p t   A r i a l ;   f o n t - w e i g h t : r e g u l a r ;   p o s i t i o n : a b s o l u t e ; ' ;  
 	 g s t r + = p o s i t i o n + ' c o l o r : ' + a r r o w d e f . l a b e l c o l o r + ' " > ' + a r r o w d e f . l a b e l + ' < / s p a n > ' ;  
  
 	 x p o i n t = M a t h . r o u n d ( g x m i n - 0 . 5 * a r r o w d e f . s i z e * g x p t + ( a r r o w d e f . x - x m i n ) * x s c l + 0 . 5 * a r r o w d e f . s i z e * g x p t * M a t h . s i n ( a r r o w d e f . r o t a t i o n * M a t h . P I / 1 8 0 ) ) ;  
 	 y p o i n t = M a t h . r o u n d ( g y m i n - 0 . 5 * a r r o w d e f . s i z e * g x p t - ( a r r o w d e f . y - y m i n ) * y s c l - 0 . 5 * a r r o w d e f . s i z e * g x p t * M a t h . c o s ( a r r o w d e f . r o t a t i o n * M a t h . P I / 1 8 0 ) ) ;  
  
 	 g s t r + = a r r o w d e f . a r r o w h e a d ;  
 	 g s t r + = ' < v : s h a p e   t y p e = " # a r r o w h e a d "   s t y l e = " w i d t h : ' + a r r o w d e f . s i z e * g x p t + ' ;   h e i g h t : ' + a r r o w d e f . s i z e * g x p t ;  
 	 g s t r + = ' ;   t o p : ' + y p o i n t + ' ;   l e f t : ' + x p o i n t ;  
 	 g s t r + = ' "   t i t l e = " ' + a r r o w d e f . l a b e l + ' "   f i l l c o l o r = " ' + a r r o w d e f . c o l o r + ' " ' ;  
 	 g s t r + = ' " ;   s t y l e =   " r o t a t i o n : ' + a r r o w d e f . r o t a t i o n + ' d e g " ' ;  
 	 g s t r + = '   s t r o k e c o l o r = " ' + a r r o w d e f . c o l o r + ' "   / > ' ;  
 	  
 	 g s t r + = ' < / v : g r o u p > ' ;  
 	 t h i s . l a s t p l o t = g s t r ;  
 	 t h i s . l a s t p l o t a d d e d [ t h i s . n u m p l o t s ] = g s t r . l e n g t h - g s t r t e m p . l e n g t h ;  
 	 t h i s . n u m p l o t s + + ;  
 	 r e t u r n   g s t r ;  
  
 }   / /   e n d   f u n c t i o n  
  
  
  
 X Y G r a p h . p r o t o t y p e . D r a w l a b e l   =   f u n c t i o n   ( l a b e l d e f )   {  
  
 	 g s t r = g s t r . s u b s t r i n g ( 0 , g s t r . l e n g t h - 1 0 ) ;  
 	 g s t r t e m p = g s t r ;  
  
 	 l a b e l d e f . x   =   N u m b e r ( l a b e l d e f . x )  
 	 l a b e l d e f . y   =   N u m b e r ( l a b e l d e f . y )  
 	 l a b e l d e f . r o t a t i o n   =   N u m b e r ( l a b e l d e f . r o t a t i o n )  
 	 l a b e l d e f . l e n g t h   =   N u m b e r ( l a b e l d e f . l e n g t h )  
  
 	 x p o i n t = M a t h . r o u n d ( g x m i n + ( l a b e l d e f . x - x m i n ) * x s c l + 0 . 5 * l a b e l d e f . l a b e l s i z e * g x p t * M a t h . s i n ( l a b e l d e f . r o t a t i o n * M a t h . P I / 1 8 0 ) ) ;  
 	 y p o i n t = M a t h . r o u n d ( g y m i n - ( l a b e l d e f . y - y m i n ) * y s c l - 0 . 5 * l a b e l d e f . l a b e l s i z e * g x p t * M a t h . c o s ( l a b e l d e f . r o t a t i o n * M a t h . P I / 1 8 0 ) ) ;  
  
 	 x p o i n t 2 = M a t h . r o u n d ( x p o i n t + l a b e l d e f . l e n g t h * g x p t * M a t h . s i n ( l a b e l d e f . r o t a t i o n * M a t h . P I / 1 8 0 ) ) ;  
 	 y p o i n t 2 = M a t h . r o u n d ( y p o i n t - l a b e l d e f . l e n g t h * g x p t * M a t h . c o s ( l a b e l d e f . r o t a t i o n * M a t h . P I / 1 8 0 ) ) ;  
  
 	 x p o i n t 3 = M a t h . r o u n d ( x p o i n t 2 + 1 . 2 5 * l a b e l d e f . l a b e l s i z e * g x p t * M a t h . s i n ( l a b e l d e f . r o t a t i o n * M a t h . P I / 1 8 0 ) ) ;  
 	 y p o i n t 3 = M a t h . r o u n d ( y p o i n t 2 - 1 . 2 5 * l a b e l d e f . l a b e l s i z e * g x p t ) ;  
  
 	 i f ( M a t h . c o s ( l a b e l d e f . r o t a t i o n * M a t h . P I / 1 8 0 ) > 0 . 7 0 7 )    
 	 	 { p o s i t i o n = '   t e x t - a l i g n : c e n t e r ;   t o p : ' + M a t h . r o u n d ( y p o i n t 3 / g x p t ) + ' p t ;   l e f t :   ' + M a t h . r o u n d ( x p o i n t 3 / g x p t - 0 . 2 5 * l a b e l d e f . l a b e l . l e n g t h * l a b e l d e f . l a b e l s i z e ) + ' p t ;   ' ; }  
 	 i f ( M a t h . c o s ( l a b e l d e f . r o t a t i o n * M a t h . P I / 1 8 0 ) < 0 . 7 0 7 )    
 	 	 { p o s i t i o n = '   t e x t - a l i g n : c e n t e r ;   t o p : ' + M a t h . r o u n d ( y p o i n t 2 / g x p t ) + ' p t ;   l e f t :   ' + M a t h . r o u n d ( x p o i n t 3 / g x p t - 0 . 2 5 * l a b e l d e f . l a b e l . l e n g t h * l a b e l d e f . l a b e l s i z e ) + ' p t ;   ' ; }  
 	 i f ( M a t h . s i n ( l a b e l d e f . r o t a t i o n * M a t h . P I / 1 8 0 ) > 0 . 7 0 7 )    
 	 	 { p o s i t i o n = '   t e x t - a l i g n : c e n t e r ;   t o p : ' + M a t h . r o u n d ( y p o i n t 2 / g x p t - l a b e l d e f . l a b e l s i z e * ( 0 . 5 + M a t h . c o s ( l a b e l d e f . r o t a t i o n * M a t h . P I / 1 8 0 ) ) ) + ' p t ;   l e f t :   ' + M a t h . r o u n d ( x p o i n t 3 / g x p t - 0 . 2 5 * l a b e l d e f . l a b e l . l e n g t h * l a b e l d e f . l a b e l s i z e ) + ' p t ;   ' ; }  
 	 i f ( M a t h . s i n ( l a b e l d e f . r o t a t i o n * M a t h . P I / 1 8 0 ) < 0 . 7 0 7 )    
 	 	 { p o s i t i o n = '   t e x t - a l i g n : c e n t e r ;   t o p : ' + M a t h . r o u n d ( y p o i n t 2 / g x p t - l a b e l d e f . l a b e l s i z e * ( 0 . 5 + M a t h . c o s ( l a b e l d e f . r o t a t i o n * M a t h . P I / 1 8 0 ) ) ) + ' p t ;   l e f t :   ' + M a t h . r o u n d ( x p o i n t 3 / g x p t - 0 . 2 5 * l a b e l d e f . l a b e l . l e n g t h * l a b e l d e f . l a b e l s i z e ) + ' p t ;   ' ; }  
  
 / / 	 g s t r + = ' < s p a n   s t y l e = " f o n t :   ' + l a b e l d e f . l a b e l s i z e + ' p t   A r i a l ;   f o n t - w e i g h t : b o l d ;   p o s i t i o n : a b s o l u t e ; ' ;  
 / / 9 5 0 6 2 4 1 3 4 7   c h a n g e   ' b o l d '   t o   ' r e g u l a r '  
 / / 	 g s t r + = ' < s p a n   s t y l e = " f o n t :   ' + l a b e l d e f . l a b e l s i z e + ' p t   A r i a l ;   f o n t - w e i g h t : r e g u l a r ;   p o s i t i o n : a b s o l u t e ; ' ;  
 / / 9 5 0 6 2 4 1 3 5 2   c h a n g e   ' A r i a l '   t o   ' C o u r i e r   N e w '   t o   ' C o u r i e r '   s t i l l   t h i c k  
 / / 9 5 0 6 2 4 1 3 5 5   c h a n g e   ' A r i a l '   t o   ' D o t u m '   g e t   t h i n n e r   c h a r a c t e r s  
 	 g s t r + = ' < s p a n   s t y l e = " f o n t :   ' + l a b e l d e f . l a b e l s i z e + ' p t   D o t u m ;   f o n t - w e i g h t : r e g u l a r ;   p o s i t i o n : a b s o l u t e ; ' ;  
 	 g s t r + = p o s i t i o n + ' c o l o r : ' + l a b e l d e f . l a b e l c o l o r + ' " > ' + l a b e l d e f . l a b e l + ' < / s p a n > ' ;  
  
 	 g s t r + = t h i s . V M L p o i n t s h a p e ( l a b e l d e f . V M L p o i n t s h a p e t y p e ) ;  
  
 	 g s t r + = ' < v : s h a p e   t y p e = " # ' + ( l a b e l d e f . V M L p o i n t s h a p e t y p e ) . t o L o w e r C a s e ( ) + ' "   s t y l e = " w i d t h : ' + l a b e l d e f . p o i n t s i z e * g x p t + ' ;   h e i g h t : ' + l a b e l d e f . p o i n t s i z e * g x p t ;  
 	 g s t r + = ' ;   t o p : ' + M a t h . r o u n d ( g y m i n - 0 . 5 * l a b e l d e f . p o i n t s i z e * g x p t - ( l a b e l d e f . y - y m i n ) * y s c l , 2 ) + ' ;   l e f t : ' + M a t h . r o u n d ( g x m i n - 0 . 5 * l a b e l d e f . p o i n t s i z e * g x p t + ( l a b e l d e f . x - x m i n ) * x s c l ) ;  
 	 g s t r + = ' "   f i l l c o l o r = " ' + l a b e l d e f . p o i n t f i l l c o l o r + ' " ' ;  
 	 g s t r + = '   s t r o k e c o l o r = " ' + l a b e l d e f . p o i n t s t r o k e c o l o r + ' "   / > ' ;  
  
 	 g s t r + = ' < / v : g r o u p > ' ;  
 	 t h i s . l a s t p l o t = g s t r ;  
 	 t h i s . l a s t p l o t a d d e d [ t h i s . n u m p l o t s ] = g s t r . l e n g t h - g s t r t e m p . l e n g t h ;  
 	 t h i s . n u m p l o t s + + ;  
 	 r e t u r n   g s t r ;  
  
 }   / /   e n d   f u n c t i o n  
  
  
  
  
  
  
  
  
  
  
  
  
  
 / /   9 5 0 7 1 2 1 3 4 3  
 f u n c t i o n   s t e p f ( t 0 , b g n 0 )  
 {  
     i f ( t 0 < b g n 0 )   r e t u r n   0 . ;  
     r e t u r n   1 . ;  
  
 }   / /   e n d   f u n c t i o n   / /   9 5 0 7 1 2 1 3 4 6  
 / /   9 5 0 7 1 2 1 3 5 6  
 / /   s t e p f ( t , 3 )   g e t   t < 3     v a l u e   0  
 / /   s t e p f ( t , 3 )   g e t   t > = 3   v a l u e   1  
 / /  
 / /   ( 1 - s t e p f ( t , 3 ) )   g e t   t < 3     v a l u e   1  
 / /   ( 1 - s t e p f ( t , 3 ) )   g e t   t > = 3   v a l u e   0  
 / /  
 / /   ( s t e p f ( t , 2 ) - s t e p f ( t , 3 ) )  
 / /     g e t     2 < = t < 3     v a l u e   1  
 / /     t < 2   a n d   t > = 3   v a l u e   0  
 / /   9 5 0 7 1 2 1 4 0 0  
  
  
  
  
  
 / *  
 9 5 , 0 7 , 0 8 , 1 4 , 5 5 , 0 0  
 h t t p : / / w w w . u n i v i e . a c . a t / f u t u r e . m e d i a / m o e / J a v a C a l c / j c i n t r o . h t m l  
 c : \ $ f m \ j s \ m a t h 9 5 0 7 \ J a v a C a l c - j c i n t r o . h t m l  
  
 9 5 , 0 7 , 0 8 , 1 5 , 0 0  
 h t t p : / / w w w . u n i v i e . a c . a t / f u t u r e . m e d i a / m o e / J a v a C a l c / p a r s e r . j s  
 c : \ $ f m \ j s \ m a t h 9 5 0 7 \ J a v a C a l c - j c i n t r o - p a r s e r . j s  
  
  
 R e t u r n   t o   M a t h C o l l e c t i o n s  
  
 K e n   K i k u c h i  
 C o m m e n t   m e :   k i k u c h i @ m i x . o r . j p  
 L a s t   u p d a t e d :   2 / 2 9 / 2 0 0 0  
  
 9 5 0 7 1 3 2 2 1 0   i n c l u d e  
 f u n c t i o n   l o g g a m m a ( x )  
 a n d  
 f u n c t i o n   g a m m a ( x )    
  
 / * * /  
  
  
 / /   A b   h i e r   ( 1 7 .   3 .   2 0 0 0 )   v o n   K e n ' s   S c r i p t   & # 2 5 2 ; b e r n o m m e n :  
  
 f u n c t i o n   f a c t o r i a l ( n )   {     / *   f a c t o r i a l   * /  
     w i t h ( M a t h )   {  
     i f   ( n < 0 )     / *   i f   n e g a t i v e   * /  
     	 r e t u r n   g a m m a ( n + 1 ) ;  
     e l s e   i f   ( ( n   = =   0 )   | |   ( n   = =   1 ) )  
         r e t u r n   1 ;  
     e l s e   i f   ( a b s ( n ) - f l o o r ( a b s ( n ) ) = = 0   )   / *   i f   p o s i t i v e   i n t e g e r   * /  
         r e t u r n   n   *   f a c t o r i a l ( n - 1 )   ;  
     e l s e                   / *   i f   n o n - i n t e g e r   * /  
         r e t u r n   g a m m a ( n + 1 ) ;  
 }   }  
  
  
 f u n c t i o n   l o g g a m m a ( x )     {   / *   l o g   g a m m a   * /  
 v a r   u 0 ;   / / 9 5 0 7 1 4 2 0 0 8  
  
         w i t h ( M a t h )   {  
                 v a r   v = 1 ;  
                 v a r   w = 0 ;  
                 v a r   z = 0 ;  
                 w h i l e   (   x < 8   )   {   v * = x ;   x + +   }  
                 w = 1 / ( x * x ) ;  
  
 u 0 =   / / 9 5 0 7 1 4 2 0 0 9  
 ( ( ( ( ( ( ( ( - 3 6 1 7 / 1 2 2 4 0 0 ) * w   +   7 / 1 0 9 2 ) * w  
                   - 6 9 1 / 3 6 0 3 6 0 ) * w   +   5 / 5 9 4 0 ) * w  
                   - 1 / 1 6 8 0 ) * w   +   1 / 1 2 6 0 ) * w  
                   - 1 / 3 6 0 ) * w   +   1 / 1 2 ) / x    
 +   0 . 5   *   l o g ( 2 * P I ) - l o g ( v ) - x + ( x - 0 . 5 ) * l o g ( x )   ;  
  
 / / s t a t u s = ' x = [ ' + x + ' ] ;   w = [ ' + w + ' ] ;   u 0 = [ ' + u 0 + ' ]   9 5 0 7 1 4 2 0 1 0 ' ;  
  
 / *  
                 r e t u r n    
 u 0 ;  
  
 9 5 0 7 1 4 2 0 2 8   I   u s e   a b o v e   r e t u r n ,  
   t h e n   r e t u r n   n o t h i n g   ! !  
  
 / * * /  
                 r e t u r n   u 0 ;  
  
 }   }  
  
  
  
 f u n c t i o n   g a m m a ( x )   {     / *   g a m m a   * /  
  
 / / 9 5 0 7 1 4 1 9 4 0  
 v a r   i 0 ;  
 v a r   y 0 = ' ' ;  
 v a r   g 0 , g 1 , g 2 ;   / / 9 5 0 7 1 4 2 0 1 9  
  
 f o r ( i 0 = 0 ; i 0 < ( x + ' ' ) . l e n g t h ; i 0 + + )  
 {  
     i f ( i 0 = = 0 & & ( x + ' ' ) . c h a r A t ( i 0 ) = = ' ( ' ) c o n t i n u e ;  
     i f ( ( x + ' ' ) . c h a r A t ( i 0 ) = = ' ) ' ) b r e a k ;   / / 9 5 0 7 1 4 1 9 4 4  
     y 0 + = ( x + ' ' ) . c h a r A t ( i 0 ) ;  
 }  
  
  
 / / s t a t u s = " x = [ " + x + " ] ;   y 0 = [ " + y 0 + " ] ;   i s N a N ( x ) = [ " + i s N a N ( x ) + " ]   9 5 0 7 1 4 1 9 4 5 " ;  
 x = p a r s e F l o a t ( y 0 ) ;  
  
 / / 9 5 0 7 1 4 1 9 4 7  
  
  
         w i t h ( M a t h )   {  
                 i f   (   x   < =   0   )  
                 {  
                         i f   ( a b s ( x ) - f l o o r ( a b s ( x ) ) = = 0   )  
                                 r e t u r n   " C o m p l e x I n f i n i t y "   ;  
                         e l s e  
                         {  
 / / s t a t u s = P I / (   s i n ( P I * x )   *   e x p (   l o g g a m m a ( 1 - x )   )   )  
 / /           + '   9 5 0 7 1 4 2 0 0 4 ' ;  
  
 g 0 = l o g g a m m a ( 1 - x ) ;  
 g 1 = P I / (   s i n ( P I * x )   *   e x p (   g 0   )   ) ;  
  
 / /   a l e r t ( " x = [ " + x + " ] ;   g 0 = [ " + g 0 + " ] \ n g 1 = [ " + g 1 + " ]   9 5 0 7 1 4 2 0 2 1 " ) ;  
  
  
   r e t u r n   g 1 ;  
  
  
 / /   P I / (   s i n ( P I * x )   *   e x p (   l o g g a m m a ( 1 - x )   )   ) ;  
  
                         }  
                 }  
                 e l s e    
                 {  
 / / s t a t u s =   e x p ( l o g g a m m a ( x ) ) + '   9 5 0 7 1 4 2 0 0 5 '   ;  
  
 g 0 = l o g g a m m a ( x ) ;  
 g 1 = e x p (   g 0   )   ;  
  
 / / a l e r t ( " x = [ " + x + " ] ;   g 0 = [ " + g 0 + " ] \ n g 1 = [ " + g 1 + " ]   9 5 0 7 1 4 2 0 2 2 " ) ;  
  
 / /                     r e t u r n   e x p ( l o g g a m m a ( x ) )   ;  
  
                         r e t u r n   g 1   ;  
                 }  
 }   }  
  
  
 / /   " d y n a m i c   a s s i g n " .   O n e   i n p u t   f o r m  
 / /   c o m m a n d   s e r v e   i n f i n i t e   m a n y   g r a p h  
 / /   o p e n T a b l e ( d r a w I D , t a b l e 0 1 )  
 / /   B e c a u s e   ' d r a w I D '   c a n   b e   a n y   v a l u e .  
 / /   9 5 1 0 2 3 1 2 2 0  
  
 f u n c t i o n   o p e n T a b l e ( d r a w I D , t a b l e 0 1 )   / /   9 5 1 0 2 2 1 8 4 0  
 {  
 / /   9 5 1 0 2 2 1 9 4 4   a d d   ' t a b l e 0 1 '  
 / /   t a b l e 0 1 = = 0   c l o s e ,     t a b l e 0 1 = = 1   o p e n  
 v a r   o p e n C l o s e = " b l o c k " ;  
 i f ( t a b l e 0 1 = = 0 )   o p e n C l o s e = " n o n e " ;   / / 9 5 1 0 2 2 1 9 4 6  
  
 v a r   h t m l S t r =   / / 9 5 1 0 2 2 1 8 2 3  
 ' < T A B L E   c e l l S p a c i n g = 1   c e l l P a d d i n g = 0   w i d t h = " 1 0 0 % "   a l i g n = c e n t e r   b o r d e r = 0 > < T B O D Y > < b r > < T R   i d = " s h o w l x r ' + d r a w I D + ' "   s t y l e = " D I S P L A Y : ' + o p e n C l o s e + ' "   b g C o l o r = # c c f c f c > < T D   c o l S p a n = 7 > < T A B L E   w i d t h = " 1 0 0 % "   a l i g n = l e f t   b o r d e r = 0 > < T B O D Y > < T R > < T D   a l i g n = r i g h t   b g C o l o r = # F F F F 0 0   b o r d e r = 0   o n c l i c k = o p e n 0 l x r ( ' + d r a w I D + ' ) > '  
  
 + ' C < b r > L < b r > O < b r > S < b r > E < / T D > < T D   w i d t h = " 1 0 0 % " > < t a b l e >     < t r >     < t d   h e i g h t = " 0 % " > '  
  
 + ' < i n p u t   o n c l i c k = " j a v a s c r i p t : D r a w G r a f 2 ( ' + d r a w I D + ' ) "   t y p e = " b u t t o n "   v a l u e = "   D r a w   "   / > < I N P U T   n a m e = D e l 0 G r a p h   t y p e = " b u t t o n "   v a l u e = " W i p e "   o n c l i c k = j a v a s c r i p t : w i p e C u r v e ( ' + d r a w I D + ' ) ; > < I N P U T   n a m e = D e l A l l B o x   t y p e = " b u t t o n "   v a l u e = " D e l   A L L "   o n c l i c k = j a v a s c r i p t : d e l A l l ( ' + d r a w I D + ' ) > < I N P U T   n a m e = D e l T i t l e   t y p e = " b u t t o n "   v a l u e = " D e l   t i t l e "   o n c l i c k = j a v a s c r i p t : d o c u m e n t . g e t E l e m e n t B y I d ( " t i t l e 0 ' + d r a w I D + ' " ) . v a l u e = " " ; > < i n p u t   o n c l i c k = " j a v a s c r i p t : S e l e c t E q n ( ' + d r a w I D + ' ) "   t y p e = " b u t t o n "   v a l u e = " R e u s e   d e f a u l t "   / > < b r > '  
  
 + ' T i t l e :     < i n p u t   t y p e = " t e x t "   i d = " t i t l e 0 ' + d r a w I D + ' "   v a l u e = " "   s i z e = 5 5   / > < b r > f u n c t i o n   1     x ( t )   < i n p u t   t y p e = " t e x t "   i d = " f u n c 1 x ' + d r a w I D + ' "   v a l u e = " "   s i z e = 5 5   / > < b r > f u n c t i o n   1     y ( t )   < i n p u t   t y p e = " t e x t "   i d = " f u n c 1 y ' + d r a w I D + ' "   v a l u e = " "   s i z e = 5 5   / > < b r > f u n c t i o n   2     x ( t )   < i n p u t   t y p e = " t e x t "   i d = " f u n c 2 x ' + d r a w I D + ' "   v a l u e = " "   s i z e = 5 5   / > < b r > f u n c t i o n   2     y ( t )   < i n p u t   t y p e = " t e x t "   i d = " f u n c 2 y ' + d r a w I D + ' "   v a l u e = " "   s i z e = 5 5   / > < b r > f u n c t i o n   3     x ( t )   < i n p u t   t y p e = " t e x t "   i d = " f u n c 3 x ' + d r a w I D + ' "   v a l u e = " "   s i z e = 5 5   / > < b r > f u n c t i o n   3     y ( t )   < i n p u t   t y p e = " t e x t "   i d = " f u n c 3 y ' + d r a w I D  
 + ' "   v a l u e = " "   s i z e = 5 5   / > < b r > f u n c t i o n   4     x ( t )   < i n p u t   t y p e = " t e x t "   i d = " f u n c 4 x ' + d r a w I D + ' "   v a l u e = " "   s i z e = 5 5   / > < b r > f u n c t i o n   4     y ( t )   < i n p u t   t y p e = " t e x t "   i d = " f u n c 4 y ' + d r a w I D + ' "   v a l u e = " "   s i z e = 5 5   / > < b r > f u n c t i o n   5     x ( t )   < i n p u t   t y p e = " t e x t "   i d = " f u n c 5 x ' + d r a w I D + ' "   v a l u e = " "   s i z e = 5 5   / > < b r > f u n c t i o n   5     y ( t )   < i n p u t   t y p e = " t e x t "   i d = " f u n c 5 y ' + d r a w I D + ' "   v a l u e = " "   s i z e = 5 5   / > < b r > E a c h   c u r v e   a t   m o a t   1 0 0 0   p t .   D e l   f u n c t i o n   < I N P U T   n a m e = D e l E q n 1   t y p e = " b u t t o n "   v a l u e = " 1   "   o n c l i c k = j a v a s c r i p t : d e l e t e D a t a ( 6 1 , ' + d r a w I D + ' ) ; > < I N P U T   n a m e = D e l E q n 2   t y p e = " b u t t o n "   v a l u e = " 2   "   o n c l i c k = j a v a s c r i p t : d e l e t e D a t a ( 6 2 , ' + d r a w I D + ' ) ; > < I N P U T   n a m e = D e l E q n 3   t y p e = " b u t t o n "   v a l u e = " 3   "   o n c l i c k = j a v a s c r i p t : d e l e t e D a t a ( 6 3 , ' + d r a w I D + ' ) ; > < I N P U T   n a m e = D e l E q n 4   t y p e = " b u t t o n "   v a l u e = " 4   "   o n c l i c k = j a v a s c r i p t : d e l e t e D a t a ( 6 4 , ' + d r a w I D + ' ) ; > < I N P U T   n a m e = D e l E q n 5   t y p e = " b u t t o n "   v a l u e = " 5   "   o n c l i c k = j a v a s c r i p t : d e l e t e D a t a ( 6 5 , ' + d r a w I D + ' ) ; > < I N P U T   n a m e = D e l E q n A l l   t y p e = " b u t t o n "   v a l u e = " A L L "   o n c l i c k = j a v a s c r i p t : d e l e t e D a t a ( 6 0 0 0 , ' + d r a w I D  
 + ' ) ; > < b r > i n d e p e n d e n t   v a r i a b l e   t   s t e p   s i z e   a n d   b e g i n   e n d   & n b s p ;   < I N P U T   n a m e = D e l 0 G r a p h   t y p e = " b u t t o n "   v a l u e = " d e l "   o n c l i c k = j a v a s c r i p t : d e l e t e D a t a ( 0 , ' + d r a w I D + ' ) ; >   & n b s p ; < i n p u t   o n c l i c k = " j a v a s c r i p t : D r a w G r a f 2 ( ' + d r a w I D + ' ) "   t y p e = " b u t t o n "   v a l u e = " D r a w "   / > < b r > c u r v e 1   s t e p   s i z e   < i n p u t   t y p e = " t e x t "   i d = " t 1 L e n ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 6 "   / >   b e g i n   < i n p u t   t y p e = " t e x t "   i d = " t 1 M i n ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 6 "   / >   e n d   < i n p u t   t y p e = " t e x t "   i d = " t 1 M a x ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 6 "   / > < b r > c u r v e 2   s t e p   s i z e   < i n p u t   t y p e = " t e x t "   i d = " t 2 L e n ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 6 "   / >   b e g i n   < i n p u t   t y p e = " t e x t "   i d = " t 2 M i n ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 6 "   / >   e n d   < i n p u t   t y p e = " t e x t "   i d = " t 2 M a x ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 6 "   / > < b r > c u r v e 3   s t e p   s i z e   < i n p u t   t y p e = " t e x t "   i d = " t 3 L e n ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 6 "   / >   b e g i n   < i n p u t   t y p e = " t e x t "   i d = " t 3 M i n ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 6 "   / >   e n d   < i n p u t   t y p e = " t e x t "   i d = " t 3 M a x ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 6 "   / > < b r > c u r v e 4   s t e p   s i z e   < i n p u t   t y p e = " t e x t "   i d = " t 4 L e n ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 6 "   / >   b e g i n   < i n p u t   t y p e = " t e x t "   i d = " t 4 M i n ' + d r a w I D  
 + ' "   v a l u e = " "   s i z e = " 6 "   / >   e n d   < i n p u t   t y p e = " t e x t "   i d = " t 4 M a x ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 6 "   / > < b r > c u r v e 5   s t e p   s i z e   < i n p u t   t y p e = " t e x t "   i d = " t 5 L e n ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 6 "   / >   b e g i n   < i n p u t   t y p e = " t e x t "   i d = " t 5 M i n ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 6 "   / >   e n d   < i n p u t   t y p e = " t e x t "   i d = " t 5 M a x ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 6 "   / > < b r > B e l o w   o n e   c o l u m n   o n e   c u r v e   & n b s p ;   < I N P U T   n a m e = D e l 1 A r r o w   t y p e = " b u t t o n "   v a l u e = " d e l   5   c o l "   o n c l i c k = j a v a s c r i p t : d e l e t e D a t a ( 2 , ' + d r a w I D + ' ) > < b r > w i d t h   & n b s p ;   & n b s p ;   & n b s p ;   & n b s p ;   < i n p u t   t y p e = " t e x t "   i d = " w i d t h 1 ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 3 "   / >   & n b s p ;   < i n p u t   t y p e = " t e x t "   i d = " w i d t h 2 ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 3 "   / >   & n b s p ;   < i n p u t   t y p e = " t e x t "   i d = " w i d t h 3 ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 3 "   / >   & n b s p ;   < i n p u t   t y p e = " t e x t "   i d = " w i d t h 4 ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 3 "   / >   & n b s p ;   < i n p u t   t y p e = " t e x t "   i d = " w i d t h 5 ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 3 "   / > < b r > c o l o r   & n b s p ;   & n b s p ;   & n b s p ;   & n b s p ;     < i n p u t   t y p e = " t e x t "   i d = " c o l o r 1 ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 3 "   / >   & n b s p ;   < i n p u t   t y p e = " t e x t "   i d = " c o l o r 2 ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 3 "   / >   & n b s p ;   < i n p u t   t y p e = " t e x t "   i d = " c o l o r 3 ' + d r a w I D  
 + ' "   v a l u e = " "   s i z e = " 3 "   / >   & n b s p ;   < i n p u t   t y p e = " t e x t "   i d = " c o l o r 4 ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 3 "   / >   & n b s p ;   < i n p u t   t y p e = " t e x t "   i d = " c o l o r 5 ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 3 "   / > < b r > '  
 + ' s o l i d / d o t     & n b s p ;   < i n p u t   t y p e = " t e x t "   i d = " s t y l e 1 ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 3 "   / >   & n b s p ;   < i n p u t   t y p e = " t e x t "   i d = " s t y l e 2 ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 3 "   / >   & n b s p ;   < i n p u t   t y p e = " t e x t "   i d = " s t y l e 3 ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 3 "   / >   & n b s p ;   < i n p u t   t y p e = " t e x t "   i d = " s t y l e 4 ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 3 "   / >   & n b s p ;   < i n p u t   t y p e = " t e x t "   i d = " s t y l e 5 ' + d r a w I D + ' "   v a l u e = " "   s i z e = " 3 "   / > < b r > < f o r m   i d = " a r r o w f o r m ' + d r a w I D + ' "   a c t i o n = " " > < t a b l e > B e l o w   d e f i n e   o n e   a r r o w   ( f o r   m a n y   a r r o w   w r i t e   p r o g r a m ) < t r > < t d > a r r o w   x < / t d > < t d > < i n p u t   t y p e = " t e x t "   s i z e = " 4 "   i d = " x "   v a l u e = " "   / >   & n b s p ;   < / t d > < t d > a r r o w   y < / t d > < t d > < i n p u t   t y p e = " t e x t "   s i z e = " 4 "   i d = " y "   v a l u e = " "   / >   & n b s p ;   < / t d > < t d > a n g l e   < / t d > < t d > < i n p u t   t y p e = " t e x t "   s i z e = " 4 "   i d = " r o t a t i o n "   v a l u e = " "   / >   & n b s p ;   < / t d > < / t r > < t r > < t d > l e n g t h   < / t d > '  
 + ' < t d > < i n p u t   t y p e = " t e x t "   s i z e = " 4 "   i d = " l e n g t h "   v a l u e = " "   / >   & n b s p ;   < / t d > < t d > s i z e < / t d > < t d > < i n p u t   t y p e = " t e x t "   s i z e = " 4 "   i d = " s i z e "   v a l u e = " "   / >   & n b s p ;   < / t d > < t d > c o l o r   < / t d > < t d > < i n p u t   t y p e = " t e x t "   s i z e = " 4 "   i d = " c o l o r "   v a l u e = " "   / > < / t d > < / t r > < t r > < t d > t e x t < / t d > < t d > < i n p u t   t y p e = " t e x t "   s i z e = " 4 "   i d = " l a b e l "   v a l u e = " "   / >   & n b s p ;   < / t d > < t d > t x t C o l o r < / t d > < t d > < i n p u t   t y p e = " t e x t "   s i z e = " 4 "   i d = " l a b e l c o l o r "   v a l u e = " "   / >   & n b s p ;   < / t d > < t d > t x t S i z e < / t d > < t d > < i n p u t   t y p e = " t e x t "   s i z e = " 4 "   i d = " l a b e l s i z e "   v a l u e = " "   / > < / t d > < / t r > < t r > < t d > t h i c k n e s s < / t d > < t d > < i n p u t   t y p e = " t e x t "   s i z e = " 4 "   i d = " l i n e w e i g h t "   v a l u e = " "   / >   & n b s p ;   < / t d > < t d > s o l i d / d o t < / t d > < t d > < i n p u t   t y p e = " t e x t "   s i z e = " 4 "   i d = " d a s h s t y l e "   v a l u e = " "   / > < / t d > < t d > < I N P U T   n a m e = D e l 1 A r r o w   t y p e = " b u t t o n "   v a l u e = " d e l A r r o w "   o n c l i c k = j a v a s c r i p t : d e l e t e D a t a ( 1 , ' + d r a w I D + ' ) > < / t d > < / t r > < / t a b l e > < / f o r m > '  
 + ' < f o r m   i d = " l a b e l f o r m ' + d r a w I D + ' "   a c t i o n = " " > < t a b l e > B e l o w   d e f i n e   o n e   l a b e l   ( f o r   m a n y   l a b e l   w r i t e   p r o g r a m ) < t r > < t d > < ! - - d i v   i d = " g r a p h d i v 3 " > < / d i v - - > < / t d > < t d >     < t a b l e > < t r > < t d > l a b e l   x < / t d > < t d > < i n p u t   t y p e = " t e x t "   i d = " x "   s i z e = " 4 "   v a l u e = " "   / > < / t d > < t d > l a b e l   y < / t d > < t d > < i n p u t   t y p e = " t e x t "   i d = " y "   s i z e = " 4 "   v a l u e = " "   / > < / t d > < / t r > < t r > < t d > a n g l e < / t d > < t d > < i n p u t   t y p e = " t e x t "   i d = " r o t a t i o n "   s i z e = " 4 "   v a l u e = " "   / > < / t d > < t d > l e n g t h < / t d > < t d > < i n p u t   t y p e = " t e x t "   i d = " l e n g t h "   s i z e = " 4 "   v a l u e = " "   / > < / t d > < / t r > < t r > < t d > c o l o r < / t d > < t d > < i n p u t   t y p e = " t e x t "   i d = " l a b e l c o l o r "   s i z e = " 4 "   v a l u e = " "   / > < / t d > < t d > s i z e < / t d > < t d > < i n p u t   t y p e = " t e x t "   i d = " l a b e l s i z e "   s i z e = " 4 "   v a l u e = " "   / > < / t d > < / t r > '  
 + ' < t r > < t d > t e x t < / t d > < t d > < i n p u t   t y p e = " t e x t "   i d = " l a b e l "   s i z e = " 4 "   v a l u e = " "   / > < / t d > < t d > p t S i z e < / t d > < t d > < i n p u t   t y p e = " t e x t "   i d = " p o i n t s i z e "   s i z e = " 4 "   v a l u e = " "   / > < / t d > < / t r > < t r > < t d > f i l l C o l o r < / t d > < t d > < i n p u t   t y p e = " t e x t "   i d = " p o i n t f i l l c o l o r "   s i z e = " 4 "   v a l u e = " "   / > < / t d > < t d > e d g C o l o r < / t d > < t d > < i n p u t   t y p e = " t e x t "   i d = " p o i n t s t r o k e c o l o r "   s i z e = " 4 "   v a l u e = " "   / > < / t d > < / t r > < t r > < t d > p t S t y l e < / t d > < t d > < s e l e c t   i d = " V M L p o i n t s h a p e t y p e "   > < o p t i o n   v a l u e = " d i a m o n d " > d i a m o n d < / o p t i o n > < o p t i o n   v a l u e = " s q u a r e " > s q u a r e < / o p t i o n > < o p t i o n   v a l u e = " t r i a n g l e " > t r i a n g l e < / o p t i o n > < o p t i o n   v a l u e = " c i r c l e " > c i r c l e < / o p t i o n > < o p t i o n   v a l u e = " x " > x < / o p t i o n > < o p t i o n   v a l u e = " n o n e "   s e l e c t e d = " s e l e c t e d " > n o n e < / o p t i o n > < / s e l e c t > < / t d > < t d > < I N P U T   n a m e = D e l 1 A r r o w   t y p e = " b u t t o n "   v a l u e = " d e l L a b e l   "   o n c l i c k = j a v a s c r i p t : d e l e t e D a t a ( 3 , ' + d r a w I D + ' ) > < / t d > < t d >     < i n p u t   o n c l i c k = " j a v a s c r i p t : D r a w G r a f 2 ( ' + d r a w I D + ' ) "   t y p e = " b u t t o n "   v a l u e = " D r a w "   / > < / t d > < / t r > < / t a b l e > < / t d > < / t a b l e > < / f o r m > '  
 + ' < f o r m   i d = " D o c f o r m ' + d r a w I D + ' "   n a m e = " D o c f o r m 1 " > C u r v e   d o c u m e n t & n b s p ; < I N P U T   o n c l i c k = \ ' j a v a s c r i p t : w i n d o w . c l i p b o a r d D a t a . s e t D a t a ( " T e x t " , d o c u m e n t . g e t E l e m e n t B y I d ( " C u r v e D o c 0 ' + d r a w I D + ' " ) . v a l u e ) \ '   t y p e = b u t t o n   v a l u e = " C o p y   0 " >   & n b s p ;   < I N P U T   o n c l i c k = \ ' d o c u m e n t . g e t E l e m e n t B y I d ( " C u r v e D o c 0 ' + d r a w I D + ' " ) . v a l u e = " " ; \ '   t y p e = b u t t o n   v a l u e = " D e l e t e   0 " > < b r > < T E X T A R E A   i d = C u r v e D o c 0 ' + d r a w I D + '   n a m e = C u r v e B o x 0   r o w s = 8     c o l s = 6 0   > < / T E X T A R E A > < / f o r m > '  
 + ' D r a w i n g   b o a r d   s i z e   a n d   X , Y   a x i s   r a n g e < b r > b o a r d   & n b s p ;   w i d t h < i n p u t   t y p e = " t e x t "   i d = " b o a r d W ' + d r a w I D + ' "   v a l u e = " 3 0 0 "   s i z e = " 3 "   / > & n b s p ; h e i g h t   & n b s p ;   < i n p u t   t y p e = " t e x t "   i d = " b o a r d H ' + d r a w I D + ' "   v a l u e = " 3 0 0 "   s i z e = " 3 "   / > & n b s p ; i n   p o i n t s < b r > < f o n t   c o l o r = r e d > A d j u s t   b o a r d   s i z e   a n d   X , Y   r a n g e   t o   g e t   X : Y = 1 : 1 < / f o n t > < b r > m i n   X   < i n p u t   t y p e = " t e x t "   i d = " m i n X ' + d r a w I D + ' "   v a l u e = " - 1 0 "   s i z e = " 2 "   / >   & n b s p ;   m a x   X   < i n p u t   t y p e = " t e x t "   i d = " m a x X ' + d r a w I D + ' "   v a l u e = " + 1 0 "   s i z e = " 2 "   / >   & n b s p ;   m i n   Y   < i n p u t   t y p e = " t e x t "   i d = " m i n Y ' + d r a w I D + ' "   v a l u e = " - 1 0 "   s i z e = " 2 "   / >   & n b s p ;   m a x   Y   < i n p u t   t y p e = " t e x t "   i d = " m a x Y ' + d r a w I D  
 + ' "   v a l u e = " + 1 0 "   s i z e = " 2 "   / > < b r > < f o r m   n a m e = " a a ' + d r a w I D + ' " > < t a b l e > < t r > < t d   w i d t h = 2 4 8 > B o x   1   < i n p u t   t y p e = " r a d i o "   n a m e = " r a d i o 1 "   c h e c k e d   / > 0 < i n p u t   t y p e = " r a d i o "   n a m e = " r a d i o 1 "   / > 1 < I N P U T   o n c l i c k = \ ' j a v a s c r i p t : w i n d o w . c l i p b o a r d D a t a . s e t D a t a ( " T e x t " , d o c u m e n t . g e t E l e m e n t B y I d ( " b o x 1 1 ' + d r a w I D + ' " ) . v a l u e ) \ '   t y p e = b u t t o n   v a l u e = " c o p y   1 " >   & n b s p ;   < I N P U T   o n c l i c k = \ ' d o c u m e n t . g e t E l e m e n t B y I d ( " b o x 1 1 ' + d r a w I D + ' " ) . v a l u e = " " ; \ '   t y p e = b u t t o n   v a l u e = " d e l   1 " > < T E X T A R E A   i d = b o x 1 1 ' + d r a w I D + '   n a m e = a a B o x 1 1   r o w s = 8     c o l s = 2 8   > a l l   p o i n t s   x , y   c o o r d .   s t o r e   i n   B o x   1 < / T E X T A R E A > < / t d > < t d   w i d t h = 2 4 8 > B o x   2   < i n p u t   t y p e = " r a d i o "   n a m e = " r a d i o 2 "   c h e c k e d   / > 0 < i n p u t   t y p e = " r a d i o "   n a m e = " r a d i o 2 "   / > 1 < I N P U T   o n c l i c k = \ ' j a v a s c r i p t : w i n d o w . c l i p b o a r d D a t a . s e t D a t a ( " T e x t " , d o c u m e n t . g e t E l e m e n t B y I d ( " b o x 1 2 ' + d r a w I D + ' " ) . v a l u e ) \ '   t y p e = b u t t o n   v a l u e = " c o p y   2 " >   & n b s p ;   < I N P U T   o n c l i c k = \ ' d o c u m e n t . g e t E l e m e n t B y I d ( " b o x 1 2 ' + d r a w I D + ' " ) . v a l u e = " " ; \ '   t y p e = b u t t o n   v a l u e = " d e l   2 " > < T E X T A R E A   i d = b o x 1 2 ' + d r a w I D + '   n a m e = a a B o x 1 2   r o w s = 8     c o l s = 2 8   > a l l   p o i n t s   t , x , y   c o o r d .   s t o r e   i n   B o x   2 \ n t   i s   i n d e p e n d e n t   v a r i a b l e . < / T E X T A R E A > '  
  
 + ' < / t d > '  
  
  
 + ' < / t r > < t r > '  
  
 / / 9 5 1 1 1 2 0 7 2 0  
 + ' T h i s   f o r m   l e t   y o u   m o d i f y   o r i g i n a l   p r o b l e m .   < b r > '  
 + ' Y o u   c a n   d o   s m a l l   s c a l e   c h a n g e ,   y o u   c a n   a l s o < b r > '  
 + ' c h a n g e   t o   a   b r a n d   n e w   e q u a t i o n .   A t   t h e   s a m e < b r > '  
 + ' t i m e ,   p l e a s e   d e f i n e   i n d e p e n d e n t   v a r i a b l e   t < b r > '  
 + ' s t a r t   p o i n t   a n d   e n d   p o i n t   a n d   s t e p   s i z e . < b r > '  
 + ' Y o u   n e e d   d e f i n e   d r a w i n g   b o a r d   x , y   a x i s   r a n g e < b r > '  
 + ' m i n   X         m a x   X         m i n   Y         m a x   Y < f o n t   c o l o r = r e d > < b r > '  
 + ' P l e a s e   c l i c k   [ D r a w ]   w i t h i n   t h i s   f o r m ,   c h a n g e < b r > '  
 + ' m a d e   a p p e a r s   i n   n e w   d r a w i n g . < b r > '  
 + ' I f   y o u   c l i c k   [ D r a w   ' + d r a w I D + ' ]   o u t s i d e   o f   t h i s   f o r m , < b r > '  
 + ' c h a n g e   m a d e   d i s c a r d e d . < / f o n t > < b r > '  
 + ' I f   y o u   d o   n o t   l i k e   t h e   c h a n g e ,   p l e a s e   c l i c k < b r > '  
 + ' [ R e u s e   d e f a u l t ] .   9 5 1 1 1 2 0 7 3 0 < b r > '  
  
 + ' I f   y o u   w a n t   t o   k e e p   c u r v e   p l o t   a s   p i c t u r e   f i l e < b r > '  
 + ' p l e a s e   < f o n t   c o l o r = r e d > p r e s s   [ c o n t r o l ]   k e y   a n d   p r e s s   [ p r t   s c r ] < / f o n t > < b r > '  
 + ' O p e n   p a i n t . e x e ,   p a s t e   f u l l   s c r e e n   i m a g e   t o < b r > '  
 + ' d r a w i n g   b o a r d .   S a v e   t o   p i c t u r e   f i l e   9 5 1 1 1 2 2 0 1 3 < b r > '  
  
 + ' < / t r > < t r > B o x   3   < i n p u t   t y p e = " r a d i o "   n a m e = " r a d i o 3 "   c h e c k e d   / > 0   < i n p u t   t y p e = " r a d i o "   n a m e = " r a d i o 3 "   / > 1   & n b s p ; < i n p u t   o n c l i c k = " j a v a s c r i p t : D r a w G r a f 2 ( ' + d r a w I D + ' ) "   t y p e = " b u t t o n "   v a l u e = " D r a w "   / > & n b s p ; < I N P U T   n a m e = F u n c B u t t o n   t y p e = " b u t t o n "   v a l u e = " J S   f u n c t i o n   d e f . "   o n c l i c k = j a v a s c r i p t : o p e n 0 l x r ( 1 0 2 ) >   & n b s p ; < I N P U T   o n c l i c k = \ ' j a v a s c r i p t : w i n d o w . c l i p b o a r d D a t a . s e t D a t a ( " T e x t " , d o c u m e n t . g e t E l e m e n t B y I d ( " b o x 1 3 ' + d r a w I D  
 + ' " ) . v a l u e ) \ '   t y p e = b u t t o n   v a l u e = " c o p y   3 " >   & n b s p ;   < I N P U T   o n c l i c k = \ ' d o c u m e n t . g e t E l e m e n t B y I d ( " b o x 1 3 ' + d r a w I D + ' " ) . v a l u e = " " ; \ '   t y p e = b u t t o n   v a l u e = " d e l   3 " > < b r > < T E X T A R E A   i d = b o x 1 3 ' + d r a w I D + '   n a m e = a a B o x 1 3   r o w s = 8     c o l s = 6 0   > O t h e r   i n f o .   s t o r e   i n   B o x   3 .   D e f a u l t   B o x   1 , 2 , 3   a l l   c l o s e \ n t o   i n c r e a s e   c o m p u t i n g   s p e e d .   I f   y o u   n e e d   o n e   b o x   o p e n ,   c l i c k   \ n \ " 1 "   n e x t   t o   t h a t   b o x .   " 0 "   b u t t o n   i s   n o   o u t p u t .   " 1 "   b u t t o n   h a s   o u t p u t \ n I f   b o x   1   o p e n   f r e q u e n t l y   p l e a s e   g o t o   s o u r c e   c o d e   t o   f i n d \ n [ n a m e = " r a d i o 1 " ] ,   c h a n g e \ n < i n p u t   t y p e = " r a d i o "   n a m e = " r a d i o 1 " \ n   c h e c k e d   / > 0 \ n < i n p u t   t y p e = " r a d i o "   n a m e = " r a d i o 1 " \ n   / > 1 \ n t o \ n < i n p u t   t y p e = " r a d i o "   n a m e = " r a d i o 1 " \ n   / > 0 \ n < i n p u t   t y p e = " r a d i o "   n a m e = " r a d i o 1 " \ n   c h e c k e d   / > 1 \ n K e y   i s   t o   m o v e   [ c h e c k e d ] \ n B o x   2   f i n d   " r a d i o 2 " \ n B o x   3   f i n d   " r a d i o 3 " \ n 9 5 1 0 2 2 1 0 1 1 < / T E X T A R E A > '  
  
 + ' < / t r > '  
  
  
 + ' < / t a b l e > < / F O R M > < / t d > < / t r > < t r > '  
  
 + ' < t d > < / t d > < / t r > < / t a b l e > < / T D > < / T R > < / T B O D Y > < / T A B L E > < / T B O D Y > < / T A B L E > '  
  
  
 / / + ' < / t a b l e > < / F O R M > < / t d > < / t r > < t r > < t d > < / t d > < / t r > < / t a b l e > < / T D > < / T R > < / T B O D Y > < / T A B L E > < / T B O D Y > < / T A B L E > '  
  
  
 d o c u m e n t . g e t E l e m e n t B y I d ( " p u t T a b l e " + d r a w I D ) . i n n e r H T M L = h t m l S t r ;  
 }  
  
  
  
 / /   9 5 0 6 1 3 0 9 1 4   a d d     o p e n 0 l x r ( x x )  
 f u n c t i o n   o p e n 0 l x r ( x x )  
 {  
   v a r   i 0 ;  
   v a r   t o t a l W i n = 1 ;  
   i f ( x x = = 1 0 0 )  
   {  
     f o r ( i 0 = 1 0 1 ; i 0 < t o t a l W i n + 1 0 1 ; i 0 + + )  
     c l o s e l x r ( i 0 ) ;  
   }  
   e l s e  
   {  
     s s = e v a l ( " s h o w l x r " + x x ) ;  
  
     i f ( s s . s t y l e . d i s p l a y = = " b l o c k " )  
     { s s . s t y l e . d i s p l a y = " n o n e "  
     }  
     e l s e  
     { s s . s t y l e . d i s p l a y = " b l o c k "  
     }  
 / /   f o r ( i 0 = 1 0 1 ; i 0 < t o t a l W i n + 1 0 1 ; i 0 + + )  
 / /   i f ( i 0 ! = x x )   c l o s e l x r ( i 0 ) ;  
   }  
 }  
 f u n c t i o n   c l o s e l x r ( y y )  
 { s s = e v a l ( " s h o w l x r " + y y ) ;  
     i f ( s s . s t y l e . d i s p l a y = = " b l o c k " )  
     { s s . s t y l e . d i s p l a y = " n o n e "  
     }  
  
 / / 9 5 1 0 2 3 0 2 5 5   a d d   n e x t   l i n e   t o   s a v e   s y s t e m  
 / /   r e s o u r c e s  
   d o c u m e n t . g e t E l e m e n t B y I d ( " p u t T a b l e " + y y ) . i n n e r H T M L = " " ;  
 / / 9 5 1 0 2 3 0 3 3 1   n e e d   a b o v e   l i n e ,   b e c a u s e   w h e n  
 / / c l i c k   r i g h t   s i d e   y e l l o w   s t r i p e   t o   c l o s e  
 / / s t i l l   n e e d   t o   s a v e   s y s t e m   r e s o u r c e s  
 }  
  
  
  
  
  
 / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
 / / 2 0 0 9 - 0 6 - 1 8 - 1 5 - 5 7   i n c l u d e   t h e   f o l l o w i n g   t o   j s g r a p h 2 . j s  
  
 / /   9 5 0 6 1 9 1 2 3 0  
 f u n c t i o n   w i p e C u r v e ( d 3 )  
 {  
 d o c u m e n t . g e t E l e m e n t B y I d ( " g r a p h d i v " + d 3 ) . i n n e r H T M L = " " ;  
 d o c u m e n t . g e t E l e m e n t B y I d ( " e q n D o c " + d 3 ) . i n n e r H T M L = " "  
 }  
  
  
  
 / /   D r a w G r a p h ( )   h a s   s t a t i s t i c   g r a p h  
 / /                           p l o t t i n g   c a p a b i l i t y  
 / /   D r a w G r a f 2 ( )   d e l e t e   s t a t i s t i c   g r a p h   9 5 1 0 1 8 2 1 2 8  
 / /  
 f u n c t i o n   D r a w G r a f 2 ( a r g d 2 )  
 {  
     v a r   i 0 , i 1 , i 2 , i 3 , i 4 , i 5 ;  
     v a r   s z 1 = 2 ;    
     v a r   s z 2 = 5 ;    
     v a r   s z 3 = 5 ;    
     v a r   M y G r a p h   =   n e w   X Y G r a p h ( ) ;  
  
     v a r   e v 0 ;    
     v a r   e v 1 ;  
     v a r   e v 2 = ' [ ' ;  
     v a r   e v 3 = ' [ ' ;  
  
     v a r   o u S t r 1 = " " ;  
     v a r   o u S t r 2 = " " ;  
     v a r   o u S t r 3 = " " ;  
  
 / /   f i n d   o u t   i f   o u t p u t   b o x   1   i s   o p e n  
     j 4 = 0 ;    
     v a r   b o x 2 1 = 1 ;  
     j 5 = ' i f ( d o c u m e n t . a a ' + a r g d 2 + ' . r a d i o 1 [ 0 ] . c h e c k e d = = 1 ) b o x 2 1 = 0 ; ' ;  
     e v a l ( j 5 ) ;    
  
 / /   f i n d   o u t   i f   o u t p u t   b o x   2   i s   o p e n  
     v a r   b o x 2 2 = 1 ;  
     j 5 = ' i f ( d o c u m e n t . a a ' + a r g d 2 + ' . r a d i o 2 [ 0 ] . c h e c k e d = = 1 ) b o x 2 2 = 0 ; ' ;  
     e v a l ( j 5 ) ;  
  
 / /   f i n d   o u t   i f   o u t p u t   b o x   3   i s   o p e n  
     v a r   b o x 2 3 = 1 ;  
     j 5 = ' i f ( d o c u m e n t . a a ' + a r g d 2 + ' . r a d i o 3 [ 0 ] . c h e c k e d = = 1 ) b o x 2 3 = 0 ; ' ;  
     e v a l ( j 5 ) ;    
  
 / /   D e f a u l t   N O T   u s e   o u t p u t   b o x   1 , 2 , 3  
 / /   t o   i n c r e a s e   p r o c e s s .   U s e r   c a n   c l i c k  
 / /   ' 1 '   b u t t o n   t o   o p e n   o u t p u t   b o x .  
  
 / /   A v o i d   l a s t   o u t p u t   m i s t a k e   t o   t h i s   t i m e  
 / /   o u t p u t .   B e l o w   c l e a r   a l l   o u t p u t   b o x e s .  
 d o c u m e n t . g e t E l e m e n t B y I d ( " b o x 1 1 " + a r g d 2 ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " b o x 1 2 " + a r g d 2 ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " b o x 1 3 " + a r g d 2 ) . v a l u e =  
 ' ' ;    
  
 / /   d e f i n e   s t o r a g e   s p a c e   f o r   f i v e   c u r v e  
 / /   d a t a .  
 / /   ( n o   p o i n t   d a t a   s t o r e d   a t   t h i s   s t e p )  
     e v 0 = ' v a r   M y L i n e s = ' ;      
     e v 3 = ' [ ' ;  
     f o r ( i 3 = 0 ; i 3 < s z 3 ; i 3 + + )  
     {  
         e v 3 + = ' " " ' ;  
         i f ( i 3 < s z 3 - 1 ) e v 3 + = ' , ' ;  
         e l s e                 e v 3 + = ' ] ' ;  
     }  
     e v 0 = e v 0 + e v 3 ;    
     e v a l ( e v 0 ) ;  
 / /   w i n d o w . c l i p b o a r d D a t a . s e t D a t a ( " T e x t " , e v 0 + " \ n " )    
 / /   a l e r t ( " T h e   c o m m a n d   t o   c r e a t e   a r r a y   e v 0   h a s \ n b e e n   c o p i e d   t o   c l i p b o a r d   9 5 1 0 1 9 1 7 3 5 " ) ;  
 / /   e v 0   l o o k   l i k e     v a r   M y L i n e s = [ " " , " " , " " , " " , " " ] 
  
 / /   e v a l ( e v 0 ) ;     i s   t o   d e f i n e   t h i s   a r r a y .  
  
 / /   A b o v e   t o   c r e a t e   a r r a y   f o r   c u r v e s .  
 / /   B e l o w   a s s i g n   t h e   p r o p e r t y   o f   t h i s   a r r a y .  
 / /   C u r v e   a n d   e q u a t i o n   a r e   d i f f e r e n t .  
 / /   C u r v e   i s   a   c o l l e c t i o n   o f   h u n d r e d s   p o i n t  
 / /   x , y   c o o r d i n a t e s .  
 / /   E q u a t i o n   i s   m a t h e m a t i c s   e x p r e s s i o n .  
 / /   W h e n   v a r i a b l e   t   i n   e q u a t i o n   i s   d e t e r m i n e d  
 / /   t h i s   e q u a t i o n   w i t h   k n o w n   t   g i v e   o n e   p o i n t  
 / /   x , y   c o o r d i n a t e s ,   w h i c h   i s   o n e   e l e m e n t   o f  
 / /   c u r v e   a r r a y .   A f t e r   c u r v e   a r r a y   g e t   h u n d r e d  
 / /   x , y   d a t a ,   c u r v e   a r r a y   c a n   b e   u s e d   t o   p l o t .  
 / /   E q u a t i o n   c a n   n o t   p l o t   d i r e c t l y .  
  
 / /   X Y L i n e ( )   i s   X Y G r a p h ( )   d e c l a r a t i o n   f o r   l i n e  
 / /   B e l o w   a s s i g n   c u r v e   a r r a y   t o   b e   n e w   X Y L i n e ( )  
     f o r ( i 3 = 0 ; i 3 < s z 3 ; i 3 + + )      
     {  
         M y L i n e s [ i 3 ]   =   n e w   X Y L i n e ( ) ;  
     }  
  
 / /   X Y G r a p h   d e f a u l t   t o   u s e   t h i c k   b l a c k   c u r v e .  
 / /   N e x t   c o m m a n d   s a y   c u r v e   n o t   u s e   t h i c k   s q u a r e .  
     e v 0 = ' ' ;  
     e v 1 = ' M y L i n e s [ ' ;  
     e v 2 = ' ] . V M L p o i n t s h a p e t y p e = " n o n e " ; ' ;  
     f o r ( i 3 = 0 ; i 3 < s z 3 ; i 3 + + )  
     {  
         e v 0 = e v 1 + i 3 + e v 2 ;   / / A v o i d   t h i c k   c u r v e  
         e v a l ( e v 0 ) ;             / / 9 5 1 0 2 0 1 5 2 4   a d d  
     }  
 / /   a f t e r   r u n   M y L i n e s [ * ] . V M L p o i n t s h a p e t y p e = " n o n e " ;  
 / /   c u r v e   i s   t h i n   l i n e ,   l o o k   b e t t e r .  
 / /   [ * ]   m e a n s   [ 0 ]   t o   [ 4 ]  
  
     v a r   M y A r r o w   =   n e w   A r r o w ( ) ;  
     v a r   M y L a b e l 1   =   n e w   L a b e l ( ) ;    
     v a r   U p L i m i t = 1 0 0 0 ;   / /   e v e r y   c u r v e   a t   m o s t   1 0 0 0   p o i n t s  
     v a r   L o L i m i t = 2 ;         / /   e v e r y   c u r v e   a t   l e a s t   2   p o i n t s  
  
 / / d e t e r m i n e   d r a w i n g   b o a r d   s i z e  
     v a r   j j =    
     d o c u m e n t . g e t E l e m e n t B y I d ( " b o a r d H " + a r g d 2 ) . v a l u e ;  
     j j = p a r s e F l o a t ( j j ) ;  
     i f ( ! i s N a N ( j j ) & & j j > 0 )  
     M y G r a p h . g h e i g h t = j j ;    
     e l s e    
     M y G r a p h . g h e i g h t = 3 0 0 ;    
     j j =    
     d o c u m e n t . g e t E l e m e n t B y I d ( " b o a r d W " + a r g d 2 ) . v a l u e ;  
     j j = p a r s e F l o a t ( j j ) ;  
     i f ( ! i s N a N ( j j ) & & j j > 0 )  
     M y G r a p h . g w i d t h = j j ;    
     e l s e  
     M y G r a p h . g w i d t h = 3 0 0 ;  
 / / A b o v e   d e t e r m i n e   d r a w i n g   b o a r d   s i z e .  
 / / i n p u t   t a b l e   h a s   o n e   l i n e  
 / /   b o a r d       w i d t h   3 0 0       h e i g h t   3 0 0   i n   p t .    
 / / t h i s   l i n e   l e t   u s e r   d e t e r m i n e   b o a r d   s i z e  
  
 / / d e f i n e   a r r a y   f o r   f i v e   e q u a t i o n s  
 / / n o   e q u a t i o n   d e f i n i t i o n   a t   t h i s   s t e p .  
     e v 0 = ' v a r   e q 5 x y = ' ;  
     e v 1 = ' [ ' ;  
     e v 2 = ' [ ' ;  
     e v 3 = ' [ ' ;  
     f o r ( i 3 = 0 ; i 3 < s z 3 ; i 3 + + )  
     {  
         e v 3 + = ' " " ' ;  
         i f ( i 3 < s z 3 - 1 ) e v 3 + = ' , ' ;  
         e l s e                 e v 3 + = ' ] ' ;  
     }  
     f o r ( i 2 = 0 ; i 2 < s z 2 ; i 2 + + )  
     {  
         e v 2 + = e v 3 ;  
         i f ( i 2 < s z 2 - 1 ) e v 2 + = ' , ' ;  
         e l s e                 e v 2 + = ' ] ' ;  
     }  
     f o r ( i 1 = 0 ; i 1 < s z 1 ; i 1 + + )  
     {  
         e v 1 + = e v 2 ;  
         i f ( i 1 < s z 1 - 1 ) e v 1 + = ' , ' ;  
         e l s e                 e v 1 + = ' ] ' ;  
     }  
     e v 0 = e v 0 + e v 1 ;    
     e v a l ( e v 0 ) ;  
  
 i f ( b o x 2 3 )  
 o u S t r 3 + =  
   " T h r e e   i n d e x   a r r a y   e q 5 x y [ i 1 ] [ i 2 ] [ i 3 ]   i s   d e f i n e d   b y   [ e v a l ( e v 0 ) ; ]   e v 0 = \ n "  
 + e v 0 + " \ n "  
 + " 0 < = i 1 < s z 1 = 2 ;     x ( t ) , y ( t )   t w o   e x p r e s s i o n   f o r m   o n e   e q u a t i o n . \ n "  
 + " 0 < = i 2 < s z 2 = 5 ;     c o n s t a n t   a , b   e v a l u a t i o n ,   v a r i a b l e   t   e v a l u a t i o n   t o t a l   f i v e   s t e p s . \ n "  
 + " 0 < = i 3 < s z 3 = 5 ;     p r o g r a m   a l l o w   f i v e   e q u a t i o n   d e f i n i t i o n .   9 5 1 0 1 9 1 4 3 4 \ n "  
 + " i 2 = = 0   i s   u s e r   i n p u t   e q u a t i o n   e x p r e s s i o n . \ n " ;  
 + "           v a r i a b l e   x   c o n f u s e   w i t h   e x p ( ) ;   v a r i a b l e   t   c o n f u s e   w i t h   t a n ( ) \ n " ;  
 + " i 2 = = 1   c h a n g e   x   t o   t t   a n d   c h a n g e   t   t o   t t \ n " ;  
 + " i 2 = = 2   c h a n g e   a   w i t h   a s s i g n e d   v a l u e   ( n o t   u s e   a t   t h i s   v e r s i o n ) \ n " ;  
 + " i 2 = = 3   c h a n g e   b   w i t h   a s s i g n e d   v a l u e   ( n o t   u s e   a t   t h i s   v e r s i o n ) \ n " ;  
 + " i 2 = = 4   c h a n g e   v a r i a b l e   t t   t o   n u m e r i c a l   v a l u e . \ n " ;  
 + " e q 5 x y [ * ] [ 4 ] [ * ]   c a n   b e   u s e d   t o   f i n d   ( x , y )   c o o r d i n a t e   v a l u e . \ n " ;  
 + " \ n " ;  
 / /   a b o v e   c r e a t e   e q u a t i o n   a r r a y .  
 / /   b e l o w   r e a d   i n   e q u a t i o n   e x p r e s s i o n .  
 / /   u s e r ' s   e q u a t i o n   d e f i n i t i o n   c o p i e d  
 / /   t o   e q 5 x y [ i 1 ] [ i 2 ] [ i 3 ]  
 / /   i 1 = 0   f ( x ) ;   i 1 = 1   f ( y ) ;  
 / /   [ i 2 ] = [ 0 ]   =   u s e r ' s   e q u a t i o n   d e f i n i t i o n  
 / /   i 3 = 0   e q u a t i o n   1   . . .   i 3 = 4   e q u a t i o n   5  
     f o r ( i 3 = 0 ; i 3 < s z 3 ; i 3 + + )  
     {  
 e q 5 x y [ 0 ] [ 0 ] [ i 3 ] = d o c u m e n t . g e t E l e m e n t B y I d ( " f u n c " + ( i 3 + 1 ) + " x " + a r g d 2 ) . v a l u e ;  
 e q 5 x y [ 1 ] [ 0 ] [ i 3 ] = d o c u m e n t . g e t E l e m e n t B y I d ( " f u n c " + ( i 3 + 1 ) + " y " + a r g d 2 ) . v a l u e ;  
     }   / /   9 5 1 0 2 4 1 2 2 0  
  
 / /   u s e r   d e f i n e d   e q u a t i o n :   e q 5 x y [ * ] [ 0 ] [ * ]  
 / /   c h a n g e   x   a n d   t   t o   t t   :   e q 5 x y [ * ] [ 1 ] [ * ]  
 / /   c h a n g e   x   t o   t t   n o t   c o n f u s e   w i t h   e x p ( )  
 / /   c h a n g e   t   t o   t t   n o t   c o n f u s e   w i t h   t a n ( )  
 / /   u s e r   d o   n o t   i n p u t   t t   d i r e c t l y   9 5 1 0 2 0 2 1 2 0  
     f o r ( i 3 = 0 ; i 3 < s z 3 ; i 3 + + )  
     {  
 e q 5 x y [ 0 ] [ 1 ] [ i 3 ] = t o S y n t a x ( e q 5 x y [ 0 ] [ 0 ] [ i 3 ] ) ;  
 e q 5 x y [ 1 ] [ 1 ] [ i 3 ] = t o S y n t a x ( e q 5 x y [ 1 ] [ 0 ] [ i 3 ] ) ;  
     }  
  
 / /   d e f i n e   a r r a y   f o r   f i v e   c u r v e  
 / /   u p p e r / l o w e r   l i m i t s  
     e v 0 = ' v a r   t M i n M a x = ' ;  
     e v 1 = ' [ ' ;  
     e v 3 = ' [ ' ;  
     f o r ( i 3 = 0 ; i 3 < s z 3 ; i 3 + + )   / /   s z 3 = 5   f i v e   c u r v e  
     {  
         e v 3 + = ' " " ' ;  
         i f ( i 3 < s z 3 - 1 ) e v 3 + = ' , ' ;  
         e l s e                 e v 3 + = ' ] ' ;  
     }  
     f o r ( i 1 = 0 ; i 1 < s z 1 ; i 1 + + )   / /   s z 1 = 2   t w o   e n d s  
     {  
         e v 1 + = e v 3 ;  
         i f ( i 1 < s z 1 - 1 ) e v 1 + = ' , ' ;  
         e l s e                 e v 1 + = ' ] ' ;  
     }  
     e v 0 = e v 0 + e v 1 ;    
     e v a l ( e v 0 ) ;  
 / /   a b o v e   d e f i n e   a r r a y  
 / /   b e l o w   r e a d   i n   u p p e r / l o w e r   l i m i t s  
     f o r ( i 3 = 0 ; i 3 < s z 3 ; i 3 + + )  
     {  
         e v 0 = ' t M i n M a x [ 0 ] [ ' ;   / /   9 5 1 0 1 9 1 9 2 9  
         e v 1 = ' ] = d o c u m e n t . g e t E l e m e n t B y I d ( " t ' + ( i 3 + 1 ) + ' M i n " + a r g d 2 ) . v a l u e ; ' ;  
         e v 0 + = i 3 + e v 1 ;  
         e v a l ( e v 0 ) ;       / / 9 5 1 0 1 9 1 9 3 1  
  
         e v 0 = ' t M i n M a x [ 1 ] [ ' ;   / /   9 5 1 0 1 9 1 9 2 9  
         e v 1 = ' ] = d o c u m e n t . g e t E l e m e n t B y I d ( " t ' + ( i 3 + 1 ) + ' M a x " + a r g d 2 ) . v a l u e ; ' ;  
         e v 0 + = i 3 + e v 1 ;  
         e v a l ( e v 0 ) ;       / / 9 5 1 0 1 9 1 9 3 2  
     }   / /   9 5 1 0 1 9 1 9 3 3  
  
 / /   s t r i n g   t M i n M a x [ ] [ ]   ' 1 '   +   ' 2 '   g e t   ' 1 2 '  
 / /   n u m b e r   t M i n M a x [ ] [ ]   ' 1 '   +   ' 2 '   g e t   3  
 / /   c h a n g e   s t r i n g   t M i n M a x [ ] [ ]  
 / /           t o   n u m b e r   t M i n M a x [ ] [ ]  
     f o r ( i 3 = 0 ; i 3 < s z 3 ; i 3 + + )  
     {  
 t M i n M a x [ 0 ] [ i 3 ] = p a r s e F l o a t ( t M i n M a x [ 0 ] [ i 3 ] ) ;   / /   9 5 1 0 1 9 2 0 4 7  
 t M i n M a x [ 1 ] [ i 3 ] = p a r s e F l o a t ( t M i n M a x [ 1 ] [ i 3 ] ) ;  
     }     / /   9 5 1 0 1 9 2 0 4 8  
  
 / / d e f i n e   d r a w i n g   t i t l e   N O T   o k   a t   9 5 1 0 2 2 1 6 5 0  
 / / d e f i n e   d r a w i n g   t i t l e   h e r e   O K       9 5 1 0 2 2 1 6 5 1  
         M y G r a p h . t i t l e =    
 d o c u m e n t . g e t E l e m e n t B y I d ( " t i t l e 0 " + a r g d 2 ) . v a l u e ;  
  
     v a r   f l a g 0 = 0 ;  
     f o r ( i 3 = 0 ; i 3 < s z 3 ; i 3 + + )  
     {  
         i f ( t M i n M a x [ 0 ] [ i 3 ] > t M i n M a x [ 1 ] [ i 3 ] )  
         {  
             f l a g 0 = 1 ;  
         a l e r t ( " S t a r t   p o i n t   t " + ( i 3 + 1 ) + " = " + t M i n M a x [ 0 ] [ i 3 ] + " > " + t M i n M a x [ 1 ] [ i 3 ] + " = e n d   p o i n t   t " + ( i 3 + 1 ) + " \ n "  
 + " A l l o w   o n l y   t   f r o m   s m a l l   t o   l a r g e ,   a l l o w   o n l y   p o s i t i v e   s t e p   s i z e . \ n "  
 + " I f   y o u   n e e d   f r o m   l a r g e   t   t o   s m a l l   t   a n d   n e g a t i v e   s t e p   s i z e ,   p l e a s e   m o d i f y   c o d e . \ n "  
 + " 9 5 1 0 1 9 1 9 5 2 "  
 ) ;  
         }   / / 9 5 1 0 1 9 1 9 5 2  
     }  
     i f ( f l a g 0 )   r e t u r n ;  
  
 / / d e f i n e   s t e p   s i z e   a r r a y  
     e v 0 = ' v a r   t S t e p = [ ' ;      
     f o r ( i 3 = 0 ; i 3 < s z 3 ; i 3 + + )  
     {  
         e v 0 + = ' " " ' ;  
         i f ( i 3 < s z 3 - 1 ) e v 0 + = ' , ' ;  
         e l s e                 e v 0 + = ' ] ' ;  
     }  
     e v a l ( e v 0 ) ;   / /   9 5 1 0 2 0 2 1 2 9  
 / /   a b o v e   d e f i n e   s t e p   s i z e   a r r a y  
 / /   b e l o w   a s s i g n   d a t a   t o   s t e p   s i z e   a r r a y  
     f o r ( i 3 = 0 ; i 3 < s z 3 ; i 3 + + )  
     {  
 t S t e p [ i 3 ] = d o c u m e n t . g e t E l e m e n t B y I d ( " t " + ( i 3 + 1 ) + " L e n " + a r g d 2 ) . v a l u e ;  
 t S t e p [ i 3 ] = p a r s e F l o a t ( t S t e p [ i 3 ] ) ;  
  
         i f ( t S t e p [ i 3 ] < 0 )  
         {  
         a l e r t ( " L i n e   " + ( i 3 + 1 ) + "   s t e p   s i z e   t S t e p = " + t S t e p [ i 3 ] + " < 0 \ n "  
 + " T h i s   p r o g r a m   a l l o w   o n l y   p o s i t i v e   s t e p   s i z e . \ n "  
 + " P l e a s e   m o d i f y   c o d e   f o r   n e g a t i v e   s t e p . \ n 9 5 1 0 1 9 2 0 0 0 " ) ;  
         r e t u r n ;  
         }  
  
 e v 1 = 0 . 0 0 1 ;   / / 9 5 1 0 2 4 1 4 5 8  
  
         i f ( t S t e p [ i 3 ] < e v 1 )  
         {  
 i f ( b o x 2 3 )  
         o u S t r 3 + = ' \ n C u r v e   ' + ( i 3 + 1 ) + '   s t e p   s i z e   w a s   '  
 + t S t e p [ i 3 ] + '   c h a n g e   t o   ' + e v 1 + ' \ n '  
 + ' I f   y o u   n e e d   t i n y   s t e p   s i z e ,   p l e a s e   o p e n   '  
 + ' s o u r c e   c o d e . \ n F i n d   [ e v 1 = 0 . 0 0 1 ; ]   m o d i f y   i t s   v a l u e . '  
 + '   9 5 1 0 2 4 1 4 5 1 \ n \ n ' ;  
  
 e v 0 = ' d o c u m e n t . g e t E l e m e n t B y I d ( " t ' + ( i 3 + 1 )  
       + ' L e n " + a r g d 2 ) . v a l u e = t S t e p [ i 3 ] = e v 1 ' ;  
 e v a l ( e v 0 ) ;   / / 9 5 1 0 2 4 1 4 4 3  
         }  
  
     }   / /   9 5 1 0 2 0 2 1 3 4  
  
 / /   D e f i n e   a r r a y   f o r   l i n e   t o t a l   s t e p s  
 / /   9 5 1 0 1 9 2 1 5 3  
     e v 0 = ' v a r   t 0 T o t a l = ' ;      
     e v 3 = ' [ ' ;  
     f o r ( i 3 = 0 ; i 3 < s z 3 ; i 3 + + )  
     {  
         e v 3 + = ' " " ' ;  
         i f ( i 3 < s z 3 - 1 ) e v 3 + = ' , ' ;  
         e l s e                 e v 3 + = ' ] ' ;  
     }  
     e v 0 = e v 0 + e v 3 ;    
     e v a l ( e v 0 ) ;  
 / /   A b o v e   d e f i n e   a r r a y   f o r   l i n e   t o t a l   s t e p s  
 / /   B e l o w   f i n d   l i n e   t o t a l   s t e p s  
     f o r ( i 3 = 0 ; i 3 < s z 3 ; i 3 + + )      
     {  
         t 0 T o t a l [ i 3 ] = ( t M i n M a x [ 1 ] [ i 3 ] - t M i n M a x [ 0 ] [ i 3 ] ) / t S t e p [ i 3 ] ;  
  
         i f ( t 0 T o t a l [ i 3 ] > U p L i m i t ) t 0 T o t a l [ i 3 ] = U p L i m i t ;   / /   1 0 0 0  
         i f ( t 0 T o t a l [ i 3 ] < L o L i m i t ) t 0 T o t a l [ i 3 ] = L o L i m i t ;   / /   2  
         i f ( i s N a N ( t 0 T o t a l [ i 3 ] ) )   t 0 T o t a l [ i 3 ] = 0 ;   / /   n o t   d r a w   c u r v e .  
     }  
  
 / /   B e l o w   d e f i n e   x - a x i s   a n d   y - a x i s   r a n g e  
 / /   X Y G r a p h   i n s i s t   t o   i n c l u d e   ( 0 , 0 )  
 / /   A l t h o u g h   u s e r   d i d   n o t   i n c l u d e   ( 0 , 0 )  
 / /   o u t p u t   s t i l l   i n c l u d e   ( 0 , 0 )   t h i s   m a y  
 / /   c a u s e   m o s t   b l a n k   o u t p u t .   9 5 1 0 2 1 1 7 5 4  
     M y G r a p h . x m a x =  
     d o c u m e n t . g e t E l e m e n t B y I d ( " m a x X " + a r g d 2 ) . v a l u e ;  
     M y G r a p h . x m i n =  
     d o c u m e n t . g e t E l e m e n t B y I d ( " m i n X " + a r g d 2 ) . v a l u e ;  
     M y G r a p h . y m a x =  
     d o c u m e n t . g e t E l e m e n t B y I d ( " m a x Y " + a r g d 2 ) . v a l u e ;  
     M y G r a p h . y m i n =  
     d o c u m e n t . g e t E l e m e n t B y I d ( " m i n Y " + a r g d 2 ) . v a l u e ;  
  
 / /   B e l o w   d e f i n e   f i v e   l i n e s   w i d t h ,   c o l o r  
 / /   s o l i d / d a s h / d o t   p r o p e r t i e s .  
 / /   C a l c u l a t e   e a c h   p o i n t   x , y   c o - o r d i n a t e .  
     f o r ( i 3 = 0 ; i 3 < s z 3 ; i 3 + + )  
     {  
         k 1 = ' d o c u m e n t . g e t E l e m e n t B y I d ( " w i d t h '  
         + ( i 3 + 1 ) + a r g d 2 + ' " ) . v a l u e ' ;  
         k 1 = e v a l ( k 1 ) ;  
         k 2 = ' d o c u m e n t . g e t E l e m e n t B y I d ( " c o l o r '  
         + ( i 3 + 1 ) + a r g d 2 + ' " ) . v a l u e ' ;  
         k 2 = e v a l ( k 2 ) ;  
         k 3 = ' d o c u m e n t . g e t E l e m e n t B y I d ( " s t y l e '  
         + ( i 3 + 1 ) + a r g d 2 + ' " ) . v a l u e ' ;  
         k 3 = e v a l ( k 3 ) ;  
         k 4 = " \ " w e i g h t = ' " + k 1 + " p t ' ;   c o l o r = ' "  
         + k 2 + " ' ;   d a s h s t y l e = ' " + k 3 + " ' ; \ " " ;  
         M y L i n e s [ i 3 ] . V M L s t r o k e   =   e v a l ( k 4 ) ;    
 i f ( b o x 2 3 )  
         o u S t r 3 + = " \ n C u r v e   " + ( i 3 + 1 ) + "   p r o p e r t y   i s   d e f i n e d   a s   b e l o w \ n k 4 = [ " + k 4 + " ] \ n \ n " ; / / 9 5 1 0 2 0 1 5 0 9  
  
 / /   A b o v e   d e f i n e   f i v e   l i n e s   w i d t h ,   c o l o r  
 / /   s o l i d / d a s h / d o t   p r o p e r t i e s .  
 / /   B e l o w   c a l c u l a t e   e a c h   p o i n t   x , y    
 / /   c o - o r d i n a t e .   t   i s   i n d e p e n d e n t   v a r i a b l e .  
 / /   E a c h   s t e p ,   t   g e t   a   n e w   v a l u e ,   p u t   t h i s  
 / /   n e w   v a l u e   t o   e q u a t i o n   t o   f i n d   n e w   p o i n t  
 / /   x , y   c o - o r d i n a t e .  
  
         f o r ( j 4 = 0 ; j 4 < t 0 T o t a l [ i 3 ] ; j 4 + + )  
         {    
 / /   t   g e t   a   n e w   v a l u e   ( b e c a u s e   j 4   i s   n e w )  
             t   =   t M i n M a x [ 0 ] [ i 3 ] + j 4 * t S t e p [ i 3 ] ;  
  
 / /   A b o v e   t   g e t   a   v a l u e ,   f o r   e x a m p l e   t = 0 . 3 2  
 / /   b e l o w   c h a n g e   e q u a t i o n   t t   t o   a b o v e   0 . 3 2  
 / /   f o r   e x a m p l e   s i n ( t t )   c h a n g e   t o   s i n ( 0 . 3 2 )  
 / /   9 5 1 0 2 2 2 2 1 1   u s e   ' w i t h ( M a t h ) { '   a n d   ' } '  
             e q 5 x y [ 0 ] [ 4 ] [ i 3 ] = ' w i t h ( M a t h ) { ' + e q 5 x y [ 0 ] [ 1 ] [ i 3 ] . r e p l a c e ( / t t / g ,   t ) + ' } '  
             e q 5 x y [ 1 ] [ 4 ] [ i 3 ] = ' w i t h ( M a t h ) { ' + e q 5 x y [ 1 ] [ 1 ] [ i 3 ] . r e p l a c e ( / t t / g ,   t ) + ' } '  
  
 / /   e q u a t i o n   s i n ( 0 . 3 2 )   c a n   b e   e v a l u a t e d   b y  
 / /   e v a l ( s i n ( 0 . 3 2 ) )   t o   g e t   v a l u e .  
 / /   T r i g o n o m e t r i c   f u n c t i o n s   m u s t   u s e   r a d i a n  
 / /   a s   i n p u t .   5 7 . 2 9 5 7 7 9 5   d e g r e e   =   1   r a d .  
 / /   A f t e r   e v a l u a t i o n ,  
 / /   s i n ( t t )   b e c o m e   s i n ( 0 . 3 2 ) = 0 . 3 1 4 5 6  
 / /   T h i s   i s   x   c o o r d i n a t e   ( o r   y   c o o r d i n a t e )  
 / /  
 / /   P o i n t   x , y   c o o r d   v a l u e   s t o r e   t o   c u r v e   a r r a y  
             M y L i n e s [ i 3 ] . x [ j 4 ] = e v a l ( e q 5 x y [ 0 ] [ 4 ] [ i 3 ] ) ;  
             M y L i n e s [ i 3 ] . y [ j 4 ] = e v a l ( e q 5 x y [ 1 ] [ 4 ] [ i 3 ] ) ;  
 / /   A b o v e   i s   u s e d   t o   p l o t   c u r v e .  
 / /   B e l o w   s t o r e   s a m e   d a t a   f o r   r e a d i n g .  
 i f ( b o x 2 1 )  
   o u S t r 1 + = M y L i n e s [ i 3 ] . x [ j 4 ] + ' ,   ' + M y L i n e s [ i 3 ] . y [ j 4 ] + ' \ n ' ; / / 9 5 1 0 2 0 1 2 1 7  
  
 i f ( b o x 2 2 )  
   o u S t r 2 + = t + ' ,   ' + M y L i n e s [ i 3 ] . x [ j 4 ] + ' ,   ' + M y L i n e s [ i 3 ] . y [ j 4 ] + ' \ n ' ; / / 9 5 1 0 2 0 1 2 1 7  
         }   / /   e n d   o f   f o r ( j 4 = 0 ; j 4 < t 0 T o t a l [ i 3 ] ; j 4 + + )  
             / /   A b o v e   f i n d   c u r v e   p o i n t   x , y   c o o r d .  
  
         i f ( b o x 2 1 )  
         {  
         o u S t r 1 + = ' A b o v e   c u r v e   ' + ( i 3 + 1 ) + ' .   T o t a l   p o i n t s :   ' + t 0 T o t a l [ i 3 ] + ' \ n ' ; / / 9 5 1 0 2 2 1 0 3 9  
         i f ( i 3 < s z 3 - 1 )  
         o u S t r 1 + = ' B e l o w   c u r v e   ' + ( i 3 + 2 ) + ' .   T o t a l   p o i n t s :   ' + t 0 T o t a l [ i 3 + 1 ] + ' \ n ' ;  
         }  
  
         i f ( b o x 2 2 )  
         {  
         o u S t r 2 + = ' A b o v e   c u r v e   ' + ( i 3 + 1 ) + ' .   T o t a l   p o i n t s :   ' + t 0 T o t a l [ i 3 ] + ' \ n ' ; / / 9 5 1 0 2 2 1 0 4 1  
         i f ( i 3 < s z 3 - 1 )  
         o u S t r 2 + = ' B e l o w   c u r v e   ' + ( i 3 + 2 ) + ' .   T o t a l   p o i n t s :   ' + t 0 T o t a l [ i 3 + 1 ] + ' \ n ' ;  
         }  
  
         i f ( b o x 2 3 )  
         {  
   o u S t r 3 + = ' C u r v e   ' + ( i 3 + 1 ) + '   l a s t   p o i n t   e q u a t i o n   i s   n e x t \ n ' ; / / 9 5 1 0 2 2 1 0 3 2  
   o u S t r 3 + = ' t = ' + t + ' \ n x = ' + e q 5 x y [ 0 ] [ 4 ] [ i 3 ] + ' \ n y = ' + e q 5 x y [ 1 ] [ 4 ] [ i 3 ] + ' \ n \ n ' ; / / 9 5 1 0 2 0 1 2 1 7  
         }  
  
 / /   N e x t   l i n e   d r a w   O N E   l i n e   ( a s s u m e   t o t a l   f i v e   l i n e s )  
         M y G r a p h . P l o t ( M y L i n e s [ i 3 ] ) ;   / /   9 5 1 0 2 0 1 1 4 1   a d d   d r a w i n g   c o m m a n d  
     }     / /   e n d   o f   f o r ( i 3 = 0 ; i 3 < s z 3 ; i 3 + + )    
  
     e v 0 = " a r r o w f o r m " + a r g d 2 ;   / /   9 5 1 0 2 2 1 4 0 2  
     f o r   ( v a r   i   i n   M y A r r o w )   {  
         i f   ( i   ! =   " a r r o w h e a d " )   {  
         v a r   n   =   d o c u m e n t . f o r m s [ e v 0 ] [ i ] ;    
         M y A r r o w [ i ]   =   (   n . v a l u e   ! = " "   ?   n . v a l u e   :   n u l l ) ;  
         }  
     }  
  
 / /   I f   a r r o w   h e a d   l o c a t i o n   x , y   c o o r d .   a r e  
 / /   n o t   d e f i n e d ,   t h e n   n o t   d r a w   a r r o w h e a d .  
     i f (   / / 9 5 0 6 2 1 1 9 3 5  
         ! (  
         d o c u m e n t . f o r m s [ e v 0 ] [ 0 ] . v a l u e = = [ ]  
         | |  
         d o c u m e n t . f o r m s [ e v 0 ] [ 1 ] . v a l u e = = [ ]  
             )  
         )   / / 9 5 0 6 2 1 1 9 3 6    
         M y G r a p h . D r a w a r r o w ( M y A r r o w ) ;  
  
 / /   i f   d r a w   g r a p h   n u m b e r   6 0 1  
 / /   e v 0   =   " l a b e l f o r m 6 0 1 "   i n   w h i c h  
 / /   6 0 1   ( a r g d 2 )   d e t e r m i n e d   a t   r u n   t i m e  
 / /   b y   u s e r   c l i c k .  
 e v 0 = " l a b e l f o r m " + a r g d 2 ;   / /   9 5 1 0 2 2 1 4 0 3  
 / /   I f   d r a w   g r a p h   n u m b e r   6 0 2 ,   a r g d 2 = 6 0 2  
 / /   " l a b e l f o r m " + a r g d 2   b e c o m e   l a b e l f o r m 6 0 2  
 / /   a r g d 2   v a l u e   c h a n g e   a t   e a c h   r u n .   T h i s  
 / /   i s   " d y n a m i c   a s s i g n " .   O n e   i n p u t   f o r m  
 / /   c o m m a n d   s e r v e   i n f i n i t e   m a n y   g r a p h  
 / /   o p e n T a b l e ( d r a w I D , t a b l e 0 1 )  
 / /   B e c a u s e   ' d r a w I D '   c a n   b e   a n y   v a l u e .  
 / /   9 5 1 0 2 3 1 2 2 0  
 / /   t a b l e 0 1 = = 0   i s   c l o s e   i n p u t   f o r m .  
 / /   t a b l e 0 1 = = 1   i s     o p e n   i n p u t   f o r m .  
  
 / / 9 5 0 6 2 1 1 7 5 3    
     f o r   ( v a r   i   i n   M y L a b e l 1 )   {    
     v a r   n   =   d o c u m e n t . f o r m s [ e v 0 ] [ i ] ;    
     i f   ( n . t y p e   ! =   " s e l e c t - o n e " )   {    
     M y L a b e l 1 [ i ]   =   (   n . v a l u e   ! = " "   ?   n . v a l u e   :   n u l l ) ;  
     }  
     e l s e   {  
         M y L a b e l 1 [ i ]   =   n [ n . s e l e c t e d I n d e x ] . v a l u e ; }  
     }  
  
 / /   I f   l a b e l   x   o r   y   c o o r d i n a t e   i s    
 / /   n o t   d e f i n e d ,   n o t   p r i n t   l a b e l .  
     i f (   / / 9 5 0 6 2 1 1 9 3 8  
         ! (  
         d o c u m e n t . f o r m s [ e v 0 ] [ 0 ] . v a l u e = = [ ]  
         | |  
         d o c u m e n t . f o r m s [ e v 0 ] [ 1 ] . v a l u e = = [ ]  
           )  
         )  
     M y G r a p h . D r a w l a b e l ( M y L a b e l 1 ) ;  
  
 i f ( b o x 2 1 )  
   o u S t r 1 + =  
 ' \ n E a c h   l i n e   m a x   1 0 0 0   p o i n t s .   I f   d r a w \ n '  
 + ' 5   l i n e s ,   c o n t r o l   s t a r t / e n d   p o i n t s   a n d \ n '  
 + ' s t e p   s i z e   s u c h   t h a t   e a c h   l i n e   p r i n t \ n '  
 + ' o n l y   1 0 0   t o   2 0 0   p o i n t s .   I f   p r i n t   5 0 0 0 \ n '  
 + ' p o i n t s   i n   o n e   g r a p h ,   j a v a s c r i p t   i s   s l o w . \ n '  
 + ' 9 5 1 0 2 2 1 1 1 7 \ n '  
 ;  
  
 i f ( b o x 2 3 )  
   o u S t r 3 + =  
 ' \ n E a c h   l i n e   o u t p u t   o n l y   e q u a t i o n   u s e d   b y \ n '  
 + ' l a s t   p o i n t .   I f   p r i n t   f o r   e a c h   p o i n t ,   t o o \ n '  
 + ' l o n g   o u t p u t   a n d   u n n e c e s s a r y .   9 5 1 0 2 2 1 0 5 0 \ n '  
 ;  
  
 / * *    
 e n d   o f   f o r ( i 3 = 0 ; i 3 < s z 3 ; i 3 + + )  
 t h a t   i s   e n d   o f   f i v e   c u r v e s .  
  
 / / d e f i n e   d r a w i n g   t i t l e   N O T   o k   h e r e   9 5 1 0 2 2 1 6 5 0  
 / / d e f i n e   d r a w i n g   t i t l e   O K   a t               9 5 1 0 2 2 1 6 5 1  
         M y G r a p h . t i t l e =    
 d o c u m e n t . g e t E l e m e n t B y I d ( " t i t l e 0 " + a r g d 2 ) . v a l u e ;  
 / * * /  
  
 / /   N e x t   c o m m a n d   s e n d   g r a p h   d a t a   t o   w e b   p a g e  
 d o c u m e n t . g e t E l e m e n t B y I d ( " g r a p h d i v " + a r g d 2 ) . i n n e r H T M L = M y G r a p h ;  
  
 / /   N e x t   c o m m a n d   s e n d   g r a p h   d o c .   t o   w e b   p a g e  
 d o c u m e n t . g e t E l e m e n t B y I d ( " e q n D o c " + a r g d 2 ) . i n n e r H T M L = d o c u m e n t . g e t E l e m e n t B y I d ( " C u r v e D o c 0 " + a r g d 2 ) . v a l u e ;  
  
 / /   p r i n t   x , y   c o o r d i n a t e   t o   o u t p u t   b o x 1  
 i f ( b o x 2 1 )  
 d o c u m e n t . g e t E l e m e n t B y I d ( " b o x 1 1 " + a r g d 2 ) . v a l u e = o u S t r 1 ; / / 9 5 1 0 2 2 1 0 2 5  
 / /   T h i s   i s   n o t   p l o t   c u r v e ,   t h i s   i s   t o  
 / /   s t o r e   e a c h   p o i n t   x , y   c o o r d i n a t e ,  
 / /   u s e r   c a n   r e a d   a n d   c o p y   v a l u e .  
  
 / /   p r i n t   t , x , y   c o o r d i n a t e   t o   o u t p u t   b o x 2  
 i f ( b o x 2 2 )  
 d o c u m e n t . g e t E l e m e n t B y I d ( " b o x 1 2 " + a r g d 2 ) . v a l u e = o u S t r 2 ; / / 9 5 1 0 2 2 1 0 2 6  
  
 / /   p r i n t   p r o g r a m   n o t e s   t o   o u t p u t   b o x 3  
 i f ( b o x 2 3 )  
 d o c u m e n t . g e t E l e m e n t B y I d ( " b o x 1 3 " + a r g d 2 ) . v a l u e = o u S t r 3 ; / / 9 5 1 0 2 0 1 2 1 5  
  
 }   / /   e n d   o f   f u n c t i o n   D r a w G r a f 2 ( a r g d 2 )  
  
  
  
  
  
  
  
 / /   9 5 1 0 2 3 0 2 4 7  
 f u n c t i o n   c l o s e S t r ( k l o z I D )  
 {  
 d o c u m e n t . g e t E l e m e n t B y I d ( " p u t T a b l e " + k l o z I D ) . i n n e r H T M L = " " ;  
 }  
 / /   9 5 1 0 2 3 0 2 4 8   T o   s a v e   s y s t e m   r e s o u r c e s  
 / /   w h e n   u s e r   c l o s e   i n p u t   t a b l e ,   d e l e t e  
 / /   t a b l e   d y n a m i c   s t r i n g   i m m e d i a t e l y .  
 / /   E q u a l   n o t h i n g   [ . . . = " " ]   t h a t   i s   d e l e t e .  
  
  
  
  
  
  
  
  
 / / 9 5 0 6 1 9 1 2 4 6  
 / / t o S y n t a x ( i n S t r 1 )   c h a n g e    
 / / f r o m   ' t '   t o   ' ( t t ) '  
 / / f r o m   ' a '   t o   ' ( a a ) '  
 / / f r o m   ' b '   t o   ' ( b b ) '  
 / / a v o i d   c o n f u s e  
 / / ' t '   i s   i n d e p e n d e n t   v a r i a b l e .  
 / / ' t a n ( t ) '   c h a n g e   t o   ' t a n ( ( t t ) ) '  
 / / ' a '   a n d   ' b '   a r e   v a r i a b l e   c o n s t a n t .  
 / / ' a * a c o s ( t ) '   c h a n g e   t o   ' ( a a ) * a c o s ( ( t t ) ) '  
 / / ' 2 + b '   = >   ' 2 + b b '   w h e n   b = - 1 ,   2 + - 1   ? !   e r r o r  
 / / ' 2 + b '   = >   ' 2 + ( b b ) '   w h e n   b = - 1   n o   t r o u b l e  
 / / 9 5 0 6 1 9 1 2 5 0  
 / /  
 f u n c t i o n   t o S y n t a x ( i n S t r 1 )  
 {  
     v a r   o u s t r 0 = " " ;   / / 9 5 0 6 1 9 1 5 4 8  
     v a r   o u s t r 1 = " " ;   / / 9 5 0 6 1 9 1 5 3 9  
     v a r   o u s t r 2 = " " ;   / / 9 5 0 6 1 9 1 6 0 6  
     v a r   i 0 , i 1 , i 2 , i 3 , i 4 , i 5 ;  
  
 / / 9 5 0 6 1 9 1 4 0 4   ' t '   ' a '   ' b '   t o   b e   r e p l a c e d  
     v a r   t a b 3 = " t a b " ;  
     v a r   t a b 3 l e n = t a b 3 . l e n g t h ;  
     v a r   i n S t r 2 = n e w   A r r a y ( t a b 3 l e n + 1 ) ;   / / 9 5 0 6 1 9 1 4 1 2  
  
     f o r ( i 3 = 0 ; i 3 < = t a b 3 l e n ; i 3 + + )  
         i n S t r 2 [ i 3 ] = " " ;   / / 9 5 0 6 1 9 1 6 1 4  
  
 / * *  
 f r o m  
   M a t h . t a n ( t * a / b )  
 * M a t h . c o t ( a / b + t * t ) / ( t / a - 1 . 2 * b )  
 + M a t h . a b s ( t + a - b )  
 t o  
   M a t h . t a n ( ( t t ) * ( a a ) / ( b b ) )  
 * M a t h . c o t ( ( a a ) / ( b b ) + ( t t ) * ( t t ) ) / ( ( t t ) / ( a a ) - 1 . 2 * ( b b ) )  
 + M a t h . a b s ( ( t t ) + ( a a ) - ( b b ) )  
  
 i 2   c o n t r o l   ' t ' ,   ' a ' ,   ' b '  
 i n S t r 2 [ 0 ]   s t o r e   o r i g i n a l   s t r i n g  
 i n S t r 2 [ 1 ]   s t o r e   ' t t ' e d   s t r i n g  
 i n S t r 2 [ 2 ]   s t o r e   ' a a ' e d   s t r i n g  
 i n S t r 2 [ 3 ]   s t o r e   ' b b ' e d   s t r i n g  
 / * * /  
  
     o u s t r 1 + = i n S t r 1 + ' \ n ' ;  
     i n S t r 2 [ 0 ] = i n S t r 1 ;  
     f o r ( i 2 = 0 ; i 2 < t a b 3 l e n ; i 2 + + )  
     {  
       f o r ( i 1 = 0 ; i 1 < i n S t r 2 [ i 2 ] . l e n g t h ; i 1 + + )  
       {  
         i f ( i n S t r 2 [ i 2 ] . c h a r A t ( i 1 ) ! = t a b 3 . c h a r A t ( i 2 ) )  
         i n S t r 2 [ i 2 + 1 ] + = i n S t r 2 [ i 2 ] . c h a r A t ( i 1 ) ;   / / 9 5 0 6 1 9 1 4 5 4  
         e l s e / /   w h e n   i 2 = = 0   t e s t   t a b 3 . c h a r A t ( i 2 ) = = ' t '  
         {       / /   w h e n   i 2 = = 1   t e s t   t a b 3 . c h a r A t ( i 2 ) = = ' a '  
                 / /   w h e n   i 2 = = 2   t e s t   t a b 3 . c h a r A t ( i 2 ) = = ' b '  
             i f ( i n S t r 2 [ i 2 ] . c h a r A t ( i 1 - 1 ) = = ' . '   / / M a t h . t a n ( )     ' t '     l e f t   h a s   ' . '  
               | | i n S t r 2 [ i 2 ] . c h a r A t ( i 1 + 1 ) = = ' ( '   / / M a t h . s q r t ( )   ' t '   r i g h t   h a s   ' ( '  
                 )   / /   t a n   a n d   s q r t   b o t h   ' t '   a r e   n o t   i n d e p e n d e n t   v a r i a b l e   ' t '  
               i n S t r 2 [ i 2 + 1 ] + = i n S t r 2 [ i 2 ] . c h a r A t ( i 1 ) ;   / / 9 5 0 6 1 9 1 5 0 7 .   c o p y   ' t '  
 / * *  
             e l s e  
             i f (   / /   i n d e p e n d e n t   v a r i a b l e   ' t '   N O T   n e i g h b o r   t o   a n o t h e r   a l p h a b e t  
                   ( i n S t r 2 [ i 2 ] . c h a r A t ( i 1 + 1 ) > = ' a '   / / M a t h . a t a n ( )  
                 & & i n S t r 2 [ i 2 ] . c h a r A t ( i 1 + 1 ) < = ' z '  
                   )  
                   | |  
                   ( i n S t r 2 [ i 2 ] . c h a r A t ( i 1 - 1 ) > = ' A '   / / M a t h . a t a n ( )  
                 & & i n S t r 2 [ i 2 ] . c h a r A t ( i 1 - 1 ) < = ' Z '     / / 9 5 0 6 1 9 1 6 4 1  
                   )  
                 )   / /   ' t '   i s   j u s t   a n   e x a m p l e .     ' a '   a n d   ' b '   a r e   s a m e .  
 / * 9 5 0 6 3 0 0 2 2 5   c h a n g e   t o   n e x t * /  
             e l s e  
             i f (   / /   i n d e p e n d e n t   v a r i a b l e   ' t '   N O T   n e i g h b o r   t o   a n o t h e r   a l p h a b e t  
                   ( ( i n S t r 2 [ i 2 ] . c h a r A t ( i 1 + 1 ) > = ' a '   / / M a t h . a t a n ( )  
                 & & i n S t r 2 [ i 2 ] . c h a r A t ( i 1 + 1 ) < = ' z '  
                   )  
                   | |  
                   ( i n S t r 2 [ i 2 ] . c h a r A t ( i 1 + 1 ) > = ' A '   / / M a t h . a t a n ( )  
                 & & i n S t r 2 [ i 2 ] . c h a r A t ( i 1 + 1 ) < = ' Z '     / / 9 5 0 6 1 9 1 6 4 1  
                   ) )  
                   | |  
                   ( ( i n S t r 2 [ i 2 ] . c h a r A t ( i 1 - 1 ) > = ' a '   / / M a t h . a t a n ( )  
                 & & i n S t r 2 [ i 2 ] . c h a r A t ( i 1 - 1 ) < = ' z '  
                   )  
                   | |  
                   ( i n S t r 2 [ i 2 ] . c h a r A t ( i 1 - 1 ) > = ' A '   / / M a t h . a t a n ( )  
                 & & i n S t r 2 [ i 2 ] . c h a r A t ( i 1 - 1 ) < = ' Z '     / / 9 5 0 6 1 9 1 6 4 1  
                   ) )  
                 )   / /   ' t '   i s   j u s t   a n   e x a m p l e .     ' a '   a n d   ' b '   a r e   s a m e .  
               i n S t r 2 [ i 2 + 1 ] + = i n S t r 2 [ i 2 ] . c h a r A t ( i 1 ) ;   / / 9 5 0 6 1 9 1 5 0 7   c o p y   ' t '  
             e l s e           / /   u p t o   h e r e   ' t '   i s   i n d e p e n d e n t   v a r i a b l e   ' t '  
                               / /   ' a '   &   ' b '   a r e   v a r i a b l e   c o n s t a n t .   c h a n g e  
               i n S t r 2 [ i 2 + 1 ] + = ' ( '                                         / /   a d d   o n e   ' ( '  
                                         + i n S t r 2 [ i 2 ] . c h a r A t ( i 1 )     / /   a d d   o n e   ' t '   o r   ' a '   o r   ' b '  
                                         + i n S t r 2 [ i 2 ] . c h a r A t ( i 1 )     / /   a d d   o n e   ' t '   o r   ' a '   o r   ' b '  
                                         + ' ) '   / / 9 5 0 6 1 9 1 5 1 2               / /   a d d   o n e   ' ) '  
             / /   n o w   ' t '   c h a n g e   t o   ' ( t t ) '     ( ' a ' ,   ' b '   s a m e )  
         }   / /   e n d   o f   i f ( i n S t r 2 [ i 2 ] . c h a r A t ( i 1 ) ! = t a b 3 . c h a r A t ( i 2 ) )  
       }     / /   e n d   o f   f o r ( i 1 = 0 ; i 1 < i n S t r 1 . l e n g t h ; i 1 + + )  
  
         o u s t r 0   = i n S t r 2 [ i 2 + 1 ] ;   / / 9 5 0 6 1 9 1 5 4 8   f o r   r e t u r n  
  
     }       / /   e n d   o f   f o r ( i 2 = 0 ; i 2 < t a b 3 l e n ; i 2 + + )  
  
 / / 9 5 0 6 2 0 0 8 0 7   i f   i n p u t   n o   ' t ' ,  
 / / u s e r   u s e   ' x '   i n s t e a d   o f   ' t '  
     i f ( o u s t r 0 . l e n g t h = = i n S t r 2 [ i 2 - 1 ] . l e n g t h )  
     {               / /   t h e n   c h a n g e   ' x '   t o   ' ( t t ) '  
         o u s t r 0 = x 2 t ( o u s t r 0 ) ;   / / 9 5 0 6 2 0 0 8 1 6  
     }  
  
     r e t u r n   o u s t r 0 ;  
 }  
  
  
  
 / / 9 5 0 6 1 5 1 2 5 7   x 2 z   ( h e r e   i s   x 2 t )  
 / /   T o   e v a l u a t e   a n   e q u a t i o n  
 / /   i f   r e p l a c e   ' x '   t o   ' - 2 '   d i r e c t l y  
 / /   t h e n  
 / /   M a t h . e x p ( x * x ) + M a t h . m a x ( x , 1 / x )  
 / /   b e c o m e  
 / /   M a t h . e - 2 p ( - 2 * - 2 ) + M a t h . m a - 2 ( - 2 , 1 / - 2 )  
 / /   b i g   t r o u b l e   ! !  
 / /  
 / /   T h i s   f u n c t i o n   x 2 t ( )   c h a n g e   f r o m  
 / /   M a t h . e x p ( x * x ) + M a t h . m a x ( x , 1 / x )  
 / /   t o  
 / /   M a t h . e x p ( ( t t ) * ( t t ) ) + M a t h . M a x ( ( t t ) , 1 / ( t t ) )  
 / /   s o   t h a t   e v a l u a t i o n   h a s   n o   t r o u b l e  
 / /   e v a l u a t i o n :   e v a l ( t h i s . f O f x . r e p l a c e ( / t t / g ,   i ) ) ;  
 / /   S i n c e   J a v a s c r i p t   m a t h   f u n c t i o n s   n o   ' t t ' .  
 / / 9 5 0 6 1 5 1 3 0 2   x 2 z   ( h e r e   i s   x 2 t )  
 / / 9 5 0 6 2 0 0 8 1 4   x 2 t  
 f u n c t i o n   x 2 t ( i n 0 )  
 {  
     v a r   u 0 ;  
     v a r   o u t 0 = " " ;  
     f o r ( u 0 = 0 ; u 0 < i n 0 . l e n g t h ; u 0 + + )  
     {  
         i f ( i n 0 . c h a r A t ( u 0 ) ! = = ' x ' )  
             o u t 0 + = i n 0 . c h a r A t ( u 0 ) ;  
         e l s e  
         {  
             i f ( i n 0 . c h a r A t ( u 0 - 1 ) = = ' e '  
               & & i n 0 . c h a r A t ( u 0 + 1 ) = = ' p '  
                 )   / /   c o p y   M a t h . e x p ( )  
             o u t 0 + = i n 0 . c h a r A t ( u 0 ) ;  
             e l s e  
             i f ( i n 0 . c h a r A t ( u 0 - 1 ) = = ' a '  
               & & i n 0 . c h a r A t ( u 0 - 2 ) = = ' m '  
                 )   / /   c o p y   M a t h . m a x ( )  
             o u t 0 + = i n 0 . c h a r A t ( u 0 ) ;  
             e l s e / /   r e p l a c e   ' x '   t o   ' ( t t ) '  
             o u t 0 + = " ( t t ) " ;   / / 9 5 0 6 1 5 1 3 0 9  
         }   / /   u s e   ' t t '   n o t   u s e   ' z '   a v o i d   c o n f l i c t  
     }       / /   w i t h   f u t u r e   m a t h   f u n c t i o n   9 5 0 6 1 5 1 3 4 8  
     r e t u r n   o u t 0 ;  
 }   / / 9 5 0 6 1 5 1 3 1 1  
     / / 9 5 0 6 2 0 0 8 1 5   d o n e   x 2 t  
  
  
 / /   9 5 0 6 2 1 1 0 0 6  
 f u n c t i o n   d e l e t e D a t a ( w o r k I D , p r o b I D )  
 {  
     v a r   s 1 = ' d o c u m e n t . g e t E l e m e n t B y I d ( " ' ;   / / 9 5 0 6 2 1 1 4 2 3  
     v a r   w 1 ,   w 2 ,   w 3 ,   w 4 ;   / / 9 5 0 6 2 1 1 4 2 7  
  
     w 3 = p r o b I D ;   / / 9 5 1 0 1 8 1 9 4 2  
  
     v a r   s 2 = ' " + ' + w 3 + ' ) . v a l u e = ' ;  
  
 / / T h i s   f u n c t i o n   d e l e t e D a t a ( w o r k I D )  
 / /   u s e   s e v e r a l   m e t h o d   t o   d e l e t e   d a t a .  
 / /   w o r k I D = = 0   u s e   d i r e c t   d e l e t e ,   f a s t .  
     i f ( w o r k I D = = 0 )  
     {  
 d o c u m e n t . g e t E l e m e n t B y I d ( " t 1 L e n " + w 3 ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " t 1 M i n " + w 3 ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " t 1 M a x " + w 3 ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " t 2 L e n " + w 3 ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " t 2 M i n " + w 3 ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " t 2 M a x " + w 3 ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " t 3 L e n " + w 3 ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " t 3 M i n " + w 3 ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " t 3 M a x " + w 3 ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " t 4 L e n " + w 3 ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " t 4 M i n " + w 3 ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " t 4 M a x " + w 3 ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " t 5 L e n " + w 3 ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " t 5 M i n " + w 3 ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " t 5 M a x " + w 3 ) . v a l u e =  
 " " ;  
     }  
 / / w o r k I D = = 1   u s e   l o o p   t o   a s s i g n   " "   t o   b o x e s  
     e l s e  
     i f ( w o r k I D = = 1 )   / /   d e l e t e   a r r o w   d a t a  
     {  
  
 / / 9 5 0 6 2 1 1 9 5 9  
 f o r ( w 1 = 0 ; w 1 < 1 1 ; w 1 + + )  
 d o c u m e n t . f o r m s [ " a r r o w f o r m " + w 3 ] [ w 1 ] . v a l u e = " " ;  
  
     }  
 / / w o r k I D = = 2   c r e a t e   s t r i n g   a r r a y  
 / / t h e n   u s e   l o o p   t o   a s s i g n   " "   t o   b o x e s .  
     e l s e  
     i f ( w o r k I D = = 2 )  
     {  
 / /   d e l e t e   f i v e   c u r v e   w i d t h ,   c o l o r  
 / /   s o l i d / d a s h / d o t   p r o p e r t i e s .  
  
 / / v a r   l b a r r =   n e w   A r r a y ( 2 5 ) ;  
 / / 9 5 1 0 2 0 1 9 5 3   c h a n g e   2 5   t o   1 5  
 v a r   l b a r r =   n e w   A r r a y ( 1 5 ) ;  
 l b a r r =  
 [  
 / /   " v a r y a 1 " ,  
 / /   " v a r y a 2 " ,  
 / /   " v a r y a 3 " ,  
 / /   " v a r y a 4 " ,  
 / /   " v a r y a 5 " ,   / / t h i s   f i l e   g r a p h 0 9 e . h t m    
 / /   " v a r y b 1 " ,   / / d o   n o t   u s e   v a r i a b l e    
 / /   " v a r y b 2 " ,   / / c o n s t a n t   ' a ' ,   ' b '  
 / /   " v a r y b 3 " ,   / / 9 5 1 0 2 0 1 9 5 2   d e l e t e   ' a ' ,   ' b '  
 / /   " v a r y b 4 " ,   / / C h a n g e   t o   a l l o w   f i v e  
 / /   " v a r y b 5 " ,   / /   a r b i t r a r y   f u n c t i o n s .  
 " w i d t h 1 " ,  
 " w i d t h 2 " ,  
 " w i d t h 3 " ,  
 " w i d t h 4 " ,  
 " w i d t h 5 " ,  
 " c o l o r 1 " ,  
 " c o l o r 2 " ,  
 " c o l o r 3 " ,  
 " c o l o r 4 " ,  
 " c o l o r 5 " ,  
 " s t y l e 1 " ,  
 " s t y l e 2 " ,  
 " s t y l e 3 " ,  
 " s t y l e 4 " ,  
 " s t y l e 5 "  
 ] ;  
         f o r ( w 1 = 0 ; w 1 < l b a r r . l e n g t h ; w 1 + + )  
         {  
             w 4 = s 1 + l b a r r [ w 1 ] + s 2 + ' " " ' ;  
             e v a l ( w 4 ) ;  
         }   / / 9 5 0 6 2 1 1 4 4 0  
     }  
     e l s e  
     i f ( w o r k I D = = 3 )  
     {  
 / / 9 5 0 6 2 1 1 9 5 1  
 f o r ( w 1 = 0 ; w 1 < 1 0 ; w 1 + + )  
 d o c u m e n t . f o r m s [ " l a b e l f o r m " + w 3 ] [ w 1 ] . v a l u e = " " ;  
  
 d o c u m e n t . f o r m s [ " l a b e l f o r m " + w 3 ] [ 1 0 ] . v a l u e = " n o n e " ;   / / 9 5 1 0 2 2 1 5 0 0  
     }  
     e l s e  
     i f ( w o r k I D = = 6 1 )   / /   9 5 1 0 2 2 1 9 3 0  
     {   / /   d e l e t e   e q u a t i o n   o n e  
 d o c u m e n t . g e t E l e m e n t B y I d ( " f u n c 1 x " + p r o b I D ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " f u n c 1 y " + p r o b I D ) . v a l u e = " " ;  
     }  
     e l s e  
     i f ( w o r k I D = = 6 2 )  
     {   / /   d e l e t e   e q u a t i o n   t w o  
 d o c u m e n t . g e t E l e m e n t B y I d ( " f u n c 2 x " + p r o b I D ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " f u n c 2 y " + p r o b I D ) . v a l u e = " " ;  
     }  
     e l s e  
     i f ( w o r k I D = = 6 3 )  
     {   / /   d e l e t e   e q u a t i o n   t h r e e  
 d o c u m e n t . g e t E l e m e n t B y I d ( " f u n c 3 x " + p r o b I D ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " f u n c 3 y " + p r o b I D ) . v a l u e = " " ;  
     }  
     e l s e  
     i f ( w o r k I D = = 6 4 )  
     {   / /   d e l e t e   e q u a t i o n   f o u r  
 d o c u m e n t . g e t E l e m e n t B y I d ( " f u n c 4 x " + p r o b I D ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " f u n c 4 y " + p r o b I D ) . v a l u e = " " ;  
     }  
     e l s e  
     i f ( w o r k I D = = 6 5 )  
     {   / /   d e l e t e   e q u a t i o n   f i v e  
 d o c u m e n t . g e t E l e m e n t B y I d ( " f u n c 5 x " + p r o b I D ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " f u n c 5 y " + p r o b I D ) . v a l u e = " " ;  
     }  
     e l s e  
     i f ( w o r k I D = = 6 0 0 0 )  
     {   / /   d e l e t e   e q u a t i o n   1 , 2 , 3 , 4 , 5  
 d o c u m e n t . g e t E l e m e n t B y I d ( " f u n c 1 x " + p r o b I D ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " f u n c 1 y " + p r o b I D ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " f u n c 2 x " + p r o b I D ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " f u n c 2 y " + p r o b I D ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " f u n c 3 x " + p r o b I D ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " f u n c 3 y " + p r o b I D ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " f u n c 4 x " + p r o b I D ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " f u n c 4 y " + p r o b I D ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " f u n c 5 x " + p r o b I D ) . v a l u e =  
 d o c u m e n t . g e t E l e m e n t B y I d ( " f u n c 5 y " + p r o b I D ) . v a l u e = " " ;  
     }  
     e l s e  
     i f ( w o r k I D = = 4 )  
     {  
 / /   f u t u r e   u s e  
     }  
 }  
  
  
  
  
 / / 9 5 0 7 1 4 2 1 2 7  
 f u n c t i o n   d e l A l l ( p r o b I D )  
 {  
     d o c u m e n t . g e t E l e m e n t B y I d ( " t i t l e 0 " + p r o b I D ) . v a l u e = " " ;  
     d e l e t e D a t a ( 0 , p r o b I D ) ;  
     d e l e t e D a t a ( 1 , p r o b I D ) ;  
     d e l e t e D a t a ( 2 , p r o b I D ) ;  
     d e l e t e D a t a ( 3 , p r o b I D ) ;  
     d e l e t e D a t a ( 6 0 0 0 , p r o b I D ) ;  
     d o c u m e n t . g e t E l e m e n t B y I d ( " C u r v e D o c 0 " + p r o b I D ) . v a l u e = " " ;  
 }  
 / / 9 5 0 7 1 4 2 1 3 0  
  
  
  
 / / - - >  
 
