Class XppBarGraph

 XppWindow 
   |
   +---- XppCanvas 
           |
           +----XppBarGraph

Description:
A window specialized for drawing bar graphs.

Source code:
XppBarGraph.h
XppBarGraph.c

Examples:

XppBarGraph(int width, int height,int x=0, int y=0, char *name="bargraph");
Create a bar graph window on the root window at position (x,y) with the specified width and height and name. If either x or y is negative then the window must be positioned on the root window using the mouse.

XppBarGraph(XppWindow& win, int width, int height, int x = 0, int y = 0);
Create a child bar graph window within the parent window win at the relative position (x,y) with width w and height h.

void SetStyleOutline(void); Plot the bars as rectangles.
void SetStyleFilled(void); Plot the bars as filled rectangles. This is the default style.

void PlotBar(double x1, double x2, double y);
Plot a bar of height y in the x interval [x1, x2]

void PlotBarGraph(double *y, int n);
Plot bars of height y[i] in the x intervals [i, i+1] , ... 0 <=i < n

void PlotBarGraph(double *x, double *y, int n);
Plot bars of height y[i] in the x intervals x[i], x[i+1] , ... 0 <=i < n


Copyright (c) 1995 Leslie Picardo
All rights reserved