X-Git-Url: https://git.cworth.org/git?p=acre;a=blobdiff_plain;f=acre.h;h=df23199cbc0ea6a4a7230cadc1b48fbf818a0d85;hp=0c602c18547cfe919234a81d45b1b2f7a739937d;hb=803fba5eca929a4e0cb541223182eae86a96f9bb;hpb=c04dc4e942a60d51a540c32e5b0e574be609e49a diff --git a/acre.h b/acre.h index 0c602c1..df23199 100644 --- a/acre.h +++ b/acre.h @@ -42,6 +42,52 @@ acre_set_x_axis_label (acre_t *acre, const char *label); void acre_set_y_axis_label (acre_t *acre, const char *label); +/* Get the range of data values in the X dimension. */ +void +acre_get_x_axis_data_range (acre_t *acre, double *x_min, double *x_max); + +/* Get the range of the currently viewable X axis. */ +void +acre_get_x_axis_range (acre_t *acre, double *x_min, double *x_max); + +/* Set the range of the currently viewable X axis. */ +void +acre_set_x_axis_range (acre_t *acre, double x_min, double x_max); + +/* Set the X axis viewable range to be sized automatically. + * + * If both X and Y axes are sized automatically, then the X range will + * be set to the full range of data in the X dimension. + * + * But if the Y axis has been set to a limited viewable range, (with + * acre_set_y_axis_range), then the X axis will be set to the + * corresponding X range of data that lies within that set Y range. */ +void +acre_set_x_axis_range_auto (acre_t *acre); + +/* Get the range of data values in the Y dimnension. */ +void +acre_get_y_axis_data_range (acre_t *acre, double *y_min, double *y_max); + +/* Get the range of the currently viewable Y axis. */ +void +acre_get_y_axis_range (acre_t *acre, double *y_min, double *y_max); + +/* Set the range of the currently viewable Y axis. */ +void +acre_set_y_axis_range (acre_t *acre, double y_min, double y_max); + +/* Set the Y axis viewable range to be sized automatically. + * + * If both X and Y axes are sized automatically, then the Y range will + * be set to the full range of data in the Y dimension. + * + * But if the X axis has been set to a limited viewable range, (with + * acre_set_x_axis_range), then the Y axis will be set to the + * corresponding Y range of data that lies within that set X range. */ +void +acre_set_y_axis_range_auto (acre_t *acre); + /* Add a dataset to the plot. The plot assumes ownership of the * dataset so it is not necessary to call acre_data_destroy on it. */ void