Graphs

Basics of useGraphs
Using graphs: (you need to know how to use matrices)
1. Define some matrices
  • Matrices of values:
    1. line_1=matrix{1}{8}{5 50 87 55 6 4 -10 -22}
    2. line_2=matrix{1}{8}{54 4 7 85 60 50 40 10}
    3. line_3=matrix{1}{8}{-54 40 7 80 40 40 54 80}
  • Matrix of axis x values
    1. Years = matrix{1}{8}{1995 1996 1997 1998 1999 2000 2001 2002}
2. Add graph shortcode
  1. Start graph with "[graph]"
  2. Add graph title: "title: GRAPH TITLE;"
  3. Add graph values: "values:line_1,line_2,line_3;" values separate with ","
  4. Add horizontal axis: "X:Axis_x;"
  5. Add vertical axis title: "Y:VERTICAL AXIS TITLE"
  6. End graph with "[/graph]"
Example:

<m>line_1=matrix{1}{8}{5 50 87 55 6 4 -10 -20};n;line_2=matrix{1}{8}{54 4 7 85 60 50 40 10};n;line_3=matrix{1}{8}{-54 40 7 80 40 40 54 80};n;Years=matrix{1}{8}{1995 1996 1997 1998 1999 2000 2001 2002}</m>

[graph]title: GRAPH TITLE;values:line_1,line_2,line_3;X:Years;Y:VERTICAL AXIS TITLE[/graph]

Result:
line_1=delim{[}{matrix{1}{8}{{5} {50} {87} {55} {6} {4} {-10} {-22}}}{]}
line_2=delim{[}{matrix{1}{8}{{54} {4} {7} {85} {60} {50} {40} {10}}}{]}
line_3=delim{[}{matrix{1}{8}{{-54} {40} {7} {80} {40} {40} {54} {80}}}{]}
Years=delim{[}{matrix{1}{8}{{1995} {1996} {1997} {1998} {1999} {2000} {2001} {2002}}}{]}
GRAPH TITLE



Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>