Skip to content

Commit

Permalink
We have an enum AXIS_INDEX. Use it.
Browse files Browse the repository at this point in the history
  • Loading branch information
sfeam committed Oct 9, 2017
1 parent 198d89b commit 38973b5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"set link x2 via f(x) inv g(x)" (primary axis x1).
Bug #1973

* src/graphics.h src/unset.c: We have an enum AXIS_INDEX. Use it.
(mostly to aid debugging; shouldn't affect code generation).

2017-10-08 Ethan A Merritt <[email protected]>

* src/axis.c (reconcile_linked_axes) src/axis.h src/plot2d.c:
Expand Down
12 changes: 8 additions & 4 deletions src/graphics.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* $Id: graphics.h,v 1.73 2017-09-11 20:13:24 sfeam Exp $
* $Id: graphics.h,v 1.74 2017-10-09 20:56:36 sfeam Exp $
*/

/* GNUPLOT - graphics.h */
Expand Down Expand Up @@ -43,6 +43,10 @@
#include "gadgets.h"
#include "term_api.h"

#ifndef AXIS_INDEX
#include "axis.h"
#endif

/* types defined for 2D plotting */

typedef struct curve_points {
Expand Down Expand Up @@ -76,9 +80,9 @@ typedef struct curve_points {
int boxplot_factors; /* Only used if plot_style == BOXPLOT */
int p_max; /* how many points are allocated */
int p_count; /* count of points in points */
int x_axis; /* FIRST_X_AXIS or SECOND_X_AXIS */
int y_axis; /* FIRST_Y_AXIS or SECOND_Y_AXIS */
int z_axis; /* same as either x_axis or y_axis, for 5-column plot types */
AXIS_INDEX x_axis; /* FIRST_X_AXIS or SECOND_X_AXIS */
AXIS_INDEX y_axis; /* FIRST_Y_AXIS or SECOND_Y_AXIS */
AXIS_INDEX z_axis; /* same as either x_axis or y_axis, for 5-column plot types */
int current_plotno; /* Only used by "pn" option of linespoints */
int n_par_axes; /* Only used for parallel axis plots */
double **z_n; /* Only used for parallel axis plots */
Expand Down
4 changes: 2 additions & 2 deletions src/unset.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef lint
static char *RCSid() { return RCSid("$Id: unset.c,v 1.258 2017-09-11 20:13:24 sfeam Exp $"); }
static char *RCSid() { return RCSid("$Id: unset.c,v 1.259 2017-10-09 20:56:36 sfeam Exp $"); }
#endif

/* GNUPLOT - unset.c */
Expand Down Expand Up @@ -721,7 +721,7 @@ unset_autoscale()
} else {
/* HBB 20000506: parse axis name, and unset the right element
* of the array: */
int axis = lookup_table(axisname_tbl, c_token);
AXIS_INDEX axis = lookup_table(axisname_tbl, c_token);
if (axis >= 0) {
axis_array[axis].set_autoscale = AUTOSCALE_NONE;
c_token++;
Expand Down

0 comments on commit 38973b5

Please sign in to comment.