GLE Library: graphutil.gle

Download "graphutil.gle"

List of subroutines:

  • graph_line x1 y1 x2 y2

  • ! Function to draw a line on a graph
    ! x1, y2 = start point
    ! x2, y2 = end point

  • graph_hline y x1 x2

  • ! Function to draw a horizontal line on a graph
    ! y = y-point of line
    ! x1, x2 = range of line

  • graph_vline x y1 y2

  • ! Function to draw a vertical line on a graph
    ! x = x-point of line
    ! y1, y2 = range of line

  • invxg x


  • invyg y


  • graph_textbox xp yp label$ dx dy add


  • graph_text xp yp label$ dx dy


  • graph_del wd sca

  • ! Function returning the offset of the drawing area of a graph
    ! wd = width of the graph
    ! sca = hscale parameter of the graph

  • graph_select wd hi hsc vsc xmn xmx ymn ymx

  • ! Initialize graph variables and functions such as xg() and yg()
    ! wd = width of graph
    ! hi = height of graph
    ! hsc = hscale parameter of graph
    ! vsc = vscale parameter of graph
    ! xmn, xmx = minimum and maximum xaxis value
    ! ymn, ymx = minimum and maximum yaxis value

  • graph_hgrid nb color$

  • ! Function to draw an horizontal equidistant grid on a graph
    ! (use 'under graph_hgrid 5 "red"' in your graph block)
    ! nb = number of lines in grid
    ! color$ = color for grid lines

  • graph_vgrid nb color$

  • ! Function to draw a vertical equidistant grid on a graph
    ! (use 'under graph_vgrid 5 "red"' in your graph block)
    ! nb = number of lines in grid
    ! color$ = color for grid lines

  • graph_grid nbh nbv color$

  • ! Function to draw an equidistant grid on a graph
    ! (use 'under graph_grid 5 "red"' in your graph block)
    ! nb = number of lines in grid
    ! color$ = color for grid lines

  • graph_origin

  • ! Go to the origin of a graph selected with selectgraph

  • graph_zeroaxis style color$


  • graph_print_inv x y


  • dmaxx ds$

  • ! Function to compute the maximum x-value of a dataset

  • dmaxy ds$

  • ! Function to compute the maximum y-value of a dataset

  • dminx ds$

  • ! Function to compute the minimum x-value of a dataset

  • dminy ds$

  • ! Function to compute the minimum y-value of a dataset

  • dmeany ds$

  • ! Function to compute the mean y-value of a dataset

  • darea ds$

  • ! Function to compute the area between a dataset and the x-axis

  • dmeany_x d$ x

  • ! compute average y-value for given x-value x for dataset d$

  • derry_up_x d$ x

  • ! compute maximum upward deviation from the mean y-value

  • derry_down_x d$ x

  • ! compute maximum downward deviation from the mean y-value

  • bar_draw_error_interval bar xval yval error

  • ! Function to draw an error interval on a bar dataset with multiple bars

  • bar_draw_error_intervals data$ err$ bar

  • ! Function to draw error intervals on a bar dataset with multiple bars
    ! E.g.,
    !
    ! begin graph
    ! data "mydata.csv"
    ! bar d1,d3 fill grey50,grey20
    ! end graph
    !
    ! bar_draw_error_intervals "d1" "d2" 1
    ! bar_draw_error_intervals "d3" "d4" 2

[Return to subroutines page]